Google Analytics

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
tuneden
New Member
New Member
Posts: 2
Joined: Thu Sep 25, 2008 9:53 pm

Google Analytics

Post by tuneden »

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?
cb2004
Power Poster
Power Poster
Posts: 317
Joined: Wed Jul 04, 2007 3:39 pm

Re: Google Analytics

Post by cb2004 »

Put {literal} before the script tag and then {/literal} at the end of the code.
hexdj
Power Poster
Power Poster
Posts: 415
Joined: Sat Mar 24, 2007 8:28 am

Re: Google Analytics

Post by hexdj »

This has been discussed before, do a search before you post, it saves everyone time.
tuneden
New Member
New Member
Posts: 2
Joined: Thu Sep 25, 2008 9:53 pm

Re: Google Analytics

Post by tuneden »

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!
Zoorlat

Re: Google Analytics

Post by Zoorlat »

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
Post Reply

Return to “CMSMS Core”