Add to Google Add to Bloglines Add to Newsgator Add to Yahoo! Contact ROI Revolution Sign Up for the ROI Newsletter Unofficial Google Analytics Blog Feed Unofficial Google Analytics Blog
Unofficial Google Analytics Blog by ROI Revolution

Categories Search This Blog Blogroll Archive

| |

January 4, 2008

Should You Join the Migration? urchin.js Migrates to ga.js

By Caitlin Minteer, Google Analytics Support Tech
Should I Migrate to New Google Analytics Script?

In mid-October Google announced the beta release of the new tracking code: ga.js. Then, in December, they released the new code to all Google Analytics users. So you might have noticed, within Google Analytics, that there is now a tab labeled 'New Tracking Code' within the Profile Settings > Tracking Code section.

You may be thinking, "Why should I care?" Well, here are a few reasons why the migration to ga.js is practically inevitable for those of you who want to remain on the cutting edge of the latest and greatest technology. And why, for those of you who don't want to rock the boat, it may not be necessary to switch over... yet.

With the upgrade to ga.js you will have access to several new features including Event Tracking, and Outbound Link Tracking.

Event Tracking will be especially useful for those who have Flash based sites, or for those who use multimedia on their site. An "event" is an action that a user takes on a webpage that doesn't necessarily involve a new pageview. Examples include clicks on buttons or images, navigation in embedded Flash, or Ajax events, like moving a map in Google Maps, or applying a label in Gmail.

Outbound Link Tracking will tell you which links visitors clicked on your site that direct them to another site without the manual tagging. This means that instead of adding urchinTracker to each and every one of your outbound links to see where visitors are going once they leave, you don't have to do anything.

A few other benefits of the updated ga.js include:


  • Faster, smaller source file - which will allow for a faster download time

  • Object oriented - instead of using functions

  • Automatic detection of HTTPS

  • Increased namespace safety

One question seems to keep surfacing about the migration, so I will go ahead and address that now. The new Google Analytics tracking code (ga.js) will NOT work with the previous tracking code (urchin.js). They are not compatible, so all pages on your site should be updated with the new code.

So the bottom line: Should you switch to ga.js?

Google is still supporting the urchin.js tracking code, and sources predict that that they'll continue support for another 12-18 months, so if you're happy with the current features and you're not worried about any new releases to ga.js (and the potential discontinuation of support down the line), then you're probably OK for another few months, at least. Eventually, though, you're going to need to switch to ga.js.

If you want event tracking and automatic outbound link tracking, as well as any new features that are released in the future, and you're willing to spend a little time and resources on getting everything set up properly, then you might want to consider joining the migration.

If you're looking for help, Google has written a reference guide for switching over to the code in pdf format, and if you need any assistance from ROI Revolution, an Authorized Google Analytics support partner, be sure to take a look at our Google Analytics support plans and we'll get you on the path to a seamless migration.


Find The Secret To Solid, Sustainable Improvements To Your Website
Learn the insider secrets to making more money from your website than ever before – Guaranteed! Get started right away with the Google Analytics Training Course.

Posted by Caitlin Minteer at 5:17 PM









Filed under:
Technorati Tags:

TrackBack

TrackBack URL for this entry:
/mt/mt-tb.cgi/274.

Comments

My plugin for WordPress already uses the new tracking code, making switching one of the easiest jobs ever. It also allows for a few other tricks like tracking image search queries and outbound clicks, and will be using events as soon as they're out of beta.

Posted by: Joost de Valk at January 7, 2008 2:01 PM

Would astrack.js (http://www.seobook.com/archives/001370.shtml) work with ga.js?

It seems it won't, because at its core astrack.js calls urchinTracker('/asclick');

Is there AdSense Google Analytics tracking script available that is compatible with ga.js?

Posted by: Dennis Gorelik at January 7, 2008 5:42 PM

hold on, i swear it says in GA that you can have both implementations on a site, just not on the same page.. ?

Posted by: Adam at January 7, 2008 8:19 PM

Can you provide some clarity on using the new ga.js code in a "3rd party cart" situation?

There are some differences in the approach suggested by the "Migration Guide" and the Google Analytics help page on the subject.

For the GATC, the Migration Guide (pg. 9) recommends adding:
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);

