GA4 to Piwik PRO Using Server-Side Google Tag Manager

There are two new custom templates available in server-side Google Tag Manager. These templates have been designed to facilitate Piwik PRO tracking in a server-side container. Piwik PRO Client -> This Client template interacts with the Piwik PRO JavaScript tracker and lets you route Piwik PRO tracking through a server-side GTM container. GitHub repo. Piwik PRO -> The tag template works in unison with the Piwik PRO Client, forwarding the hits to the Piwik PRO endpoint. Read More…

New Piwik PRO Templates in Server-Side Google Tag Manager

Piwik PRO has two new server-side Google Tag Manager templates, and this article explains what they are and how they work. The first template, Piwik PRO Client, is designed to work in unison with the Piwik PRO HTTP API. Most often these requests are generated by the Piwik PRO JavaScript tracker, but theoretically any HTTP source that uses the same scheam can send requests for the Client to claim. Once the Client claims the request, it generates an event data object that can be consumed by tags in the server-side Google Tag Manager container. Read More…

First-Party Mode for Google Tags

Google has released a new feature, First-Party Mode (FPM), into public beta. Image source First-Party Mode seeks to make it easier to wrap Google’s measurement and advertising technologies in a first-party, same-origin context. This means that the user’s browser, when visiting a website running FPM, would no longer communicate directly with Google’s domains when fetching measurement libraries such as Google Tag or Google Tag Manager. Instead, the requests would be sent to a subfolder of the website itself. Read More…

#GTMTips: Automatic Page View Hits in SGTM After Consent Granted

If you’re using server-side Google Tag Manager, Google (Advanced) Consent Mode and you’re collecting hits to Google Analytics 4, you might have noticed something odd happening when switching consent to granted state. It looks as if your page_view hits as well as any other hits marked as “Conversions” (or key events now, I guess) are automatically redispatched to the server-side Google Tag Manager endpoint when consent is granted! This sounds incredibly useful. Read More…

#GTMTips: Consent Granted Reprocesses Previously Denied Hits

This will be a quick tip, but it’s here to correct my previous statements in the comments section of different articles on this blog. When using Advanced Consent Mode, Google Analytics 4 collects hits when consent is in "denied" state. These hits have a lot of parameters stripped off them, including identifiers like the Client ID and the Session ID. The hits will not surface in reports directly, but they will instead go through a modeling process to enrich the reports once modeled. Read More…

Consent Mode V2 for Google Tags

**Last updated March 7, 2024. Clarified that you do NOT need to resend hits when consent is granted, if those hits were collected on the same page when consent was denied. Google’s Consent Mode continues to be a hot topic, especially since in 2024 it will be required to implement Consent Mode in case a website or app is collecting data for audience building or remarketing with Google’s advertising services. Read More…

Cloud Run With Server-Side Tagging in Google Tag Manager

In a recent update to server-side tagging in Google Tag Manager, Google switched the default deployment of a server-side tagging backend from Google App Engine to Google Cloud Run. Now, when you create a new container and choose the automatically provisioned tagging server option, this service will be created in Google Cloud Run instead of in Google App Engine. While I’ve written about Cloud Run before, this update gives me an opportunity to review what actually happens when you provision a Cloud Run environment, how you can upgrade it, and how you can add enhancements such as multi-region load balancing to it (with ease, I might add! Read More…

The Google Tag Template in Google Tag Manager

Google is going all-in with Google Tag. We’ve already seen the consolidation effort through products like Google Analytics 4, and now Google is extending the merging of the tagging stack into Google Tag Manager, too. I’m referring to the new Google Tag that has replaced Google Analytics 4 configuration tags in your Google Tag Manager containers. With this release, all your old GA4 configuration tags have been auto-migrated to the new Google Tag. Read More…

Settings Variables for GA4 in Google Tag Manager

One of the big pain points in configuring Google Analytics 4 through Google Tag Manager has been the difficulty of setting up event parameters, user properties, and settings across a range of tags. Well, we can finally get rid of our clumsy Config tag sequencing hacks because Google has released two new settings variables that mimic how the Google Analytics Settings Variable used to work in Universal Analytics. The new variables are: Read More…

Transformations in Server-Side Google Tag Manager

In January 2020, when Google Tag Manager’s server-side tagging was first introduced to the general public at SuperWeek, I wrote a flurry of tweets, sharing my vision of a server-side tagging future. In one of the tweets, I discussed how you could do these: Hit validation and fixing before the hit is sent to the endpoint PII and privacy controls for the requests before dispatch Fast forward to today, over three years later, and we are finally treated to a feature that grants us scalable controls to properly interrupt data flows within server-side GTM. Read More…