Re: How I Added Google Analytics Tracking Code instead of using a plugin
Originally Posted by
DrByte
Simplest way, which doesn't affect any other files, is to create a new file:
/includes/templates/YOUR_TEMPLATE_FOLDERNAME_HERE/jscript/jscript_google_analytics.js and paste your google snippet in there.
All of the /includes/templates/YOUR_TEMPLATE_FOLDERNAME_HERE/jscript/jscript_****.js files will automatically be inserted before the </body> tag.
Hi DrByte,
I have a new 1.5.7c install using Responsive_Classic.
I installed my google analytics code as you suggested by creating the jscript_google_analytics.js and adding the code to it in /includes/templates/responsive_classic/jscript/.
The google analytics wasn't reading the conversions correctly and after speaking with their tech support, they advised me to paste the code in /includes/templates/responsive_classic/common/html_header.php just ABOVE the </head> tag, before line 215.
After doing so, they advised they can now see it working.
I asked them if I should remove the google .js file I created but they said to leave it.
Was their suggestion of where to input the code correct?
Also, is there really a point of leaving the .js file to run on every page?
*Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!
Bookmarks