I'd like to be able to run two different 'tracks' for Google Analytics; One for anonymous users of the site and another for Users whom are logged-in.
I say "track" because I'm not sure of the term -- but I definitely know I want it to all be in the same "Analytics Account", I just want to segregate my logged-in users.
In the site template, I can very easily add a conditional to display one or the other (Analytics code snippet)... Which I'm hoping this comes down to and although I'm not sure, it seems that the last digit in your Analytics ID (e.g. UA-15XXXX0-X
) could be incremented to gain such additional 'tracks'.
My current footer snippet:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-XXXXXXX-1");
pageTracker._trackPageview();
} catch(err) {}
</script>