Logo
  • PolyNotion
Calendly
šŸ®

Adding Google Tag Manager to a Shopify Store

YouTube videos that could help you do this task :

How to install Google Tag Manager on Shopify :

Goal: To add Google Tag Manager to a Shopify store.

Ideal Outcome: Google Tag Manager is properly installed without any technical issues.

Prerequisites or requirements: You need to have Google Analytics on your store. If you haven’t done it yet, you can follow

šŸ’—How to add Google Analytics to a Shopify Store

Why this is important: Google Tag Manager is a great tool to add and manage multiple pixels and tracking codes without needing to edit the code of a site.

**Note: If you want to add Google Analytics to a Shopify store, do not do it through Google Tag Manager but follow :

šŸ’—How to add Google Analytics to a Shopify Store

instead. However, Google Tag Manager is still the most recommended way to deploy other scripts to your Shopify site.

Where this is done: In your Shopify admin panel and Google Tag Manager.

When this is done: Only once—the first time you install Google Tag Manager.

Who does this:

The person responsible for website management or analytics.

  • Environment Setup
  1. Download and install the Google Tag Assistant Chrome Extension (Free)
  • Grab your Google Tag Manager container code
  1. If you don’t have a Google Tag Manager account yet:
  2. Sign up for Google Tag Manager (Free):
    1. You’ll need to log in to your Google account.
    2. You’ll be prompted to set up a Google Tag Manager account right away.
      • You can just use your company/website name for both the account and container.
      • Under ā€œWhere to Use Containerā€, select ā€œWebā€
image
  1. Accept the terms and conditions.
  2. You will see your Google Tag Manager code.

d1. Copy the code without the <script></script> tags, you will need it for the next chapter.

image

d2. Below that you will find another piece of code copy the whole code including the <noscript> tags, you will also need it for the next chapter.

image
  1. Once you are in your Workspace, click on Submit > Publish > Continue to publish your Google Tag Manager container:
image

If you already have a Google Tag Manager account:

  1. Log into your Google Tag Manager account;
  2. On the top header click ā€œAdminā€ → ā€œInstall Google Tag Managerā€
image
  1. Copy the code between the <script></script> tags (do not copy those tags). You will need it in the next chapter.

Important: pay attention to the section of the code being copied. You’ll need to exclude the ā€œ<script>ā€ and ā€œ</script>ā€ tags to follow this process.

image
  1. Below the first snippet of code, you will have a second one, this time copy all the code (including the <noscript> tags. You will also need it for the next chapter.
image

Adding Google Tag Manager to your Shopify Store

**Note: This method allows you to add Google Tag Manager to your whole website in contrast to the official documentation that would only allow you to add GTM to the non-checkout pages unless you are a Shopify Plus customer.

If you are a Shopify Plus customer, follow the official documentation laid out here.

  1. Log into your Shopify store.
  2. On the sidebar, under ā€œOnline Storeā€ click ā€œPreferencesā€.
image
  1. Click ā€œAdd custom JavaScript to Google Analytics.
  2. image
  3. Paste the section of code you got from the previous chapter.
image
  1. Click ā€œSaveā€
image
  1. On the sidebar, under ā€œOnline Storeā€ click ā€œThemesā€:
image
  1. Click ā€œActionsā€ → ā€œEdit Codeā€
image
  1. On the search bar, search for ā€œtheme.liquidā€ → Click ā€œtheme.liquidā€
image
  1. Locate a section of the code that starts with ā€œ<bodyā€ you can either scroll down until you find it or you can just use your browser’s search feature (typically Ctrl+F for PC, and ⌘+F for Mac) → Paste the second snippet of code that you got from Google Tag Manager (the one that contains the <noscript> tag) in there:
image

Example:

image
  1. Click ā€œSaveā€ in the top right corner:
image

QA-ing your installation

  1. Open your website homepage using Chrome.
  2. Click on the Google Tag Assistant Chrome Extension
  3. image
  4. Click on ā€œEnableā€
  5. image
  6. Refresh the page and click on the Google Tag Assistant Chrome Extension again

You should see a green tag for Google Tag Manager, indicating that the installation was successful.

image
Logo

Copyright Alec Desjardins© 2026 / alecentreprises@gmail.com