Trigger Guide for Google Tag Manager

Updated 27 March 2019 In the new version of Google Tag Manager, one of the most visible and profound changes to the previous version is how tags are fired (and blocked). First of all, there’s the obvious terminological distinction: we talk about triggers now, not rules. Second, triggers have become an integral part of the tag creation workflow, and as such have far more significance in the user interface than before. Read More…

Check if Google Analytics Is in the Page Template

One of the recurring problems in migrating to Google Tag Manager is how to make the transition as smooth as possible. Usually it requires that we agree with the developers on a time when the old code is removed, and at that moment we need to make sure the GTM tags point to the right UA code. This is, of course, only one use case for migrations, as some people do the entire migration in a staging environment, and some just don’t care if they lose a little bit of data along the way. Read More…

Simple RegEx Table for Google Tag Manager

When our good friends in the Google Tag Manager developer team first introduced the Lookup Table Macro, we were excited. For many of us, it soon became the weapon of choice especially when used as a management and optimization tool for the container itself. However, the macro wasn’t considered perfect. In fact, the most frequently heard request had to do with the core functionality of the feature itself: the macro should support operations, that is, predicate logic. Read More…

#GTMtips: Fix Problems With GTM Listeners

I’ve written about this before here and here, but this issue remains probably the biggest problem users have when implementing Google Tag Manager. Tip 10: Resolve conflicts with GTM’s listeners The tip title is actually wrong. You’re not fixing Google Tag Manager listeners. Rather, you’re resolving conflicts that other scripts on your page might introduce. GTM’s event listening is based on something called event delegation. Event delegation makes use of the document object model (DOM) and its tree-like hierarchy. Read More…

Google Analytics and the Page Load

If you use Google Analytics, Google Tag Manager, or any JavaScript-based data collection or analytics platform, have you ever stopped to wonder how they actually work? I mean, you obviously care about getting the data in, but are you taking the machinations of these tools for granted? This is something I’ve been thinking about for a long while, because I’m not so sure that many who work with these platforms actually understand how the browser and the web page interact. Read More…

#GTMtips: Migrate Containers to New UI

If you haven’t lived in a barrel, you should know by now that a new version of Google Tag Manager has been released. You can find the new version at http://tagmanager.google.com/, and there’s already a bunch of good articles about the new UI out there. I want to point out two: “Setting up GA via GTM’s new UX” by Krista Seiden, and “Google Tag Manager Refresh – 6 Things You Need to Know” by Jonathan Weber from Bounteous. Read More…

Auto-Event Tracking in GTM 2.0

In the new version of Google Tag Manager, auto-event tracking has received a considerable usability upgrade. It might seem quirky at first, especially if you’re used to the old auto-event tracking method, but the logic behind the new setup is brilliant. The most important distinction is that auto-event tracking isn’t something you control with separate tags anymore. Rather, it’s now entirely trigger-driven, meaning you activate and specify the auto-event tracking of your choice using tag triggers (triggers are what ye olde folk used to call rules). Read More…

#GTMtips: Once UserId, Always UserId

The User ID is definitely one of the coolest things about Universal Analytics, if used correctly. It might reveal some surprising insights about your visitors, since now you’re not restricted to analysing visitors as just browser or device instances as before, but rather you can build your stories around all the touch points the user might have had on their journey to and through your web properties. With this simple tip, you can extend User ID tracking to return users without them needing to authenticate. Read More…

Introducing GTM Tools

I’ve written a completely revamped version of this toolset for Google Tag Manager V2. Well, I just yesterday published the first of my GTM API tools (the Container Visualizer), and I vowed that I wouldn’t release the other tools for a number of reasons. The reasons were good, in my opinion (especially the part about the tools being ugly as crap), but on the other hand I don’t want to keep anyone away from the amazing potential of the new API. Read More…

Container Visualizer for Google Tag Manager

[UPDATE:] Quite a lot of people had trouble accessing the tool after I published this post. This should now be fixed. So, AWESOME stuff. The new Google Tag Manager UI and API have just rolled out, and I can finally start revealing the stuff I’ve been working on :) I’m not going to go into the new UI in this post. I just want to give a huge thanks to the GTM team for working on the UX with such dedication. Read More…