The Google Analytics Asynchronous Tracking Code, where should you put it on your site? Well, for starters lets have a look by checking out Google’s official recommendation for web developers…
Right… so regardless of what Google’s official recommendation is – huge websites for really large companies seem to still have (inserting a tracking code at the bottom of a page was once Google’s recommendation a long time ago) their tracking code at the bottom of the page.
Take Allure as an example. (Open up Google Browser, At the top of the page click on the tool icon, highlight tools, click on view source, and then ctrl +f and search for Google). Their tracking code is at the bottom of the page!
You see it? Ok, let’s hope you do.
Anyways, what I find pretty surprising is how a large, high powered company (and there are many) such as Allure wouldn’t currently be using Google’s best practices. Especially, when proper placement tracking code would be in their best interest.
Let’s take or Allure again for example. When you visit the site, one can see that Allure.com features advertisements. Some of these are from DoubleClick (a subsidiary of Google which develops and provides Internet ad serving agencies).
So here we go… I think I’m ready to explain this…
So, say Allure.com runs a banner ad at the very top of their website. And say, Allure has content on their site below the banner ad (such as a rich media file) that takes a long time to load (say 10 seconds or so) and the visitor to the site gets impatient and exits the site. At this point in time, it is possible that because the tracking code was placed at the BOTTOM of the page, the tracking code did not load and thus, it was not able to count the visit. However, while Allure.com was not aware that there was even a visitor on the page – the ad from DoubleClick was still served and received an impression. This information would be valuable to a publisher. Especially when they are getting paid for these Ad’s to be displayed. Right? Profit is in the numbers and it doesn’t hurt to make them as accurate as possible.
So, that’s my point on why it’s important. Here’s a bit of a brief history on the new vs old code:
So, even if you are not using Ad serving agencies; from an SEO perspective, with Google organic search now penalizing websites with a slower load time, it’s important to keep your site running up to speed (if you want to remain at the top of that SERP). Additionally, for those of you using Adwords the new code is also said to lead to a 100% accuracy in tracking data.
So, for those using the traditional code, I suggest jumping on board with the new. (Though funny enough, spy on my source code, and you’ll see I’m missing Google Analytics entirely) I probably need to get on that in 13′.