Shopify Plus User? Use this guide instead
Here are the required steps for the full implementation:
We suggest watching this video first, and then follow the detailed steps below to successfully install the app.
Once you install our app (A one-time $99 purchase - NO recurring fees!), you can move on to the installation instructions where you need to input your GTM container ID.
Once you save then we have inserted three snippets into your theme:
We've also included these snippets in your theme.liquid
You now have GTM installed on your website through the app!
Important! Check to see if you have another GTM setup on your website. Now that you've installed our app, you will need to remove the existing code to prevent duplicate GTM containers on your website. See: How to Remove Your Pre-Existing GTM Code (for GTM Shopify App)
Once you have verified that you do not pre-existing GTM code present, you can move to the next step.
Once you've copied the code, you can paste into the checkout script settings below, and select SAVE.
Please note: Don't delete your existing scripts in here without reviewing them first! It's possible that you might have scripts used for other tracking purposes!
You are almost done! Now it's time to connect your new dataLayer data from your store to Google Tag Manager.
Now in order to connect your Shopify data to Google Tag Manager we need to create all of the variables, triggers, and tags for these to map to.
Once you're confident everything is good then click Confirm and you will see the tags, triggers, and variables imported in your Workspace Changes:
By default, all of the Google AdWords tags are paused. These are the tags required for:
Dynamic remarketing events sending product data into the AdWords retail events for dynamic remarketing like shown below:
There are two steps to complete this setup:
Here is where you find your AdWords variable:
Then copy your the variable shown here:
That's it for the remarketing setup!
Here are the AdWords gtags that were imported into GTM for you:
Important! Once you've unpaused each tag you are ready to move on. If you previously had AdWords scripts or remarketing tags setup then you will need to remove these to prevent duplicate tags from firing.
You need to set GTM into Preview mode and walk through all of your major pages of your website to ensure you installed everything properly.
All of these pages should have these tags firing:
You will have the tags fire on pageview:
The dataLayer should contain the same baseline data (visitor and page type) along with the additional collection page enhanced ecommerce data for impressions.
Note: this guide doesn't show how to put this impression data into use on your Shopify store for Enhanced eCommerce. This is only recommended for Shopify Plus stores so you don't lose out on checkout-only data that we aren't able to implement via GTM.
If everything is good then continue to do the same on your search result pages! If you are seeing some discrepancies, please review the setup steps again and then contact us with your questions.
Note: Test all product page types if you have unique templates
On product pages you should see the following:
The dataLayer should contain the same baseline data (visitor and page type) along with the additional product page enhanced ecommerce data that can be used with Enhanced eCommerce or custom third party marketing tags:
If you send users to a shopping cart then you should see the following:
And the dataLayer should contain the same baseline data (visitor and page type) along with the additional cart page enhanced ecommerce data for product list impressions.
Since we don't have access to your checkout pages then we can't insert GTM into these pages.
Review Checkout 'Thank You' Page
This last page (the most important) you will want to see the following:
Additionally if you click on the Data Layer tab in the GTM console, you will see all of the data available for your use in Google Analytics, marketing conversion tags, etc.
You'll notice some additional data like
This data can be used in other third party tags (Snapchat, Bing, etc)!
If any of your QA tests don't pass from Step 7, then it's likely that you have customizations to your theme that we aren't able to detect with our automated triggers. We have listed some common examples below.
1. Product SKUs are "undefined" in Product Tags
If this happens then it's possible that your product template name has been modified and requires a small config update.
We look for product.liquid so if you have alternative template names then you will need to add additional logic to account for these in the elevar-body-end.liquid file:
2. ecomm_value is undefined
If this happens on your product detail pages then you will need to adjust the two lines of code shown below. If you need help updating this for your store please contact us!
Each container you import into GTM will have a folder called "UPDATE ON INSTALL".
The variable found in this folder will be: AdWords account number (ex. AW-123-456-789)
Once you are ready to go live it's time to publish!
Inside of Google Tag Manager, click the Publish button in the top right and confirm your deployment.
Once you've deployed then you should perform the same QA process in preview mode. Just be sure to click Refresh inside of GTM if you've made any changes.