My Blog

contains PHP and other web related content. (Sometimes there are some off topic things - don't freak out!)

Using Google Analytics Asynchronously

I came across the following link on google’s code pages:
http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

It basically details the asynchronous loading of google analytics. I found this to be a very cool addition to an already powerful package that I rely on.

However, one thing that I haven’t been able to successfully figure out. What happens when you want to load in two instances or two different accounts? On one of my sites, I use my own google analytics account plus the clients. This tracks the traffic fine with the non-asynchronous method. You simply make a new instance of the ga object and assign a new ID to it. However, can I do the same thing with this asynch method? I’m kind of wary to try it because I don’t want to lose any data.

Anyone have any experience or have any links to where I can find this detail?

Tags: ,

2 Responses to “Using Google Analytics Asynchronously”

  1. I found this link in the documentation: http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html#MultipleTrackers

    I think it describes the multiple account setup you are looking for. Enjoy!

  2. Aaron says:

    @Joel Clermont: Thanks Joel! Seems like I should have searched a bit harder :)

Leave a Reply

  • twitter loader

Follow me on twitter: @aaronsaray

The views on this website are my own and do not reflect the opinions of my employer or clients.
Creative Commons License Home | Open Source | Book | Music | Art | Bio | Resume | Contact
My Baby