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?
Google Analytics
Re: Google Analytics
Put {literal} before the script tag and then {/literal} at the end of the code.
Re: Google Analytics
This has been discussed before, do a search before you post, it saves everyone time.
Re: Google Analytics
Thanks for the answers and prompt response. Ya know, I'd done what I thought was a thorough search for posts on the subject but was unable to find anything. Can you show me where the previous responses are?
Again, many thanks!
Again, many thanks!
Re: Google Analytics
Tuneden,
Here is your answer: http://forum.cmsmadesimple.org/index.php?topic=27487.msg133232
Next time you might want to search using google. In this case, a simple search for "Google Analytics site:forum.cmsmadesimple.org" (http://www.google.com/search?q=Google+Analytics+site%3Aforum.cmsmadesimple.org) would have given you what you are looking for.
Happy CMSMS-ing!
/Z
Here is your answer: http://forum.cmsmadesimple.org/index.php?topic=27487.msg133232
Next time you might want to search using google. In this case, a simple search for "Google Analytics site:forum.cmsmadesimple.org" (http://www.google.com/search?q=Google+Analytics+site%3Aforum.cmsmadesimple.org) would have given you what you are looking for.
Happy CMSMS-ing!
/Z