New Google Analytics tracking code issues

New Google Analytics tracking code issues Google Analytics officially announced the launch of two new features, Site Search and Event Tracking, in October. The Site Search feature has been available since November 2nd on all Google Analytics accounts, but only if the language preference is set to English. This enables users to investigate what visitors have typed in any search box on the site.

On December 13th, the search engine giant announced the new tracking code required in order to have access to Event Tracking reports and other new features that Google has in the pipeline. This new tracking code called ga.js will replace the old urchin.js version. Both tracking codes are incompatible, hence they will not work if placed on the same page. According to the latest information from Google, the old tracking code, urchin.js, will still work for at least one year. As a result, the search engine recommends using ga.js for new sites especially.

Although it is meant to be a quick and simple process, the new tracking code proposed by Google Analytics will not work on if you use an IIS server or Blogger.


So what's new?

The new code is faster as the source file is smaller, easier to use and customize, and allows automatic detection of HTTPS. New features will be available as soon as they come out, whereas the old urchin.js code will not receive any updates on new features.

Tracking code migration

Updating the tracking code should be a relatively simple process: just copy and paste the new tracking code shown below, which should substitute the old version. The unique UA number for your account will need to be entered in place of the XXXXXXX-X.

New Google Analytics tracking code issues







New Google Analytics tracking code issues










Customizing options with the new tracking code

Google Analytics has struggled in the past in terms of flexibility. Reports were usually standard and the ability to customise was fairly limited. In contrast, the new tracking code can be easily adapted to suit the specific needs of any website. For instance, now it's possible to track the number of file downloads, report more accurately on e-commerce transactions or add additional search engines to organic reports. Here is the full list of new customization possibilities:

Cons

Unfortunately, just one day after Google Analytics went public, some anomalies have been detected as the new JavaScript code does not work on IIS servers or when installed on Blogger pages due to XHTML compliance. The tracking code basically generates a script tag inside another script tag for automatic detection of the different versions of the site, whether an HTTP or the HTTPS version, which uses the Secure Server Layer. This can be resolved by altering the new tracking code and either selecting the HTTP or the HTTPS version as the one for which you would like to receive reports. However, this is expected to create confusion, particularly to those members of the public with limited technical expertise and especially for those sites hosted on IIS servers.

If you finally manage to replace the old code without crashing the site, there is still another drawback: the code will make your site fail the XHTML validation.


Conclusion
So the dilemma is whether to add the new GA tracking code or not. Well, it all depends on the server you have, the existing need for advance reports and the technical expertise that might be required in order to tweak the code provided by Google.

In general terms, all existing accounts will have to migrate within a year so the change is not urgent. If you have an e-commerce site, want to track sub-domains or any advanced feature that implies customizing the code, then it is highly recommended. On the other hand, if you have a small or medium size site and you are happy with the existing reports it might be a better idea to wait until Google fixes the existing new tracking code.
  • Print this page
  • Send this page to a friend
  • Digg
  • delicious
  • Reddit
  • Google
  • Twitter
  • Sphinn
  • StumbleUpon
  • YahooBuzz
  • Facebook
  • Mixx

MoreMore

LessLess

MoreMore

LessLess

MoreMore

LessLess
Search engine optimization services from UK industry leader bigmouthmedia
© bigmouthmedia 2010