Google Analytics Xmas upgrade, yay ^_^

by

Great news for Google Analytics fans, December 13, 2007 marks the official arrival of the replacement to urchin.js we have all come to know and love (or hate) :)

The urchin.js tracking script has been downgraded to legacy status and should be phased out within the next 18 months or so.

The new ga.js code has a new syntax and comes with all sorts of bells and whistles to make your life easier and, let’s face it, spend more time hooked on GA ;)

Included with this update is the beta functionality that allows for the analysis of multiple metrics directly from the calendar interface. You may now select page views and visits for instance and compare them across time periods or against the entire site.

New tracking code and functionalities

If you look at your Google Analytics interface under Settings > Check Status, you will see that Google now offers both code snippets for the GATC (Google Analytics Tracking Code) that rely on the _getTracker method which generates a page tracking object with a host of new functions.

Here is what the code will look like:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write("\<script src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'>\<\/script>" );
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXXX-XX"); //Don't forget to replace your profile ID!
pageTracker._initData();
pageTracker._trackPageview();
</script>

Note that :

  • urchinTracker is replaced by the _trackPageview function to measure page views as well as custom links (downloads, Flash, Ajax) but still count as an extra page view
  • The _trackEvent method, however, should track custom events without registering an extra page view so it will be ideal for web 2.0 . Note that the event function is still in beta phase and does not include proper reporting as of yet.
  • HTTP/HTTPS selection is now automated based on the page’s current protocol.
  • Other functions include replacement variables for campaign values as well as e-commerce tracking

Links:

Calendar comparison

GA - metric comparison

Keep in mind this is still in beta stage but works good enough for me ;)

Proceed with caution and feel free to ask questions ;)

About these ads

Tags: , , , , , , , ,

9 Responses to “Google Analytics Xmas upgrade, yay ^_^”

  1. Die neuen Google Analytics Tracking Funktionen | Webanalyse & SEO - News Says:

    […] via Web Analytics.be […]

  2. RawkMedia Web Design - Google Analytics Xmas upgrade, yay ^_^ Says:

    […] Google Analytics Xmas upgrade, yay ^_^ Great news for Google Analytics fans, December 13, 2007 marks the official arrival of the replacement to urchin.js we have all come to know and love (or hate) The urchin.js tracking script has been downgraded to legacy status and should be phased out within the next 18 months or so. The new ga.js code has […] […]

  3. Justin Cutroni Says:

    Hi Julien,

    Great post. I noticed that you got the word out yesterday, nice job!

    I wanted to point out one thing. There is no _trackVisit method. When ga.js was in very early beta _trackVisit was the method that generated pageviews. Then Google changed the name of the method to _trackPageview. So, to summarazine:

    urchinTracker = _trackPageview
    _trackVisit does not exist!

    Best,

    Justin

  4. Julien Coquet Says:

    Thanks for the heads-up Justin ;)
    I edited the post accordingly.

  5. Beautiful Minds Says:

    I thik i should also give a try.!

  6. Pete Says:

    Hi there! So, if I previously used the old script, can I just replace the old for new and everything will be ok? I don’t want to lose my old analytics data in my account – will this happen? I can’t find any information on migrating to the new code in the help pages at Google Analytics.

    Your help would be really appreciated.

    Pete

  7. Julien Coquet Says:

    Hi Pete,

    you’re correct, you have to replace your old GATC with the new one.

    if you follow the links I provided in this post, you will notice Google provides a comparison and migration guide in PDF format.

    Enjoy!

    Julien

  8. Websenat » Google Analytics Tracking Code Methods Says:

    […] Informationen & Via: Google Analytics Tracking Code API | Web Analytics .be Blog | Web Analytics Inside | Google Analytics Help Center Sociable Bookmarks: Diese Icons verzweigen […]

  9. Google Analytics Xmas upgrade, yay ^_^ Says:

    […] Robert wrote an interesting post today onHere’s a quick excerptGreat news for Google Analytics fans, December 13, 2007 marks the official arrival of the replacement to urchin.js we have all come to know and love (or hate) The urchin.js tracking script has been downgraded to legacy status and should … […]

Comments are closed.


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: