I have set up two different profiles in my Google analytics account for my website. The reason for having two different profiles is that my site is completely divided in two different user groups (not sharing anything (buyers and sellers)).
When reading the documentation on profiles and accounts from google it says that each profile as subid UA-XXXX-1, UA-XXXX-2 etc... My tracking code just uses -1 and therefore both profiles show the same information. I can't figure out how my tracking code should differ between the two. In my mind it should be:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXX-1']);
_gaq.push(['_setDomainName', 'mysite.com']);
_gaq.push(['_setAllowHash', false]);
_gaq.push(['_trackPageview']);
... analytics javascript.
</script>
And on the second part of the site it should be:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXX-2']);
_gaq.push(['_setDomainName', 'mysite.com']);
_gaq.push(['_setAllowHash', false]);
_gaq.push(['_trackPageview']);
... analytics javascript.
</script>
I can't see any examples and my profiles show the same tracking code in analytics. I'm lost in how to make the two different profiles gathering the information separatly.
My question is simple: How do I alter my tracking code so that traffic gets logged either in my default profile or second profile? Is there something that I'm missing?
Super thanks for any answer to this.
Best regards,
Niclas