Articles in The 'ga-tracking-code' Tag

November 22 2013

Say Goodbye to Three Old Friends: urchinTracker, pageTracker and gaq.push!

by Theo Bennett

For a long time now there has been a question hovering around just when or if Google would pull the plug on the tracking technology that started it all: Urchin tracker  (also known as Urchin.js.)  Urchin.js was the original tracking technology that powered Google Analytics.  It was the beautiful code that we all knew and loved, but was subsequently replaced by the more nimble variations of GA.js; first in a synchronous snippet and later an asynchronous version.  That was replaced earlier this year by Universal Analytics and its analytics.js collection methods.

Each iteration brought new features and enhancements that could only be used by upgrading the tracking snippet on your site to a new version.  So the question was always there: How long will Google Analytics continue to allow data to be collected by an eight year old version of the tracking technology?  Not only has Urchin.js been around a while but with the launch of analytics.js — it was now several generations behind.

Read More

April 13 2009

The 6 Benefits of migrating to GA.js

by MoreVisibility

It’s official – urchin.js is not “going dark” anytime soon. However, that doesn’t mean that you shouldn’t upgrade your website’s Google Analytics Tracking Code to the newer, fresher, more dynamic GA.js tracking module. Sure, you can continue to use urchin.js and your data will still be collected and appear in your reports. However, there are not one, not two, but six benefits of spending a bit of time editing your footers, includes, or hard-coding your HTML source code to include the GA.js tracking script.

Let’s review these six great benefits one by one:

1. A Faster and Smaller Source File – Even though the actual sizes of the files are almost identical at 22.1 KB, the urchin.js file is over 600 lines long and is slower, less efficient. The ga.js file is a mere 41 lines long and is a very modern object-oriented tracking model. See them for yourself (Download urchin.js | Download ga.js). Think of this like you would think of two of the same car – for example – two Toyota Corollas, one from 1995 and the other from 2009. They both weigh about the same, but one is much more modern, environmentally sound, and better on gas than the other one.

2. Automatic detection of HTTPS – This saves a boatload of programming and coding time. Simply insert ga.js across all of your website’s pages without having to worry about coding differently for those secure pages that are being uploaded to the secure server. GA.js will automatically detect the protocol – urchin.js cannot do this unless you physically edit the tracking code.

3. Increased Namespace Safety – What this means in the most basic of layman’s terms is that ga.js does a better job in protecting your individual security (in terms of data) than urchin.js can. While ga.js never collects personally-identifiable information, such as zip codes or personal email addresses, it still needs a way to uniquely identify each visitor that accesses a website, which ga.js does in a safer way.

4. More convenient for tracking Ecommerce transactions – With ga.js, you can simply add the calls to _addTrans, _addItem, and _trackTrans right after the call to _trackPageview within the tracking code. There is no need for additional scripts or onLoad events like there is with urchin.js.

5. More customizable code for AJAX-based sites – The ga.js tracking code opens the door for “Web 2.0” websites that are loaded with videos, applets, widgets, and flash movies. This is almost not possible to do with urchin.js.

6. Take advantage of tracking functionality as it is added to Google Analytics – New, jazzy features such as Event Tracking can only be used if the website is using ga.js. The web is becoming less and less static with each passing day, and the need is increasing for being able to track actions on movies and flash games that are on many websites today. With urchin.js, this is not possible. Also, as new reports and sections are added to Google Analytics, you will need to be using ga.js to be able to take advantage of them.

Is migrating to urchin.js required? No, it is not. Is it highly recommended? Yes, positively it is.

November 14 2008

Che Sta Accadendo? Another change to the GA Tracking Code?

by MoreVisibility

My Italian friends at have probably already noticed this as well – when I logged in to my Google Analytics account today to create a new profile (using an existing domain), I saw a GA Tracking Code that looked different:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"' type='text/javascript'%3E%3C/script%3E"));
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-XXXXXX-1");
} catch(err) {}

The Legacy Tracking Code (urchin.js) also has been updated to include these new “try – catch” enclosure:

<script src="" type="text/javascript">
<script type="text/javascript">
try {
_uacct = "UA-XXXXXX-1";
} catch(err) {}

It does not appear that any data collection has been affected, which means you most likely won’t have to change any coding on your website, unless Google Analytics officially releases a statement via their blog. However, I am big proponent of having the most up-to-date code on your website if possible, so if these new coding variables stick around for a while, you may want to go ahead and update your website to match.

Also, as a side note, there is a known bug with the Reverse Goal Path report in the Goals section of your Google Analytics profile(s). If you’re noticing some strange data appearing in there – don’t worry, the folks at Google Analytics are well aware of this issue and are doing their best to repair the report, as soon as they possibly can.

© 2024 MoreVisibility. All rights reserved.