Skip to main content
MeasurementTechnologyView Point

Tracking & measurement best practices — including my free GTM container templates

By 19th August 2019August 19th, 2021No Comments

I’ve worked on various Google Tag Manager (GTM) projects and I wanted to share tracking and measurement and best practices built around GTM containers for the wider digital marketing and analytics community via GitHub. One of the reasons I created these specific containers is to help other marketers manage their tracking and measurement across multi platforms with consistency and a best practice approach that’s easy to implement. I’ve witnessed too many occasions where tag management has been overlooked and its integral role in tracking the success of measuring campaign performance means that we need to prevent it from being an afterthought in the set-up process!

The power of tag management cannot be under-estimated in the digital world — it’s the cornerstone for a brand’s data and measurement strategy. The brands that are not utilising a tag manager are falling behind, and the ones who are must ensure that it plays a key role in the strategy. I hope that by sharing my best practice containers, the wider marketing and analytics community will have an open resource to solve the most common multi-platform tracking and measurement concerns today.

Overview of the containers

Below I have outlined specific containers for the most common platforms that digital practitioners integrate with their GTM account. All the tags are built around specific triggers* (e.g. thank you page for e-commerce) or constant variables (e.g. Google Analytics UA ID or Facebook ID) or datalayer* variables (e.g. transaction ID). The options available are:

  • Google Analytics:
    • Pageview
    • E-commerce
    • Enhanced E-commerce
  • DoubleClick Campaign Manager:
    • E-Commerce
  • Bing:
    • Pageview
    • E-commerce
  • Google Adwords:
    • Re-marketing
    • E-commerce
  • Facebook:
    • Pageview
    • E-commerce
    • View Content (for dynamic product ads)
    • Add to Cart

In total there are 30 different containers with 3 containers set-up for staging environment:


How do I know which container to use?

The containers range from advanced to basic and the descriptions outlined below will help you navigate to the version you need for your measurement objectives:

Advanced Containers

  • Container 00 + (00.1 staging version set-up for testing) — this includes the following sets of tags:
    • Google Analytics Pageview and Enhanced E-commerce
      • Enhanced E-commerce
        • Add to Cart
        • Checkout
        • Product Click
        • Product Impression
    • Google Adwords Remarketing and E-commerce
    • DoubleClick E-commerce
    • Bing Pageview and E-commerce
    • Facebook Base + Pageview, E-commerce and View Content (for dynamic product ads)
    • Conversion Linker
  • Container 01 + (01.1 staging version set-up for testing) — this includes the following sets of tags:
    • Google Analytics Pageview and E-commerce
    • Google Adwords Remarketing and E-commerce
    • DoubleClick E-commerce
    • Bing Pageview and E-commerce
    • Facebook Base + Pageview, E-commerce and View Content (for dynamic product ads)
    • Conversion Linker

Note: For all 3 containers the same has been replicated for the staging container too.

Intermediate Containers

Basic Containers

How do I find and apply the right containers to my GTM account?

For the 30 different GTM containers I have placed the json containers within GitHub, which can be found here: http://gtmrecipecontainers.com/

To apply these to your e-commerce set-up, simply:

1. Download the relevant json container from GitHub

2. Upload the json to your GTM container

3. Check the datalayer variables set-up in GTM against what you have set-up in your datalayer

4. Check that the triggers set-up in GTM match against what you have set-up in your datalayer

Please ensure that any changes made are tested using GTM preview.

I’m keen to hear how you get on and any queries you have along the way so please don’t hesitate to contact me.

Sources

* The datalayer variables and triggers are built around the best practices on Google’s datalayer recommendations for e-commerce — https://developers.google.com/tag-manager/enhanced-ecommerce#overview