![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
In order to use Google Analytics, you need to register an account first. Then create a website profile for it. Finally, you need to insert the tracking code into your website. There are 2 tracking codes currently - Legacy Tracking Code (urchin.js) and New Tracking Code (ga.js). Be sure to use the New Tracking Code (ga.js) because it can gain access to a wide range of exciting new features as they become available.
So where should I put it? You should put it into every webpage you want to track immediately before the </body> tag. Most of the websites use a footer template to display the bottom website layout. Just copy and paste the tracking code there.
Example, put the code right before </body>
<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-xxxxxxx-x”);
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>
Related Topics:
Read other Google Analytics related posts
Tags: tracking code
2 Responses
Najmi
July 1st, 2008 at 11:55 pm
1footer.php?
oic, got it! thank you so much for the info!
^^
Jayce
July 2nd, 2008 at 5:58 am
2You are most welcome.
RSS feed for comments on this post · TrackBack URI
Leave a reply
Categories
Archives
Sponsored links
Community links
Please support me...