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>
fe660e26-fd6b-43e6-888f-3ac3d130c5de|0|.0