Setting up Google Tag Manager
In order to set up Google Tag Manager in your store, you first must set up all necessary variables, triggers and tags. These GTM components will work together to measure your store's data, allowing you to properly manage user and website traffic in your Google Analytics dashboard.
Follow the steps below to create all necessary GTM components for your store. Begin by opening your Google Tag Manager account dashboard at tagmanager.google.com.
Creating variables
To create a variable, click on Variables in the left menu and then on New.

Data Layer Variables
- In the User-Defined Variables box, click on New.
- Click on the Variable Configuration box and select Data Layer Variable.
- Type campaignMedium in the Data Layer Variable Name field.
- Click on Save and save it as Data Layer Variable - campaignMedium.
Repeat the instructions above for the following variables:
- campaignName
- campaignSource
- currency
- transactionId
- transactionTotal
Google Analytics Variables
Default
- In the User-Defined Variables box, click on New.
- Click on the Variable Configuration box and select Google Analytics Settings.
- Type in your Google Analytics Tracking ID.
- Click on More Settings and then on Ecommerce.
- Tick the Enable Enhanced Ecommerce Features and Use data layer boxes.
- Save your changes as Google Analytics.
Checkout
- In the User-Defined Variables box, click on New.
- Click on the Variable Configuration box and select Google Analytics Settings.
- Type in your Google Analytics Tracking ID.
- Click on More Settings and then Fields to Set.
- Add the following fields:
Field Name | Value |
---|---|
campaingName | {{Data Layer Variable - campaignName}} |
campaignMedium | {{Data Layer Variable - campaignMedium}} |
campaignSource | {{Data Layer Variable - campaignSource}} |
- Then, click on Ecommerce and check the Enable Enhanced Ecommerce Features and Use data layer boxes.
- Save your changes as Google Analytics - Checkout and Order Placed.
Creating triggers
To create a trigger, click on Trigger in the left menu and then on New.

Custom Events
- Click on the Trigger Configuration box.
- Select Custom Event.
- Type addToCart in the Event Name field.
- Click on Save and save it as Custom Event - addToCart
Repeat the instructions above for the following event triggers:
- cart
- orderPlaced
- payment
- productDetail
- productImpression
- profile
- removeFromCart
- shipping
Creating Tags
To create a tag, click on Tags in the left menu and then on New.

Google Analytics - Checkout and Order Placed
- Click on the Tag Configuration box.
- Select Google Analytics - Universal Analytics.
- Choose Event from the Track Type field.
- Type in Ecommerce in the Category field.
- Type in Event in the Action field.
- In Google Analytics Settings, select Google Analytics - Checkout.
- In the Triggering box, choose the following triggers:
- Custom Event - cart
- Custom Event - email
- Custom Event - orderPlaced
- Custom Event - payment
- Custom Event - profile
- Custom Event - shipping
- Save the new tag as Google Analytics - Checkout and Order Placed.
Google Analytics - Enhanced Ecommerce
- Click on the Tag Configuration box.
- Select Google Analytics - Universal Analytics.
- Choose Event from the Track Type field.
- Type in Ecommerce in the Category field.
- Type in Event in the Action field.
- In Google Analytics Settings, choose Google Analytics.
- In the Triggering box, choose the following trigger
- Custom Event - addToCart
- Custom Event - productDetail
- Custom Event - productImpression
- Custom Event - removeFromCart
- Save the new tag as Google Analytics - Enhanced Ecommerce.
Google Analytics - Page View
- Click on the Tag Configuration box.
- Select Google Analytics - Universal Analytics.
- Choose Page View from the Track Type field.
- In Google Analytics Settings, select Google Analytics.
- In the Triggering box, select the All Pages trigger.
- Save the new tag as Google Analytics - Page View.
Conversion Linker
- Click on the Tag Configuration box.
- Select Conversion Linker.
- In the Triggering box, choose the All Pages trigger.
- Save the new tag as Conversion Linker.
Google Ads Conversion Tracking
- Click on the Tag Configuration box.
- Choose Google Ads Conversion Tracking.
- Fill in the fields Conversion ID and Conversion Label according to what is instructed by the Google Ads panel.
- Fill in the following fields with Data Layer variables:
- Conversion Value: {{Data Layer Variable - transactionTotal}}
- Order ID: {{Data Layer Variable - transactionId}}
- Currency Code: {{Data Layer Variable - currency}}
- Save the new tag as Google Ads Conversion Tracking.