Google Analytics Code Changes

Most would have seen this coming after the purchase of Urchin by Google, it is time to brand the urchin product as Google, wipe every trace of Urchin. What is changing? Everything, Should you change? Well you have till December 2008. First off, let’s look at what the change is, its benefits, how to make the change and how to confirm everything is well, which is the scope of this article.

In a nutshell the code you have today for Google Analytics looks like along with the new code:
 
Old and new google codes
 

Beside the branding change and the cutoff for the old code, there are benefits to the new code. The new code is faster, smaller, automatically detects HTTPS vs HTTP calls and most importantly supports event tracking.

What is event tracking? In the former Urchin code if you want to track downloads of a file or views of a video, this is done by simulating the event as a page view. Here is an example of how the code would look like:

Analytics code tracking for file urls

But this is really infective and pollutes the meaning of page view numbers and reporting. Event tracking is a new area with Google Analytics and these newer features once released would only be available to the new Analytics code users. This is by far the number one real reason you should change to the new codes.

 How to change?  Login to your Google Analytics, click on the edit link for your domain, then click on the Check Status link (top right hand corner next to receiving data). You will see two tabs, one called Legacy Tracking (urchin.js) and the new one called New Tracking Code (ga.js). Here is how the tab looks:

New Analytics code look

New replace the old codes through out your site with the new ones. If you are on Drupal and using the Google Analytics module, you will need to disable this module then create a block and add it through out your site. If you use Dream weaver you can use the search replace function from the old code to the new codes.

 

You cannot merge or use the old codes and the new codes on your site – you got to stick to one for Google Analytics to work properly. You can confirm that your site is implemented fully here using Sitescanga.

 

Takes a few minutes to scan large sites and the at the end you get a report card like this on percentage completion, along with files where the code isn’t installed properly.

Google Analytics Score card

 

If you don’t have Google Analytics or any other web click analysis software, then create a free account. Very few analytics software have the capabilities offered by Google – and that goes for many that you pay $20/month or more. If you are worried that Google would have access to your site usage, well – there are other ways to collect this information any way from search. Sypfu is a good example of such. Stop worrying about Google sneaking your site statistics and start measuring your sites conversions. Here is a link to my  favorite Google Analytics blog by Justin Cutroni.

Average rating
(3 votes)

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Free 30 Day Course
with Videos To Increase
Your Site Traffic & Conversions

First Name
Primary e-mail
Our Strict Privacy Policy keeps
your e-mail safe and secure.