{"slug":"sop-065-how-to-add-google-tag-manager-to-a-shopify-store","title":"How to add Google Tag Manager to a Shopify Store","tags":["source:clickminded","type:sop","server:clickminded-sop","google","tag","manager","shopify"],"agent_summary":"SOP 065: How to add Google Tag Manager to a Shopify Store Add Google Tag Manager to a Shopify store and unlock a whole new world of tools and features to power up your Shopify Store. __Last Updated /","trigger_phrases":["how to add google tag manager to a shopify store"],"runnable":false,"markdown":"\r\nSOP 065: How to add Google Tag Manager to a Shopify Store\r\n\r\nAdd Google Tag Manager to a Shopify store and unlock a whole new world of tools and features to power up your Shopify Store.\r\n\r\n__Last Updated / Reviewed:__ 07/25/2024\r\n\r\n__Execution Time:__  ~5-10 minutes\r\n\r\n__🚀 Goal:__ To add Google Tag Manager to a Shopify store. \r\n\r\n__🤞 Ideal Outcome:__ Google Tag Manager is properly installed without any technical issues. \r\n\r\n__🤔 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. \r\n\r\n__🧐 Where this is done__  In your Shopify admin panel and Google Tag Manager. \r\n\r\n__🗓️ When this is done:__ Only once—the first time you install Google Tag Manager. \r\n\r\n__👨 Who does this:__ The person responsible for website management or analytics. \r\n\r\n__⚠️Prerequisites or requirements: __You need to have Google Analytics on your store. If you haven’t done it yet, you can follow SOP067 ([web version](https://members.clickminded.com/sop/067/)) to set up Google Analytics for Shopify.\r\n\r\n[__Click here to get the most up-to-date version of this SOP__](https://members.clickminded.com/sop/065)\r\n\r\n## Environment Setup\r\n\r\n### 01▸ Get the [Google Tag Assistant Companion](https://chromewebstore.google.com/detail/tag-assistant-companion/jmekfmbnaedfebfnmakmokmlfpblbfdm) (Free).\r\n\r\n## Grab your Google Tag Manager container code\r\n\r\n## SCENARIO 1: If you don’t have a Google Tag Manager account yet\r\n\r\n### 01▸ Sign up for [Google Tag Manager ](https://www.google.com/analytics/tag-manager/)(Free):\r\n\r\n\r\n### 02▸ You’ll need to log in to your Google account.\r\n\r\n### 03▸ You’ll be prompted to set up a Google Tag Manager account right away. Click “Create Account”.\r\n\r\n\r\n### 04▸ Fill out your account details such as name, country, and website URL, and choose your preferred target platform. Click “Create”.\r\n\r\n\r\n### 05▸ Accept the terms and conditions by checking the box below and clicking “Yes”.\r\n\r\n\r\n### 06▸ Next, a pop-up will appear where you will see your Google Tag Manager code. Please remain this page open until the next chapter. You will need to copy the first and second snippets of codes into your Shopify Store later.\r\n\r\n\r\n### 07▸ Once you are in your Workspace, click on Submit > Publish > Continue to publish your Google Tag Manager container:\r\n\r\n\r\n## SCENARIO 2: If you already have a Google Tag Manager account\r\n\r\n### 01▸ Log into your [Google Tag Manager ](https://www.google.com/analytics/tag-manager/)account;\r\n\r\n### 02▸ On the top header click “Admin” → “Install Google Tag Manager”\r\n\r\n\r\n### 03▸ Copy the code below. You will need it in the next chapter.\r\n\r\n\r\nBelow the first snippet of code, you will have a second one. Remain this tab open to copy the second code and paste it into your Shopify store later.\r\n\r\n\r\n## Adding Google Tag Manager to your Shopify Store\r\n\r\nNote: This method allows you to add Google Tag Manager to your whole website, in contrast to the [official documentation,](https://help.shopify.com/en/manual/reports-and-analytics/google-analytics/google-tag-manager) which only allows you to add GTM to the non-checkout pages unless you are a Shopify Plus customer.\r\n\r\nNote 2: If you are a Shopify Plus customer, follow the official documentation laid out[ here](https://help.shopify.com/en/manual/reports-and-analytics/google-analytics/google-tag-manager).\r\n\r\n### 01▸ Log into your [Shopify store.](https://help.shopify.com/login)\r\n\r\n### 02▸ On the sidebar, under “Online Store” click “Themes”:\r\n\r\n\r\n### 03▸ Click the kebab menu → “Edit Code”\r\n\r\n\r\n### 04▸ On the search bar, search for “theme. liquid” → Click “theme.liquid”\r\n\r\n\r\n### 05▸ Locate a section of the code that starts with “<head>”. This should appear immediately on line 3 of the page. Paste the first snippet of code copied from Google Tag Manager right under <head>:\r\n\r\nExample:\r\n\r\n\r\n### 06▸ Next, copy and paste the second code immediately after \"<body>\":\r\n\r\n\r\nNote: You may want to search \"body\" in the search box and remember to click “Save” in the top right corner whenever you've added a code under \"<head>\" or \"<body>\".\r\n\r\n## QA-ing your installation\r\n\r\n### 01▸ Open your website homepage using Chrome.\r\n\r\n### 02▸ Click on the Tag Assistant Companion Chrome Extension in your browser.\r\n\r\n\r\n### 03▸ Click on “Add domain”\r\n\r\n\r\nEnter your website’s URL and click “Connect”:\r\n\r\n\r\n### 04▸ Check if the Tag Assistant is connected to your site. You should be able to see the below pop-up on your site when it is connected:\r\n\r\n\r\nNote: If connection issues occur, you may refer to [this link here ](https://support.google.com/tagassistant/answer/10039345?hl=en#zippy=%2Cin-this-article)to troubleshoot.","html":"<p>SOP 065: How to add Google Tag Manager to a Shopify Store</p>\n<p>Add Google Tag Manager to a Shopify store and unlock a whole new world of tools and features to power up your Shopify Store.</p>\n<p><strong>Last Updated / Reviewed:</strong> 07/25/2024</p>\n<p><strong>Execution Time:</strong>  ~5-10 minutes</p>\n<p><strong>🚀 Goal:</strong> To add Google Tag Manager to a Shopify store.</p>\n<p><strong>🤞 Ideal Outcome:</strong> Google Tag Manager is properly installed without any technical issues.</p>\n<p><strong>🤔 Why this is important:</strong>  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.</p>\n<p><strong>🧐 Where this is done</strong>  In your Shopify admin panel and Google Tag Manager.</p>\n<p><strong>🗓️ When this is done:</strong> Only once—the first time you install Google Tag Manager.</p>\n<p><strong>👨 Who does this:</strong> The person responsible for website management or analytics.</p>\n<p>__⚠️Prerequisites or requirements: __You need to have Google Analytics on your store. If you haven’t done it yet, you can follow SOP067 (<a href=\"https://members.clickminded.com/sop/067/\">web version</a>) to set up Google Analytics for Shopify.</p>\n<p><a href=\"https://members.clickminded.com/sop/065\"><strong>Click here to get the most up-to-date version of this SOP</strong></a></p>\n<h2>Environment Setup</h2>\n<h3>01▸ Get the <a href=\"https://chromewebstore.google.com/detail/tag-assistant-companion/jmekfmbnaedfebfnmakmokmlfpblbfdm\">Google Tag Assistant Companion</a> (Free).</h3>\n<h2>Grab your Google Tag Manager container code</h2>\n<h2>SCENARIO 1: If you don’t have a Google Tag Manager account yet</h2>\n<h3>01▸ Sign up for <a href=\"https://www.google.com/analytics/tag-manager/\">Google Tag Manager </a>(Free):</h3>\n<h3>02▸ You’ll need to log in to your Google account.</h3>\n<h3>03▸ You’ll be prompted to set up a Google Tag Manager account right away. Click “Create Account”.</h3>\n<h3>04▸ Fill out your account details such as name, country, and website URL, and choose your preferred target platform. Click “Create”.</h3>\n<h3>05▸ Accept the terms and conditions by checking the box below and clicking “Yes”.</h3>\n<h3>06▸ Next, a pop-up will appear where you will see your Google Tag Manager code. Please remain this page open until the next chapter. You will need to copy the first and second snippets of codes into your Shopify Store later.</h3>\n<h3>07▸ Once you are in your Workspace, click on Submit > Publish > Continue to publish your Google Tag Manager container:</h3>\n<h2>SCENARIO 2: If you already have a Google Tag Manager account</h2>\n<h3>01▸ Log into your <a href=\"https://www.google.com/analytics/tag-manager/\">Google Tag Manager </a>account;</h3>\n<h3>02▸ On the top header click “Admin” → “Install Google Tag Manager”</h3>\n<h3>03▸ Copy the code below. You will need it in the next chapter.</h3>\n<p>Below the first snippet of code, you will have a second one. Remain this tab open to copy the second code and paste it into your Shopify store later.</p>\n<h2>Adding Google Tag Manager to your Shopify Store</h2>\n<p>Note: This method allows you to add Google Tag Manager to your whole website, in contrast to the <a href=\"https://help.shopify.com/en/manual/reports-and-analytics/google-analytics/google-tag-manager\">official documentation,</a> which only allows you to add GTM to the non-checkout pages unless you are a Shopify Plus customer.</p>\n<p>Note 2: If you are a Shopify Plus customer, follow the official documentation laid out<a href=\"https://help.shopify.com/en/manual/reports-and-analytics/google-analytics/google-tag-manager\"> here</a>.</p>\n<h3>01▸ Log into your <a href=\"https://help.shopify.com/login\">Shopify store.</a></h3>\n<h3>02▸ On the sidebar, under “Online Store” click “Themes”:</h3>\n<h3>03▸ Click the kebab menu → “Edit Code”</h3>\n<h3>04▸ On the search bar, search for “theme. liquid” → Click “theme.liquid”</h3>\n<h3>05▸ Locate a section of the code that starts with “<head>”. This should appear immediately on line 3 of the page. Paste the first snippet of code copied from Google Tag Manager right under <head>:</h3>\n<p>Example:</p>\n<h3>06▸ Next, copy and paste the second code immediately after \"<body>\":</h3>\n<p>Note: You may want to search \"body\" in the search box and remember to click “Save” in the top right corner whenever you've added a code under \"<head>\" or \"<body>\".</p>\n<h2>QA-ing your installation</h2>\n<h3>01▸ Open your website homepage using Chrome.</h3>\n<h3>02▸ Click on the Tag Assistant Companion Chrome Extension in your browser.</h3>\n<h3>03▸ Click on “Add domain”</h3>\n<p>Enter your website’s URL and click “Connect”:</p>\n<h3>04▸ Check if the Tag Assistant is connected to your site. You should be able to see the below pop-up on your site when it is connected:</h3>\n<p>Note: If connection issues occur, you may refer to <a href=\"https://support.google.com/tagassistant/answer/10039345?hl=en#zippy=%2Cin-this-article\">this link here </a>to troubleshoot.</p>\n"}