Monday, April 13, 2009

What is the best place to put google analytics html into your website or blog?

please let me know where it goes on a website, wordpress and typepad blog.


This is the official answer from Google Analytics Help:

How do I add tracking code to my website?

Note: This article is for the latest version of the tracking code. If you are using the older version, please read the following article.

To determine which tracking code you are using, please see Which version of the tracking code am I using?

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.

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

document.write(unescape("%3Cscript src=http://answers.yahoo.com/question/'" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")...

var pageTracker = _gat._getTracker("UA-xxxxxx-x");

pageTracker._trackPageview();

You'll need to update the "xxxx-x" in the sample above with your own Google Analytics account number. You can access your personalized tracking code in its entirety by following the instructions in Where can I find my tracking code?. For secure pages, please read How do I obtain tracking code for secure pages?

Jaime Montoya

webmaster@jaimemontoya.com

http://www.jaimemontoya.com

You put it into the html source code. - Just before the tag.... I think.

If you don't know what the '' tag is. - I'd strongly recommend you give up on the whole analytics thing...

No comments:

Post a Comment