Google Analytics launches asynchronous tracking

Tuesday, December 01, 2009 | 10:26 AM

Labels: ,

Google Analytics now provides a new Asynchronous Tracking Code snippet as an alternate way to track your website!

Think of the asynchronous tracking code snippet as a script that uses a "separate lane" to handle part of the processing of your webpage. As the number of cars (or in this case, scripts on your webpage) increases, the asynchronous tracker uses this lane to reduce webpage load time. Websites that use many scripts or rely on rich media content will especially benefit from this new method, but even lightweight sites will see improvements.

The new tracking snippet offers the following benefits:
  • Faster tracking code load times for your web pages due to improved browser execution
  • Enhanced data collection and accuracy
  • Elimination of tracking errors from dependencies when the JavaScript hasn't fully loaded
The asynchronous tracking code is now in Beta and available to all Google Analytics users. Using the new tracking code is optional: your existing Google Analytics code will continue to work as-is. But if you want to improve your webpage load times and fine-tune the accuracy of your Analytics data, then we think you'll love this new option.

Learn more about this new tracking code on our Analytics Help Center and get started on Google Code.

Posted by Jesse Savage, Google Analytics Team

36 comments:

Jeff said...

This sounds like the biggest news in GA in the last year or two... yet this summary is pretty much devoid of all details.

ispcheck said...

So this is nothing more than a fasting script from Google?

Me said...

I am first? Wow, this is cool. Wonder what if this related to all that talk about Google's future "preference" for faster websites????

e said...

With the Asynchronous version being Beta, will the normal "Check Status?" feature inside Google Analytics Dashboard detect the Async code and therefore correctly determine "Tracking Installed" or "Tracking Not Installed"? 

邬剑 said...

Very cool and useful function. Stay tune.

Artric said...

Very cool, I'd like to see some benchmarks before and after. Not only on site speed, but more importantly to me - accuracy.

I wouldn't say that this is the biggest news in the last few years. Advanced segmentation is probably the biggest, and there's also Intelligence.

denparser said...

This might be awesome. I like the service. Hope it would be also still in free version.

Mobs said...

indeed a great news...I used to have problems with accuracy when there were errors in my pages...

technical said...

I was testing our website with IE 6 and it seems to fail (weird blank page with host not available when having the script).

Urvashi said...

It will be realy helpful tool for the SEO experts...........
Awesome Tool

Tim said...

Sounds good!

How do I set this up if I am populating 2 accounts? Currently we track one account normally and one with a transformed pagename to help categorise our site hierarchy.

I currently use pagetracker to call the first account and 'secondTracker' to call the second account, as below:

var pageTracker = _gat._getTracker("UA-FIRSTACCT-1");
var secondTracker = _gat._getTracker("UA-SECONDACCT-1");


Is it possible to do this with asynchronous tracking?

Thanks,
Tim.

jason said...

With the new code, you suggest adding it within the BODY tags of the page - can the new script also be added as an external javascript? Will this effect page-tracking at all?

Daniel said...

Only thing I am unsure on is that it mentions it’s in beta at the moment – I wonder if it’s fully stable?

jsavage said...

@Jeff - Our blog post on Google Code is more technical. Check it out:

http://googlecode.blogspot.com/2009/12/google-analytics-launches-asynchronous.html

Our developer site also contains many more details:

http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

@e - The "Check status" feature in GA should work with the async snippet.

@denparser - The async tracking code is free for all our users.

jsavage said...

@technical - the async snippet should work with IE6. It may have to do with the contents of your particular page. Any chance you can point us to one of your webpages that doesn't work?

@tim - Take a look at: http://code.google.com/apis/analytics/docs/tracking/asyncMigrationExamples.html#MultipleTrackingObjects

@jason - We don't recommend "within the BODY tags". Take a look at our detailed instructions here: http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

@daniel - We believe it's stable, but it's the first public launch of the snippet so we want to be cautious.

Julien said...

What about _setVar and custom variables?

