#GTMTips: 10 Useful CSS Selectors

Without a doubt, the possibility to leverage CSS selectors in Google Tag Manager’s trigger conditions is one of the most useful features of the platform. It gives you an amazing amount of flexibility, especially when combined with GTM’s click and form triggers. Essentially, CSS selectors let you test an HTML Element against a selector string. This check verifies that the element matches the given selector. In practice, this would mean that when you use the click or form trigger, you can check if the Click Element or Form Element built-in variables match a specific selector, allowing you to confirm that the action happened on the correct element. Read More…

#GTMTips: Change Management With Workspaces

A while ago, the Google Tag Manager team published one of my favorite feature releases in the history of GTM: Workspaces. I was so thrilled by this release that I went ahead and published a guide on how to implement and leverage this new feature. Workspaces is a very comprehensive feature in Google Tag Manager. This is because it changed the entire underlying data model. We no longer work directly with a single container draft. Read More…

#GTMTips: Fix the Rogue Referral Problem in Single-Page Sites

Single-page sites (or single-page apps) typically have just one page load. When navigating the site, subsequent content is either uncovered from the DOM, where it’s been in a hidden state, or loaded from the server using HTTP requests that do not invoke a new page refresh. This behavior, however, has some implications for Google Analytics tracking, especially when configured via Google Tag Manager. The crux of the problem is this: When you create a Google Analytics tracker, the URL of the page (without a possible #hash) from when the tracker was created is sent as the value of the Document Location field with every hit that uses this tracker. Read More…

#GTMTips: Restrict Custom HTML Tag Scope

What better way to celebrate the 50th #GTMTips article than, well, a really useful Google Tag Manager tip?! This tip is so useful and simple; it encapsulates everything that I had in mind when starting this series. The tip is about restricting scope of Custom HTML Tags. This is an important concept, because it’s possible that you’re stuffing your page’s global JavaScript namespace with all sorts of junk, and thus inadvertently causing conflicts. Read More…

#GTMTips: Debug Change History in GTM

Google Tag Manager can be quite the hierarchical mess. You have accounts which comprise containers. Containers are split into container versions, and you use workspaces to create new versions. Phew! Trying to keep tabs on all the activity within these layers can be quite the chore. In this #GTMTips article, I’ll do a quick walkthrough of (almost) all the places where you can review changes made in your Google Tag Manager account and container. Read More…

#GTMTips: Use EventTimeout With EventCallback

There are times when I’m disappointed with Google’s developer documentation, especially for Google Tag Manager. Most of the time they get it right, and I’d say around 80% of questions being thrown around the forums can be answered just by reading through the documentation. But there are some cases where the documentation is misleading or even downright dangerous. One of these cases is Enhanced Ecommerce. This isn’t going to be a thorough critique of said documentation, but the tip in this post has to do with one of the examples that the documentation gives for measuring Product Clicks. Read More…

#GTMTips: Deploy GTM in Your Chrome Extension

Have you created a Chrome Extension, and now you’re dying to find out how users are interacting with it? Perhaps you want to see what features are (not) being utilized, or perhaps you’re just interested in knowing if people are actually using it. In this article, I’ll show you how to configure Google Tag Manager, so that it works in the restricted sandbox of the Chrome Extension. You’ll need to make some tweaks, but it’s still perfectly doable. Read More…

#GTMTips: Using Document.write Safely in GTM Tags

This article is a guest article by someone from the analytics community I really look up to. Dan Wilkerson is an analytics developer at Bounteous, a company I hold in high esteem. Dan is one of the smartest technical analytics experts out there, and a large bulk of the awesome scripts and hacks that Bounteous produces (almost on a daily basis) have been orchestrated by him. So I’m very pleased to give the floor to Dan, so that he can tell you all about using the pesky document. 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…