Anonymouse VS Logged in users on my site & Google Analytics
Posted
by
Flowpoke
on Pro Webmasters
See other posts from Pro Webmasters
or by Flowpoke
Published on 2011-06-30T22:01:28Z
Indexed on
2011/07/01
0:31 UTC
Read the original article
Hit count: 298
google-analytics
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 Im 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 Im hoping this comes down to and although Im 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'....?
Any tips? Am I doin it wrong?
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>
© Pro Webmasters or respective owner