Aaron Saray

open source programmer,
web developer

entrepreneur, author
and musician

My Blog

contains PHP, Web and business/entrepreneurial related content. Please join in the conversation!

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?

This entry was posted in javascript and tagged , . Bookmark the permalink.

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!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>