I noticed recently that Google has updated it's client side JavaScript tracking code.  I decided to migrate one of my domains today.

If you use Google Analytics extensively then you'll definitely want to read the migration guide.

What are the benefits of migrating:

  • Faster, smaller source file
  • Automatic detection of HTTPS
  • Increased namespace safety
  • More convenient set up for tracking ecommerce transactions
  • More customizable code for interactive Ajax-based sites
  • Enjoying new features and reports as they roll out

New Tracker Code

For the basic global tracker code use the following (replace unique code with yours!):

   1: <script type="text/javascript">
   2:     var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
   3:     document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
   4: </script>
   5:  
   6: <script type="text/javascript">
   7:     try {
   8:         var pageTracker = _gat._getTracker("UA-XXXXXXX-X");
   9:         pageTracker._trackPageview();
  10:     } catch (err) { }
  11: </script>

Posted in: SEM  Tags: ,

Calendar

«  March 2010  »
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234
View posts in large calendar

Authors

Recent Comments

Banners

Theme Grabber
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 Dan Gibbons .Net Developer