Google Tag Manager

Permalink
I would like to start using the google tag manager. Therefor, I need to add the code AFTER the FIRST <body> tag. Now, in the CMS I can only add code in the header or footer..

Can Concrete5 solve this? Is there a solution?

kandeweg
 
RobShaver replied on at Permalink Reply
RobShaver
I'm looking at adding Google Tag Manager tracking too. I'm running a custom template (theme_csl) on all my sites. The body tag is added in this file (on my system at least):

\public_html\packages\theme_csl\themes\csl\elements\header.php

I'm planning to paste the code right into that PHP file after the head tag and before any others. I'll have to do that only once for each web site so that's not too bad.

After I try this out I'll post again about how it worked out.
kandeweg replied on at Permalink Reply
kandeweg
Interesting, please share your experiences. thanks!
STR replied on at Permalink Reply 2 Attachments
After lots of reading, I found it is actually quite simple, and so far everything seems to be working. As mentioned above, you need to edit the header.php file. I used "Filezilla" to access and edit my file. **WARNING: Always backup your files before making any changes so you can revert back to a working version if necessary!**

Since I am using an add on theme, my header.php file is located at
/YOURWEBSITEHERE.COM/packages/YOURTHEMENAMEHERE/themes/YOURTHEMENAMEHERE/elements

Paste your GTM code IMMEDIATELY After the "<Body>" no spaces, no lines... See attached before and after screen shots. Save your new version and upload to server. Refresh your internet browser and look at the source code for all you webpages and the code should be there!

Good Luck! Thanks to others that have replied also!