Implementing google analytics into CMSMS
Implementing google analytics into CMSMS
Hi all,
As complete newbee to the CMSMS system, I would like to ask you for help. I was asked to install a google analytics code into a running CMSMS, can anyone tell me where to place the code?
Thanks in advance!
Regards
Grin
As complete newbee to the CMSMS system, I would like to ask you for help. I was asked to install a google analytics code into a running CMSMS, can anyone tell me where to place the code?
Thanks in advance!
Regards
Grin
-
- Power Poster
- Posts: 424
- Joined: Sat Feb 02, 2008 12:42 am
- Location: USA
Re: Implementing google analytics into CMSMS
Follow Google's instructions. Place the code just before your tag. You may have to enclose it in {literal}{/literal} tags if it contains {} curly brackets.
Take a penny, leave a penny.
Re: Implementing google analytics into CMSMS
You should put this in your templates as described by Ziggywigged. This way you will be able to track all pages on the site.
Shane
Shane
Re: Implementing google analytics into CMSMS
Like so.
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("#");
pageTracker._trackPageview();
} catch(err) {}
It's even more transportable by putting the Google code in a "Global Content Block" then apply the GCB to the templates.
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("#");
pageTracker._trackPageview();
} catch(err) {}
It's even more transportable by putting the Google code in a "Global Content Block" then apply the GCB to the templates.
-
- New Member
- Posts: 3
- Joined: Mon Dec 21, 2009 11:29 am
Re: Implementing google analytics into CMSMS
Guys, not sure if anyone's aware but Google have recently rolled out a new version of their tracking code:
http://code.google.com/apis/analytics/d ... cking.html
The main difference on the integration side is this script is now placed in the tag rather than the .
The company managing our website is having difficulties in getting this asynchronous code in the tags - they are finding that CMSMS changes the code when the template is saved.
Is anyone else having these issues? Can anyone confirm whether they've had any success with the new version?
http://code.google.com/apis/analytics/d ... cking.html
The main difference on the integration side is this script is now placed in the tag rather than the .
The company managing our website is having difficulties in getting this asynchronous code in the tags - they are finding that CMSMS changes the code when the template is saved.
Is anyone else having these issues? Can anyone confirm whether they've had any success with the new version?
Re: Implementing google analytics into CMSMS
I checked google and I don't see new code that has to be put in the head.
Here's the article from Google Analytics when creating a new site
Copy the following code, then paste it onto every page you want to track immediately before the tag.
Learn more (Link Below)
http://www.google.com/support/analytics ... &utm_id=ad
Things you can try
Make sure you have the WYSIWYG off for Global content blocks. This function is in the Admin settings or global page settings I think.
Put the code in a Global Content block.
Wrap the code in a {literal}Code Here{/literal}
Add the GCB to the template just before the tag
If you need the WYSIWYG on Global content blocks then enable the function once you done adding the code for analytics and don't edit that Global content block again.
Here's the article from Google Analytics when creating a new site
Copy the following code, then paste it onto every page you want to track immediately before the tag.
Learn more (Link Below)
http://www.google.com/support/analytics ... &utm_id=ad
Things you can try
Make sure you have the WYSIWYG off for Global content blocks. This function is in the Admin settings or global page settings I think.
Put the code in a Global Content block.
Wrap the code in a {literal}Code Here{/literal}
Add the GCB to the template just before the tag
If you need the WYSIWYG on Global content blocks then enable the function once you done adding the code for analytics and don't edit that Global content block again.
-
- New Member
- Posts: 3
- Joined: Mon Dec 21, 2009 11:29 am
Re: Implementing google analytics into CMSMS
Hi sugna, this was announced on the 1st December on the analytics blog
http://analytics.blogspot.com/2009/12/g ... cs+Blog%29
I did mention the direct link showing the new code snippet (-----> http://code.google.com/apis/analytics/d ... cking.html). I'm using this new version on a personal website and it tracks fine so it is definately live.
Here's the migration guide anyway
http://www.google.com/support/analytics ... swer=76305
Thanks for your help
http://analytics.blogspot.com/2009/12/g ... cs+Blog%29
I did mention the direct link showing the new code snippet (-----> http://code.google.com/apis/analytics/d ... cking.html). I'm using this new version on a personal website and it tracks fine so it is definately live.
Here's the migration guide anyway
http://www.google.com/support/analytics ... swer=76305
Thanks for your help
Re: Implementing google analytics into CMSMS
Sorry read over the link.
Thanks
Thanks
Re: Implementing google analytics into CMSMS
If you wrap it in {literal}{/literal} then it will not be modified by CMSMS.
Re: Implementing google analytics into CMSMS
Once again...
Anything that is not a tag or module call that uses { } in it needs the {literal} {/literal} tags wrapped around it if not smarty will think it's something to parse and will spit out error/warnings...
This is explained in most all of the default templates...
Anything that is not a tag or module call that uses { } in it needs the {literal} {/literal} tags wrapped around it if not smarty will think it's something to parse and will spit out error/warnings...
This is explained in most all of the default templates...
-
- New Member
- Posts: 3
- Joined: Mon Dec 21, 2009 11:29 am
Re: Implementing google analytics into CMSMS
Well thanks a lot for your help Kendo and Dr!
I don't have anything to do with administering the templates myself, being more involved with the content side and analysis through Analytics.
I'll pass this info on to the relevant person.
Cheers,
Happy New Year
I don't have anything to do with administering the templates myself, being more involved with the content side and analysis through Analytics.
I'll pass this info on to the relevant person.
Cheers,
Happy New Year

Last edited by analytics_fan on Fri Jan 01, 2010 11:00 pm, edited 1 time in total.