How do I add tracking code to my website? (Official Google Web site)
Copy and paste the code segment into the bottom of your content, immediately before the tag of each page you are planning to track. If you use a common include or template,
you can enter it there. (Wrong official new Google tracking code)
<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>" );
var pageTracker = _gat._getTracker(“UA-xxxxxx-x”);
pageTracker._initData();
pageTracker._trackVisit();
</script>
You'll need to update the "xxxx-x" in the sample above with your own Google Analytics
account number. (But this code will not work because there is a problem with new Google tracking code)
Google messed up the ga.js installation instructions, you will need to cut out all the HTTP/HTTPS auto-detection including the
document.write and just use the version you need.