Google Analytics tagging is now officially changed to the what Google calls Asynchronous Tracking, which came out of beta last week. The new tracking tag is the default and recommended code to use, and shows up in your Google Analytics’ admin interface.

So what’s the big deal about this?
Sometime back in December 2009, Google released the Asynchronous Tracking code snippet as an alternative method to tag website to collect website statistics. The new tracking offers some benefits over the previous tracking tags, but the most important one is speed.

Google obviously knows that their previous tracking code slowed things down, since it downloads a fairly large Javascript library file, and while it’s downloading, nothing else can happen on the page. This is the reason why Google recommends you put the code at the bottom of your webpage.

In most cases, this is not a problem, but you can’t start tracking until the whole javascript has been loaded, and the user might have navigated away before this happens (rarely, but it does happen). Also, it does become a headache if we want to track things that happens before the bottom of the page gets loaded, e.g. a call to fire an event and so on.

With the new Asynchronous Tracking, your browser will continue to render the page while the GA javascript loads in the background. Any tracking calls it encounters before the full file has been loaded is pushed into a queue, and executed once the complete javascript file has been loaded.

How to start using Asynchronous Tracking tag
If you’ve installed the previous tagging, there’s nothing new to changing over to the Asynchronous Tracking code. Just go into your Google Analytics admin interface and grab the new code and replace your old code with it.

Google Analytics admin

Of course, if you don’t use the plain vanilla code snippet and have added various other API calls, you need to refer to the documentation at Google on the equivalent syntax. Google has some good migration examples to get your started.

Should I make the switch?
The folks over at Position2 did a pretty good experiment to study the effect of using the asynchronous code vs the old code on page load time. So was Google right to claim that the new code speeds things up?

Well, they found that the new code will speed up the page load time if you’ve been putting your code at the top of the page. But if you’ve been putting your code snippet at the bottom of the page, there’s no discernable difference. In fact, the new code clocks a consistent timing no matter where you place it. It was the old code that would slow the page down if it was placed at the top of the page.

It may also be of interest to know that there’s been quite a bit of chatter in the Google Analytics forum about drops in traffic after switching to the new code, and various other issues.

So, like all things tech, do you want to be the 1st generation of people to use something ‘new’? This entirely boils down to your need. Is your analytics number the lifeblood of your business? Is your site slowed down by heavy GA usage?

Since Google has officially recommended everyone to switch to the new asynchronous tracking code, it’s just a matter of time before the old code snippet is phased out. You should switch if the benefits of the new code solves your problems or makes tracking easier for you, but otherwise, wait it out a little bit while Google irons out the kinks in the system.

FYI: I have switched to the new tracking code for testing. Let’s see how it affects my numbers on this site.