while the Help page "separate store site" example suggests:
pageTracker._setDomainName("mystore.com");

My guess is that the PDF has the correct code. Can you confirm?

For the link to the 3rd party cart, again 2 methods are described.

The Migration Guide:
<a href="http://newsite.com/test.html" onclick="pageTracker._link('http://newsite.com/test.html'); return false;">click me</a>

The Help page:
<script type="text/javascript">
document.write(
'<a href="javascript:pageTracker._link (\'https://www.securecart.com/?store=parameters\');">Purchase Now</a>'
);
</script>
<noscript>
<a href="https://www.securecart.com/? store=parameters">Purchase Now</a>
</noscript>

Here my guess is that the Help file is correct. Again: Can you confirm the "correct way?"

Thank you for such a though-provoking post!

Posted by: David Burke at January 8, 2008 5:36 PM

Is there any place I can find some details about HOW Google tracks off-site clicks automatically?

I'm interested in the technical implementation--the method Google is using to track off-site clicks.

Posted by: Aaron at January 9, 2008 11:10 AM

@Adam:

You can indeed use both versions of the script on a single site while it's transitioning (although it's not a great idea). I would definitely avoid using both on a single page.

Posted by: Shawn Purtell, Google Analytics Support Tech Author Profile Page at January 10, 2008 2:20 PM

@Dennis:

Any code that contains the urchinTracker() function will not be compatible with ga.js. I don't know if anyone has had a chance to update it yet. I'm sure it won't be long.

Posted by: Shawn Purtell, Google Analytics Support Tech Author Profile Page at January 10, 2008 2:22 PM

@David:

Using ga.js with a third-party cart is just as complex as using urchin.js. Usually, you'll want to set pageTracker._setDomainName("none"); but this will not be the case for all situations, including if you have subdomains. The only way to make sure you are integrating Ecommerce correctly is to have someone look over your Google Analytics setup in a one-on-one environment, as many situations require specific, customized instructions.

Posted by: Shawn Purtell, Google Analytics Support Tech Author Profile Page at January 10, 2008 2:26 PM

The Code which conflicts with ga.js is not functional.. Additionally, Even ecommerce setup for Google analytics does not give accurate reporting, due to deletion of cookies by user etc.. which is about 40% high..

I have another question, about the Google Analytics code, it seems to be reporting null visitors, which is impossible, Has urchin.js stop working...

Posted by: analytics india at January 21, 2008 11:35 PM

@ Analytics India

Urchin.js should still function correctly. It sounds like you may have a problem with your installation, and I recommend you get someone to take a look at it.

Posted by: Caitlin Minteer, Google Analytics Support Tech Author Profile Page at January 23, 2008 9:19 AM

When upgrading from the old GATC(urchin.js) to the new GATC(ga.js), is there any loss of reporting data collected under the old GATC implementation?

Posted by: Jim at March 18, 2008 9:03 AM

@Jim: urchin.js and ga.js use the same cookies. When you're making the switch, as long as none of your pages go live without either tracking code, you should be fine.

Posted by: Jeremy Aube, Google Analytics Support Tech Author Profile Page at March 18, 2008 10:55 AM

Post Your Comments

Post a comment

Contacting ROI Revolution

Telephone Number:
(919) 832.3233
ask for Meredith Smith

Office Fax:
(919) 828.3282

Address:
400 Oberlin Road
Suite 200
Raleigh, NC 27605


Authorized Google Analytics Consultant

Google Analytics Certified Service and Support Consultant


Free Webinar!

Join a Live FREE Google Analytics Training Webinar
Register now to learn how to
turn Google Analytics into
pure profit! You'll learn how to use many of the key reports, a ten-step system for properly configuring Google Analytics on your website, and how to apply what you learn to the attainment of your online goals. Register for our free Google Analytics training webinar today.


Subscribe to the
ROI Revolution Google
Analytics Newsletter today

Free monthly email publication that contains valuable, practical tips, secrets, and much more! Subscribe to our free Google Analytics newsletter today.


Looking to Purchase
Urchin 5 Software or Fee
Based Support?

We are a Urchin software certified service and support partner! Buy Urchin 5 software, profile packs, load balancing modules, campaign tracking, or fee-based support today.