Spanishgringo said...

Will you be enabling the async tracking code feature for Urchin?

technical said...

IE6: I created a simplified test page http://www.intro.org/googletest.html with the async implementation. You can use it to see if you are experiencing the same issue I am with IE6. Thanks for your help.

Brian said...

Questions are easier to answer in the Help forum:
http://www.google.com/support/forum/p/Google+Analytics/label?lid=5a6c689030bdafe7&hl=en

A.J. said...

ie6 throws operation aborted error.

Brian said...

@Spanishgringo - urchin.js will not get async tracking. You should upgrade to ga.js at your earliest convenience.

Brian said...

@Julien - Did you have a specific question about _setVar and custom variables? These, and all other, features will work with async.

http://www.hiwaar.com said...

sound useful

Brian said...

Thanks everyone for your feedback on the new Analytics Asynchronous Tracking snippet. We have incorporated some of your suggestions and have updated our snippet recommendation. You can check it out here: http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

Jonas said...

Is event tracking affected by the new asynchronous tracking code? If so where can I find information about this?

Spanishgringo said...

@Brian

So if we want to use both Urchin Software and GA, we will now use separate scripts src (ga.js for GA and urchin.js for Urchin Software).

I have the understanding that we cannot use ga.js to send data to our Urchin Software instalation.

Do you know if there will be any conflict with this while using GA in the async mode? Has it been tested in this dual configuration?

Guilhaume said...

@technical, @jsavage :

IE6: I had a problem with the async snippet when placed just before </header> (pages won't load at all).

I resolved the issue either by splitting the snippet as said in the bottom of this page : http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html

Or by placing it higher in the header, before a call to an ajax.googleapis.com/ajax/libs/mootools/1.1.2/mootools-yui-compressed.js library.

mwinning said...

Does this have built-in support for tracking subdomains? I didn't see anything specific to this.

Niklas Hjelm said...

Hi
I have a question that I hope you can answer.

I'm trying to use Custom Variables and this works fine until I try to configure my site for cross-domain tracking. In order to do this I need to set domain name to "none" using _gaq.push(['_setDomainName', 'none']);

When I do this my Custom Variables from the "utme" disappears, why? How can you transfer Custom Variables across multiple domains without using setDomainName?

Best Regards / Niklas

Brian said...

@Spanishgringo: ga.js can send hits to both. You don't need to use urchin.js and ga.js on the same page, but it shouldn't cause any problems either.

@Guihaume: This was due to an IE parsing bug that can occur depending on the contents of your HEAD. The easiest fix is to put the snippet at the TOP of the BODY section.

@mwinning: all features that work with traditional tracking work with async

Rafen said...

> Does this have built-in support for tracking subdomains? I didn't see anything specific to this.

there is an example for that here:
http://code.google.com/apis/analytics/docs/tracking/asyncMigrationExamples.html

Spanishgringo said...

@Brian,
Our GAAC that we are working with recommended against using ga.js to send data to our local Urchin server because they said that there are conflicts with some data, so I don't know who to believe.

Second, you should update your Migration Guide to talk about moving to the Async mode from urchin.js, not just to ga.js.
http://www.google.com/support/analytics/bin/answer.py?answer=76305

Lastly, it would be nice to have an article explaining how to properly setup Google Analytics and Urchin on the same site using the Async code.

Bonus points if it also explains how to do this for multiple profiles (local site & global grouping of sites) on the same page too.

James said...

Sounds good. i always enjoy reading the comment section to see how things are really working out for people.

david lawton said...

FYI migration to AJAX caused buttons with custom event tracking javascript tags to cease functioning entirely. Removal of the event tracking code restored functionality of the buttons.

Bizwatches.com said...

i have just installed this on my site bizwatches.com and i am hoping this give me a better understand of my traffic sources( i have a lot of errors messages before)

helle said...

Thanks!
It will be very useful to SEO experts.
http://taettag.pressesite.dk/forside/tag/