Use this guide to learn how to remove your existing GTM code from your store before completely switching.
If you've previously set up Google Tag Manager on your site, you will need to remove your old implementation to prevent duplicate tag firing.
The two most likely places you've implemented GTM previously are:
1. Via your theme.liquid
You can verify this by going to your Admin > Online Store > Themes > Current Theme > Actions: Edit Code > View theme.liquid file
You should have two instances that need to be removed:
- The global <script> in the head
- The global <noscript> at the bottom of the body
Here is what it would look like in the head:
Here is what it would look like at the bottom of the body:
If this is how you have GTM implemented, then you'll need to remove these AFTER you have our GTM container imported and the GTM configuration ID setup in the app settings here:
2. Via Google Analytics additional settings
The other common method that many Shopify stores implement GTM is via the additional script settings for Google Analytics which is found in Admin > Online Store > Preferences:
If this is how you have implemented yours then you can simply remove this and save.
Worried You’re Making Decisions on Data You Can’t Trust?
Check out our blog and discover Shopify Optimization & Analytics Tips from Elevar's data experts.