Deploy Server-Side Google Tag Manager in AWS

Since Google Tag Manager released the manual setup guide for server-side tagging, my mind has been spinning with the idea of walking through the deployment into Amazon’s AWS. I personally prefer Google Cloud Platform over AWS, because I think it’s so much more user-friendly. Even though in this guide we’ll be utilizing one of the simplest AWS services, Elastic Beanstalk, the deployment is still much more complex than if you were to use GCP’s App Engine. Read More…

Consent Settings in Google Tag Manager

Last updated 1 December 2023: New consent signals added Ever since Google Analytics released the first features of consent mode, I’ve been anxiously waiting for news about a more tightly-knit integration with Google’s preferred implementation solution: Google Tag Manager. In a recent release, Google released a veritable cornucopia of new features that should assist in determining and implementing consent not just across Google tags, but any tags running in the container. Read More…

Custom GTM Loader for Server-Side Tagging

Last updated: 18 October 2021. Peview works now with the proxied container even if the container ID is overridden.. While server-side tagging already has a wonderful built-in Client for proxying the Google Tag Manager container via your own first-party domain, it’s not perfect. The main issues are that it doesn’t let you delimit access on a per-origin basis, so requests for the allowlisted container IDs can be sent from anywhere, and that it doesn’t let you freely choose the path via which the container ID is loaded. Read More…

ReCAPTCHA V3 With Google Tag Manager Server-Side Tagging

I’ve written about Google’s reCAPTCHA v3 before. It’s a verification API, which analyzes the signals fed into it and returns a bot score, based on how “bot-like” the hits are. It’s a great way to validate whether or not to collect data from certain sources that exhibit bot-like behavior. You’ll want to ignore those in your analytics tools, for example, as they tend to add a lot of (unrealistic) noise to the data set. Read More…

Provision Server-Side Tagging Application Manually

The automatic provisioning process of the Google Tag Manager server-side tagging service is extremely useful. With just a few clicks of the button, you can have a fully functional (albeit limited to testing use) server-side tagging endpoint on the Google Cloud Platform (GCP). For a video overview of the automatic deployment, see this video. However, the automatic provisioning process creates a new Google Cloud Platform project and, at the time of writing, always deploys the App Engine application (on which the tagging server runs) in the us-central-1 GCP region. Read More…

Facebook Conversions API Using GA4 Web Tags and a GTM Server

Facebook has now officially released their Conversions API tag template for server-side tagging in Google Tag Manager. With this tag template, you can create a server-side tag that fires with any Client designed to parse requests into a unified event model. One such Client already exists, and every single Server container has it built-in: the GA4 Client. If you haven’t yet deployed a Server container, check out this video walkthrough for more details on how to do it. Read More…

Write to Google BigQuery From a GTM Server Container

Ever since it was released that server-side tagging in Google Tag Manager would run on the Google Cloud Platform stack, my imagination has been running wild. By running on GCP, the potential for integrations with other GCP components is limitless. The output to Cloud Logging already introduces interesting pipeline opportunities, but now it gets even better. It’s finally possible to write directly to Google BigQuery from a Client or tag template! Read More…

#GTMTips: Tips for Logging in Server-Side Tagging

One of the largest costs in a server-side tagging can be logging. Google warns about this in their official documentation, and it’s definitely something to keep a keen eye on if your server-side endpoint processes enough data per month. How much should it process for logging to become an issue? It depends, but you could start seeing some impact once the endpoint processes >1 million incoming requests per month. The best way to find out if logging is a problem is to visit the Billing dashboard in your server-side tagging Google Cloud project and check what the portion of Log Volume is in your monthly costs. Read More…

Track Core Web Vitals in GA4 With Google Tag Manager

Updated 3 March 2023: Added a checkbox to the template to enable collecting FCP, INP, and TTFB metrics, too.. Core Web Vitals is described on the dedicated web.dev resource as (emphasis mine): “Core Web Vitals are the subset of Web Vitals that apply to all pages, should be measured by all site owners, and will be surfaced across all Google tools.” The Core Web Vitals measurement as suggested by Google are: Read More…

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…