Create a CSS Path Variable for Click Element

At one point in the turbulent year of 2020, you might have gasped in surprise when looking at the preview interface of Google Tag Manager. No, I’m not talking about the new preview mode interface. Instead, I’m referring to how the Click Element and Form Element built-in variables would now display a CSS path string rather than the expected [object HTMLDivElement] (or equivalent). There was good and bad in this update. Read More…

Tag Assistant Preview Mode in Google Tag Manager

Last updated 12 February 2021: Clarified how Preview is shared. Your favorite tagging platform, Google Tag Manager, now comes equipped with a completely revamped preview mode experience. Gone are the days of having to minimize the debug pane to prevent it from hogging up screen real estate on the website. Gone are the days of having to use browser extensions to see what happened in GTM on previous page loads. Read More…

#GTMTips: The Mysterious .Macro() Call in Custom HTML Tags

When previewing Custom HTML tags in Google Tag Manager you’ve almost certainly run into a situation where the GTM variable shows up as a weird JavaScript method resembling something like this: google_tag_manager["GTM-ABCD123"].macro(15) And this is when you were expecting it to show the actual, resolved value! It doesn’t help that every now and then the preview mode actually shows to correct value in the preview mode. What’s up with that? Well, there’s a fairly logical explanation to this. Read More…

#GTMTips: The Errors Tab in Preview Mode

While using the Google Tag Manager user interface around Halloween 2018, you might have noticed a new tab in Google Tag Manager’s Preview mode. The tab is named Errors and shows you the number of exceptions thrown by GTM’s tag templates on the page. In this short #GTMTips post, I’ll quickly walk you through what the tab shows. Tip 90: The Errors Tab In Preview Mode The tab’s name is an apt description of what the tab shows. Read More…

#GTMTips: Prevent Clicks and Form Submits From Redirecting

Google Tag Manager offers us some nice built-in triggers so that we can automatically listen for specific user interactions on the website, reacting to them however we wish, though typically it would be to fire a tag. The tricky thing especially with the click triggers and form submission tracking is that the page has a nasty habit of redirecting you to the link or form target page before letting you see the respective data in Google Tag Manager’s excellent preview mode. Read More…