Track complex interactions and engagements without having to rely on out-of-the-box Shopify apps.
Log in to Shopify, navigate to Sales Channels > Online Store > Themes, and click on Actions > Edit code to enter the theme editor.
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.
Open Google Tag Manager and click on the account ID in the top navigation bar to bring up the installation script.
Click on the copy icon in the first section of code from GTM.
Note that there are two versions of the GTM installation code:
In your Shopify window, paste the script at the top of the `` section in the
Click on the copy icon in the second - no script - section of code from GTM.
In your Shopify window, paste the no script code just after the opening `` tag in the
Click the Save button at the top of the page.
Click on Settings and Checkout to access the Checkout Settings dashboard.
- Scroll down the checkout settings page until you find the Additional scripts box.
- Paste the no script version of the code right below it.
- Click the Save button.