.blog 

Ok, well you don’t *need* to yet, but Google is rolling out a new tracking code, which will replace the long-lived urchin.js script, to a new, lighter, more customizable ga.js script.
The new code will let you benefit from a bunch of new features now, and in the future, as they won’t be rolling out any new features to sites using the current tracking code. The current code will continue to function for at least a year from the time they release ga.js.
Among the immediate features are a bunch of customization options to the script, such as cross-domain tracking, file download tracking, better e-commerce tracking and better virtual page tracking as well as automatic HTTPS detection, and a smaller, faster loading source file.
All you need to do is change this:
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-12345-1";
urchinTracker();
</script>
to:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-12345-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
Obviously changing the red tracking number to your own.
Google has a more detailed integration guide, with info on how you can customize this code further for different uses here.
Important! Don’t use ga.js and urchin.js on the same page. They won’t work.
archive


















