Custom Templates Guide for Google Tag Manager

Last updated 12 August 2020: Added details about server-side tagging. As I have finally managed to pick up my jaw from the floor, it’s now time to tell you what’s got me so excited. Google Tag Manager recently released a new feature called Custom Templates. Actually, it’s not fair to call it a feature. It’s a full-blown paradigm shift in how we use Google Tag Manager. It’s a suite of features designed to help brands, companies, and users create and share their own custom JavaScript and HTML setups with ease, while taking care that the code is optimized for delivery in the web browser. Read More…

CSS Selector Guide for Google Tag Manager

Some four years ago, Google Tag Manager released a new trigger predicate named matches CSS selector. Slowly but surely, it has evolved into one of the most useful little features in GTM. Even though I’ve written about CSS selectors many times before, I wanted to compile all the relevant information into a single guide. For an external resource, I recommend bookmarking the w3schools.com CSS Selector Reference. But for your day-to-day use of CSS selectors in GTM, this guide will hopefully prove useful. Read More…

Enhanced Ecommerce Guide for Google Tag Manager

Enhanced Ecommerce is certainly one of the finest reporting user interface features that Google Analytics has to offer. Enhanced Ecommerce, as the name implies, is a set of dimensions, metrics, and reports, which combine to provide you with a fairly complete view into how users are interacting with your products in your webstore. The main downside of Enhanced Ecommerce is, as with all good things, that it’s complicated to implement. Read More…

Guide to Zones in Google Tag Manager 360

Last updated 7 December 2021: Added a new chapter to highlight the fact that Zone containers have no access to prior state on the page before they were loaded. Google Tag Manager supports loading multiple containers on the same page. It’s useful if you have multiple companies or organizations working on the same site, but for one reason or another (e.g. governance) you want to restrict access to your main container. Read More…

The Scroll Depth Trigger in Google Tag Manager

Scroll depth tracking in web analytics is one of those things you simply must do, especially if you have a content-heavy site. Tracking scroll depth not only gives you an indication of how much users are digesting your content, but it also lets you turn meaningless metrics such as Bounce Rate into something far more useful. If you’ve already been tracking scroll depth in Google Tag Manager, you’ve probably been using either Rob Flaherty’s brilliant Scroll Depth jQuery plugin, or Bounteous’ equally ingenious Scroll Tracking recipe. Read More…

The RegEx Table Variable in Google Tag Manager

Ever since the Lookup Table variable was introduced in Google Tag Manager, users have been craving for more. The Lookup Table does exactly what it promises: lookups. These are exact match operations, which are extremely inexpensive to perform, because they can only have a binary result: either the match exists in the data store being queried or it doesn’t. This performance stays constant even if the data store being queried increases in size. Read More…

#GTMTips: The Timer Trigger

Google Tag Manager has a Trigger type which fires after a certain duration of time has passed on the web page: the Timer Trigger. The most common uses for the Timer Trigger seem to be either to send an event to Google Analytics after X seconds of dwell time (to kill the Bounce), or to defer a Tag from firing until some asynchronous request has completed with certainty. In the previous version of Google Tag Manager, the Timer was a separate listener Tag, which meant that you could start a timer based on a user interaction such as a click. Read More…

#GTMTips: 10 Blogs, 10 Articles, 10 People to Follow

Quite a while ago, I wrote an article on what I considered (then) to be my favorite Google Tag Manager resources. Many of them are still very valid, but I still wanted to write a follow-up. Times have changed, and GTM is very different from what it was two years ago when I wrote the post. So in this article, I want to divert your attention to 10 blogs, 10 articles, and 10 people - all which are and/or share excellent Google Tag Manager content on a periodic basis. Read More…

#GTMTips: URL Source in the URL Variable

One of the less-known features of Google Tag Manager, a hidden gem if you will, is the URL Source setting in the URL Variable type. It lets you parse any URL String for its components. Tip 38: Parse URL strings with the URL Source setting The setting itself is easy to find. Just edit an existing URL Variable, or create a new one. Then, scroll down to the More Settings divider, expand it, and you’ll see the URL Source drop-down list. Read More…

Firing a Single Tag Multiple Times in GTM

There might be many reasons you’d want to fire a single Tag multiple times in Google Tag Manager. The most common one is when you want to deploy multiples of a single tracking point on the web. Perhaps you have a roll-up account you want to send the hits to, in addition to the site-specific tracking property. Quite a while ago, I gave a solution for this with a specific focus on Google Analytics Tags. Read More…