Have you looked at your Google Analytics setup recently? No, seriously. When was the last time you thought about the Google Analytics code mucking up your website? If it's been a while, you might just want to look into it.
Are You Asynchronous?
More times than not, your Google Analytics code is likely a "set it and forget it" type of process. Once it's in your site, you let it be.
Sure, you've gone through various site redesigns. With each iteration, you've remembered to carefully copy and paste the exact elements you need into the new design. But why?
Do you know the recommended Google Analytics tracking code changed just over three years ago? If you've been copying and pasting since then, your code might not be exactly optimized. The modern code uses asynchronous calls.
What does asynchronous mean? Simply put, it means that the code will contact Google's servers and do what it needs to do in the background while the rest of your page continues to load and render in the browser.
Synchronous code (the old version) means that the analytics code must finish executing before the rest of the commands on the page (HTML and what not) can continue.
What Difference Does it Make?
Back in May 2009, just before the change, it made worlds of difference when Google Analytics went down and took out 14 percent of the sites that used the service with it.
Scary stories of your site going down aside, if you want to use any of the cool new features of Google Analytics, like Enhanced Link attribution, you need to use the asynchronous code.
Keep in mind that it's been nearly three years that site speed has been a ranking factor. Waiting for Google Analytics code to execute, hit Google's servers and come back adds to your site's loading time. The asynchronous code allows the rest of the page to continue loading while the Google code is executing which doesn't affect the site speed as much, if at all.
Has Your Analytics Code Reached its Expiration Date?
While keeping your code up to date may seem like common sense, it apparently isn't always the norm. I've been auditing a great many sites as of late and over half of them had out-of-date tracking code.
Maybe I've hit every statistical anomaly and the clients I've taken on recently are all outliers. But I've seen some big brands doing it too. One site still had the really old Urchin code in it:
Even worse, the code started at line 14, above everything in the document, except the title and meta tags.
Urchin is old. If you once had Urchin and your code has been copied and pasted over time, you need to change it. Google provides help for migrating from urchin.js code to the newer, asynchronous tracking code.
Where to Find the Latest Tracking Code
Keeping the latest version of the Google Analytics tracking code on your site is straightforward and easy. You can always copy the code directly from Google Analytics.
From anywhere within Google Analytics, click the "Admin' button. This takes you to the Account Administration area your account.
Once within the account administration area, click of the the properties and select the "Tracking Info" tab. Here, you will find your property tracking ID, site tracking options and other items to help you track your site.
In the middle of the page, scroll and you'll see large, bold lettering that states: "This is your tracking code. Copy and paste it into the code of every page you want to track."
Click once in the box and the code is highlighted. Copy to your clipboard and paste into your website in the <head> area (you'll get more accurate data). It's that easy to stay up to date!
As good site owners, we train ourselves to go through monthly checklists looking for drops in ranking, 404s, proper redirects and other bad things. If you've redesigned your site in the past few years, make sure your Google Analytics code is up to date, too.
Image Credit: Adam Singer
Early Bird Rates have been extended!
June 12-14, 2013: Join industry experts at SES Toronto for a crash course in the latest strategies in Online Marketing and Advertising.
Save $300 when you register by Thursday, May 23.