Adding Google Analytics or Google Tag Manager
There are many analytics services available. One popular one is Google Analytics.
These instructions apply for any vendor, not just Google. Substitute their name in the filename below.
The simplest way to install this basic code snippet is:
- create a new file on your server:
- paste the snippet from Google in that file
(If you’re putting up a snippet for a different vendor, name the file
Advanced e-commerce analytics
On the Zen Cart plugins library you will find some ecommerce-specific plugins for Google Analytics which capture product/sale data in greater detail and transmit those to Google as part of their Analytics mining of your site.
If you install one of those plugins, you should delete the “basic” code snippet file mentioned above, else you will get conflicting data. Simply use one or the other, not both.
Google Tag Manager
If you are using Google snippets for things beyond just Analytics, you can install the Google Tag Manager snippet in the following way. Remember: this REPLACES the basic snippet file mentioned for basic analytics above.