View Full Version : Google Analytics - Add to Template
06-12-2008, 07:02 PM
I was thinking of signing up for Google Analytics, I currently have a modified version of the Horizon template and was wondering if someone could tell me whether or not I need the ga.js or urchin.js script? Also, where do I need to add the script, to all template pages? or just to one? Please help!
Thanks in advance!
06-12-2008, 08:44 PM
I use Google analytics with the Urchin script on my own website (thought not with the Horizon template).
You dont have to put the code on every page but only pages that have the code will be tracked.
Hope that helps!
06-12-2008, 09:12 PM
You just have to copy (before the closing body tag) the code you get from google.
Should be something like:
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
var pageTracker = _gat._getTracker("YOUR_TRACKER_NUMBER");
If you want all your sites to be tracked you've got to put the code in all your template files.
06-13-2008, 12:10 AM
Thanks outbackcamera! I will use the urchin script and go for it!
06-13-2008, 12:11 AM
Thanks fadattf I will post the script in my template files and go for it!
06-13-2008, 06:47 PM
I believe that the ga.js code is the newer version so you probably are better off using that. There's more info on the versions in the analytics website.
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.