Friday 5 March 2010

Asynchronous Tracking with Google Analytics

So, I was creating a new blog today for our Equality & Diversity team and was adding in the tracking code for them from Google Analytics when I spotted this in the settings - 'New! Try the asynchronous tracking code'. Obviously I clicked on the link and experienced a mixture of excitement and disappointment!

With a description such as asynchronous tracking code I was expecting something pretty exciting but the link simply led to a help page within Google. However, after popping on my technical hat and doing some reading this actually sounds like a small improvement. Nothing amazing but enough to possibly help improve the load time of our sites which is always a bonus.

The way Google Analytics runs at the moment is that it's almost the last thing to load on the page. However, with the new version of the code you move it up the page to just after the tag so it loads earlier and you have more chance of it loading before a visitor leaves your page. Certainly something to bear in mind if you've started to notice that the analytics code is taking it's time to load, which on occasions we have!

To quote from Google:
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
As we run our analytics code in a global footer the update only has to happen in one place to run site wide and we should see improvements almost straight away. This should mean more accurate stats but might mean your bounce rate goes up!

If you wanted to read the article with directions on how to implement on your own site then head over to the Google Help pages.

No comments:

Post a Comment