Server-Side Tagging in Google Tag Manager

Ever since Server-side tagging was publicly announced at SUPERWEEK 2020, Google and the trusted tester community have been hard at work, building something that just might change the landscape of digital analytics for good. Google Tag Manager has now released Server-side tagging into public beta. In this lengthy article, we’ll take a look at what Server-side tagging is, how it should (and should not) be used, and what its implications are on the broader digital analytics community. Read More…

Build a Lookup Table Generator for Google Tag Manager

In this step-by-step guide, I’ll show you how to build a Lookup Table generator in Google Sheets, utilizing Apps Script and the Google Tag Manager API. The purpose of the Lookup Table generator is to automate the often tedious task of adding many, many rows to a Lookup Table within the Google Tag Manager UI. There are other solutions for this, but none (as far as I know) that uses the Google Tag Manager API. Read More…

#GTMTips: Fix Container Preview in Google Chrome's Incognito Mode

Since updating to Google Chrome 83, you might have noticed that Google Tag Manager’s Preview mode no longer works when browsing Chrome in Incognito mode. This is because starting with Chrome 83, third-party cookies are blocked by default in Incognito windows. Google Tag Manager uses third-party cookies to serve browsers in Preview mode with the container draft rather than the live container. There’s a simple workaround to make sure Preview mode continues working for any site you want to browse in Preview mode. Read More…

Google Optimize Anti-Flicker Snippet Delay Test

Recently I published an article on how to set up an impact test for the “flicker effect” omnipresent in client-side A/B-testing tools. Be sure to check out that article first to get some context to what we’re going to be talking about here. In this short follow-up, I’ll show you how to measure the average time of the anti-flicker snippet delaying page visibility, if you choose to deploy the snippet. Read More…

Simple Way to Measure a/B Test Flicker Impact

“Flickering” or “Flash Of Original Content” (FOOC) is a phenomenon where there’s a (typically) slight but observable delay in the browser updating the site or element layout if the user is included in a variant group for experimentation. This manifests in the original, unmodified element being rendered in the visible portion of the page before the experiment library updates it with the variant. There are ways to mitigate the flicker: Read More…

Snowplow Analytics Templates for Google Tag Manager

When custom templates were released for Google Tag Manager, I updated my workflow for working with GTM. Instead of instinctively rushing to the Custom HTML tag and the Custom JavaScript variable, I started considering whether the custom script that needed to be deployed could be transformed into a custom template first. While publishing numerous templates into the community gallery, I always spent some time over the past 12 months tinkering on an extremely complicated template translation: the Snowplow Analytics JavaScript tracker. Read More…

Track Interactions in the Shadow DOM Using Google Tag Manager

The shadow DOM is a way to add HTML structures to the web page so that they remain isolated from the rest of the document object model (DOM). It’s a popular concept with web components, as it allows for encapsulation of web structures so that they aren’t affected by style declarations of the parent tree, for example. However, being such a “hidden” structure, anything that happens in the shadow DOM is also hidden from Google Tag Manager’s listeners. Read More…

#GTMTips: Use an All Events Trigger for More Control

One of the most versatile triggers in Google Tag Manager is the Custom Event trigger. As its name indicates, you can use it to fire your tags when an event is pushed into dataLayer. This process is at the heart of GTM’s dataLayer system. And it’s not just custom events. Every single trigger type in Google Tag Manager uses the event key in a dataLayer.push(), which is why you’ll see events like gtm. Read More…

#GTMTips: Use Gtag.js Parameters in Google Tag Manager

With the proliferation of gtag.js implementations, we can see that there’s a small-ish paradigm shift in how to implement Google’s stack of marketing tools. As adding gtag.js snippets to the site code becomes more and more common (to cater to things like early Optimize loading), you might be at a point where you have lots of interesting information stored in the gtag.js queue but no way to access it in your Google Tag Manager tags and variables. Read More…

#GTMTips: Why Does the Google Analytics Tag Show 'Failed'

I’ve covered the more pervasive issue with tags not firing in Google Tag Manager in my article on the “Still Running” status. However, there’s an additional problem you might face with Google Analytics: tags that show status Failed, and which refuse to send any data to Google Analytics. There are a couple of possible reasons for this, and we’ll explore them in this article. Note that any tag type in Google Tag Manager can signal Failed. Read More…