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…

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…

#GTMTips: Prevent SGTM From Setting the FPID Cookie

The FPID cookie is what server-side Google Tag Manager would prefer to use for your Google Analytics 4 tracking. It’s a cookie set in the HTTP response from the server, and it’s flagged as HttpOnly, which means it’s only accessible by a web server running on the domain on which it was set. There’s nothing wrong with the technology, and I do recommend that server-side setups toggle it on by default. Read More…

#GTMTips: Override Google Analytics 4 Fields in Server-Side GTM

Server-side tagging is all about control. Being able to intercept, modify, and even block requests as they come in before they are dispatched to their actual endpoints is extremely valuable. The built-in Google Analytics 4 tag template has options for modifying event parameters and user properties in the Google Analytics 4 request, but did you know you can use these options to modify some of the fields as well, such as Client ID, User ID, and event Engagement Time? Read More…

Agency, Transparency, and Control: Unsolved Problems With Server-Side Tagging

I have been a strong supporter of server-side tagging, in particular Google’s server-side tag management solution. I admire the way it seeks to readjust the balance of control that typically has been in favor of the marketing vendors whose JavaScript libraries have been free to wreak havoc in the user’s browser. By inserting a buffer between the user and the vendor, the owner of the server-side tagging setup can take control over what data the marketing vendors can actually process of the user. Read More…

#GTMTips: Preflight Requests in Server-Side Google Tag Manager

With certain types of HTTP requests, the web browser might first dispatch a request with the OPTIONS method, also known as a preflight request. The purpose of the preflight request is to “check” with the web server that it’s equipped to handle the type of cross-origin request the browser wants to dispatch. If the server doesn’t handle this preflight request, or if it returns a response that doesn’t agree with what the web browser wants to actually dispatch, the check fails and the browser refuses to send the actual request. Read More…

#GTMTips: Preview Requests in Server-Side Google Tag Manager

Server-side Google Tag Manager has an excellent Preview mode, which lets you inspect incoming requests, monitor the event data object, view console messages, and identify outgoing requests, among other things. To enable this Preview mode on the web, you simply need to click the Preview button in the container, after which any requests sent from the same browser instance will be automatically shown in the Preview mode window. However, what about if you want to send requests from another browser? Read More…

#GTMTips: Setup IAM for Manual Installation of Server-Side GTM

If you want to manually install server-side Google Tag Manager on App Engine in the Google Cloud Platform, you are of course welcome to do so. The main benefits of doing this are that you get to choose the region where App Engine is deployed and that you can use existing project resources instead of having a new project automatically created for you. However, to run the script without errors, there are a number of things you need to enable first. Read More…

Enrich Server-Side Data With Cloud Firestore

With asynchronous variables recently released in server-side Google Tag Manager, it’s time to dig into data enrichment flows using another release from the Google team. * drum roll * We have a new Google Cloud Platform API! It’s fast. It’s sleek. It’s beautiful. It’s Firestore! Firestore is a NoSQL, transactional, and scalable database that offers near-real-time write/read and sync operations for data. In practice, it’s a great way to enrich and widen the data that you pass through your Server container. Read More…

Asynchronous Variables in Server-Side Google Tag Manager

OK, that’s one unappealing title for a blog post, but rest assured that the content more than makes up for this obscurity. Recently, my favorite toy in the world, Google Tag Manager’s server container, introduced the capability to handle asynchronous operations in variables. This is done through a JavaScript interface known as Promise. A Promise is a way to run code in JavaScript without knowing what its eventual value will be. Read More…