
Google Analytics: Track Multiple Accounts (New Code)
There’s often a need to track a single page in multiple Google Analytics accounts. For instance, perhaps you have multiple accounts – one for the client and one for your agency – and you’d like to roll the data into each. In order to do that, you’ve got to have both accounts specified on each page.
This was a fairly easy task with the old Urchin (pageTracker) code but is surprisingly easier with the new Google Analytics embed script that’s supplied.
Basically, you simply add the additional account to the _gaq array! If you’d like to add more, you simply change “b” to “c” and so on, and so on. Keep in mind that you’re dropping cookies with each account you’re adding, though, so don’t get too carried away.
Excellent tip! Thanks for sharing Doug! Is there any detrimental impact to multiple codes in a site if configured correctly? Aside from the additional scattering of cookies all over the place?
None whatsoever IF it’s configured properly. If you simply paste a few different script tags in a page, it can wreak havoc with cookies, bounce rates, and overall stats, though.
This implementation seems to no longer be working for one of our sites. Have you noticed it not working any longer as well? Any ideas why it would have?