Analytics & Testing

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.

3 Comments

  1. 1

    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?

    • 2

      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.

  2. 3

Leave a Reply