Add Google Tag Manager to Shopify
1. Log in to Shopify, navigate to Sales Channels > Online Store > Themes, and click on Actions > Edit code to enter the theme editor.
2. Go to the Layout folder and open the theme.liquid file to display it in the editor window on the right.
Find the opening of the section in the file.
3. Open Google Tag Manager and click on the account ID in the top navigation bar to bring up the installation script.
4. Click on the copy icon in the first section of code from GTM.
5. In your Shopify window, paste the script at the top of the section in the theme.liquid file.
6. Click on the copy icon in the second - no script - section of code from GTM.
7. In your Shopify window, paste the no script code just after the opening tag in the theme.liquid file.
Click the Save button at the top of the page.
8. Click on Settings and Checkout to access the Checkout Settings dashboard.