Google Analytics
Posted: Mon Nov 24, 2008 5:15 pm
I'm having trouble getting the default Google Analytics code installed properly on my CMSMS install. When the following is included in either the template, as a global content block, or as a part of each individual page, SMARTY has difficulty with it.
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"));
try {
var pageTracker = _gat._getTracker("my-account-here");
pageTracker._trackPageview();
} catch(err) {}
Please note: I've intentionally left out my urchin ID from the above block.
Anybody know how to set up a CMSMS for Google Analytics?
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"));
try {
var pageTracker = _gat._getTracker("my-account-here");
pageTracker._trackPageview();
} catch(err) {}
Please note: I've intentionally left out my urchin ID from the above block.
Anybody know how to set up a CMSMS for Google Analytics?