Articles on: EasyGTM

How to check and remove the existing GTM code in your store?

If you previously set up GTM on your site, you will need to remove the old GTM code to prevent the tags from re-firing.

How to find your GTM code?

You need to go to Google Tag Manager first, click on your GTM Container ID, you can see the complete code of GTM as shown in the figure below.




There are two places where GTM is most likely to be implemented:
Via your theme.liquid
Via the Google Analytics setting in "Online Store - Preferences“

Via your theme.liquid

You can verify by following these steps:
Go to Online Store >Themes > Actions > Edit Code > View theme.liquid file







In the theme.liquid file, you need to confirm whether the following two pieces of code belong to your GTM code? If yes, remove them and click “save”.

In the first paragraph, between <head> and </head> at the top of the text, confirm whether there is code similar to the following figure:



In the second paragraph, before </body> at the bottom of the text, confirm whether there is a code similar to the following figure:



Via the Google Analytics setting in "Online Store - Preferences“

The other common method is via an add-on script for Google Analytics, which you can find in Online Store > Preferences . You need to confirm whether there is a code like the one in the picture below. If so, remove them and save.

Updated on: 20/06/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!