• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Google analytics
PostPosted: Tue Apr 01, 2008 2:01 am 
Offline
New Member

Joined: Tue Apr 01, 2008 1:57 am
Posts: 2
I'm trying to put the Google Analytics code on each page of my website and it says to put it before but the only place I could find that was on the hompage template - anyone know how I go to each page in CMS Made Simple to be able to paste this in each page? It's probably a very easy thing to do, sorry!!


Top
 Profile  
 
 Post subject: Re: Google analytics
PostPosted: Tue Apr 01, 2008 7:15 am 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4821
Location: Ferrara, Italy
Small World Books wrote:
I'm trying to put the Google Analytics code on each page of my website and it says to put it before but the only place I could find that was on the hompage template - anyone know how I go to each page in CMS Made Simple to be able to paste this in each page? It's probably a very easy thing to do, sorry!!


Add your code in all (used) templates of Layout > Templates
Pages use that templates

TIP: surround your javascript code with {literal} {/literal} tag

Alby

_________________
CMSMS Support Team
Italian Admin and Moderator

Plugins: Geolocate hostip, Multiple random image, Image rotator (beta), Content Pagination
Modules: ForumMadeSimple (Howto), TranslationManager
Multilingual: MLE is not CMSMS


Last edited by alby on Tue Apr 01, 2008 7:18 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Google analytics
PostPosted: Wed Apr 02, 2008 7:40 am 
Offline
New Member

Joined: Tue Apr 01, 2008 1:57 am
Posts: 2
Wow - thank you SOO much - it's so easy when you know how! I really appreciate your help, thanks again!!
:)


Top
 Profile  
 
 Post subject: Re: Google analytics
PostPosted: Fri Apr 04, 2008 4:03 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 5951
Location: Fernie British Columbia, Canada
another tip would be to place your javascript code in a global content block
and then just call that global content block from the 'global metadata' field in the site preferences.

Then so long as you have
{metadata} in your page templates.... the google analytics code will get inserted.

_________________
Follow me on twitter
For quality help follow these instructions:
a) Think about the problem for an hour
b) research the problem for an hour
c) spend 1/2 an hour explaining it and providing as much information as you can muster
(too much information is okay, not enough information may get your question ignored).
--
if you can't bother explaining your problem well, why should we bother helping with it.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
 Post subject: Re: Google analytics
PostPosted: Thu May 15, 2008 3:22 pm 
Offline
New Member

Joined: Thu May 15, 2008 3:15 pm
Posts: 1
Could someone please explain me in detail how to:
  • add javascript in to global content block
  • call that global content block from the 'global metadata' field in the site preferences

Thanks,
Pontikka


Top
 Profile  
 
 Post subject: Re: Google analytics
PostPosted: Thu May 15, 2008 4:06 pm 
Offline
Power Poster
Power Poster

Joined: Sat Feb 02, 2008 12:42 am
Posts: 424
Location: USA
I may be wrong on this but I believe google requires the js be placed right before the closing body tag so alby's recommendation may work best.

_________________
Take a penny, leave a penny.


Top
 Profile  
 
 Post subject: Re: Google analytics
PostPosted: Thu Jan 08, 2009 8:49 am 
Offline
New Member
User avatar

Joined: Wed Jan 07, 2009 12:07 pm
Posts: 3
Very nice!
The "literal" code makes it work!!! I tried a thousend times, but only had errors - now it works!
What the heck makes Google-Code literal... ;-)

Greetings


Top
 Profile  
 
 Post subject: Re: Google analytics
PostPosted: Thu Jan 08, 2009 6:04 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 10678
Location: Arizona
When you put something in your template/page that uses {  } in it and isn't a module/tag call smarty trys to parce it as one so you need the {literal} to make it know it's not that kind of call, this is true no matter where you put it...

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get it's parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/

Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner