[SOLVED] Problem w Global Cont Blck- Google analytics/script

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

[SOLVED] Problem w Global Cont Blck- Google analytics/script

Post by fearmydesign »

Hello all, I have done this many times before, not sure why it's not working now. I put the Google Analytics code into a Global Content Block and then call that block right before the </head> on my template, but it's not being recognized by Google, and when I do a View Source, it is missing the (Function({?})

Site: http://www.LimoServicesMaryland.com
CMSMS ver: 1.9.4

I even tried using {literal} inside the Global Content Block for the google code, but nothing!

Any ideas? Thank you
Last edited by fearmydesign on Thu Mar 10, 2011 10:37 pm, edited 1 time in total.
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Problem with Global Content Block - Google analytics/scr

Post by Wishbone »

Did you disable WYSIWYG, by turning off 'Use WYSIWYG' not 'Turn WYSIWYG on/off'.. Slight, but important distinction there. You will certainly need {literal}
uniqu3

Re: Problem with Global Content Block - Google analytics/scr

Post by uniqu3 »

In GCB's you can deactivate WYSIWYG, please do that and wrap the google code inside {literal} {/literal} and it should work.

Edit: ups Wishbone, posted at same time :-)
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Re: Problem with Global Content Block - Google analytics/scr

Post by fearmydesign »

Did you disable WYSIWYG, by turning off 'Use WYSIWYG' not 'Turn WYSIWYG on/off'.. Slight, but important distinction there. You will certainly need {literal}
Yes I did, I always do this (on/off) for scripts/literals... thanks
In GCB's you can deactivate WYSIWYG, please do that and wrap the google code inside {literal} {/literal} and it should work.
..hmmnn... this is weird... I deactivated the GCB like you suggested, added the {literals} and it worked... how? I never had to do this before... but thank you.

...BTW I went back and activated the GCB again, and it's still working... O0
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
simon.romin
Forum Members
Forum Members
Posts: 65
Joined: Tue Jul 13, 2010 9:31 am

Re: [SOLVED] Problem w Global Cont Blck- Google analytics/sc

Post by simon.romin »

Hi guys

I'm experiencing this exact same problem.

I have put my <head> tag in a GCB called {global_content name='head'} because I have multiple page templates. WYSIWYG is turned off on GCB.

Google Analytics has been reporting 'Tracking Not Installed' for at least 48 hours.

The only thing I can try now is the {literal} tags that I haven't done this yet. Do I put the {literal} tag before or after Google Analytic's <__script__> tags?

Is there anything else you can suggest?
simon.romin
Forum Members
Forum Members
Posts: 65
Joined: Tue Jul 13, 2010 9:31 am

Re: [SOLVED] Problem w Global Cont Blck- Google analytics/sc

Post by simon.romin »

Hey guys,

Just to let you know that my Google Analytics works now.

For anyone else experiencing problems with Google Analytics tracking - especially when their code is in a Global Content Block - try using the {literal} and {/literal} tags immediately before and after the GA code.

Google isn't reporting as many hits to my site as my usual tracking software does, but I will give it a week to see how they compare.

Hope that helps someone along the line.
Post Reply

Return to “Modules/Add-Ons”