top of page

Visionary Ads

How to install GTM code on a Shopify site?

  • Ads & Fun Team
  • Mar 29, 2021
  • 2 min read


What you need:

  • GTM container code or GTM account access (see "Where can I find the Google Tag Manager code?" if needed)

  • Access to the Shopify admin panel with permission to edit the site theme

  • It is advisable to install the browser extension - Google Tag Assistant (to check if GTM code has been installed successfully);


Steps:


Step 1: Log in to the admin panel of your Shopify site (https://www.shopify.com/). Go to the section "Online Store" -> Themes. In the “Current Theme”, click "Action" and select "Edit code".


Step 2: Find the section theme.liquid


Step 3: Copy the first part of your GTM code and paste it anywhere between <head> and </head> (the closer to the top of the page, the better).


Step 4: Copy the second part of your GTM code and paste it anywhere between <body> and </body> (the closer to the top of the page, the better). Click on “Save”.


Step 5: (optional) Go to the website and use the Tag Assistant to check if the GTM code has been added.


 

Note: In the same way, you can add any custom tracking code to your Shopify site - gtag, FB Pixel, Call Tracking, etc. (but I recommend adding all other codes via GTM).



See Screenshots:


Step 1: Log in to the admin panel of your Shopify site (https://www.shopify.com/). Go to the section "Online Store" -> Themes. In the “Current Theme”, click "Action" and select "Edit code".

Step 2: Find the section theme.liquid


Step 3: Copy the first part of your GTM code and paste it anywhere between <head> and </head> (the closer to the top of the page, the better).


Step 4: Copy the second part of your GTM code and paste it anywhere between <body> and </body> (the closer to the top of the page, the better). Click on “Save”.


Step 5: (optional) Go to the website and use the Tag Assistant to check if the GTM code has been added.

(refresh the page after enabling Tag Assistant)


Comments


bottom of page