Tuesday, February 11, 2025
HomeAnalytics#GTMTips: SGTM Fetches GA4 Configurations Automatically

#GTMTips: SGTM Fetches GA4 Configurations Automatically


One of the most popular use cases for server-side Google Tag Manager, often shared on this blog, too, is to split an incoming stream into multiple different endpoints.

Since the demise of customTask for Universal Analytics (Rest In Peace!), there hasn’t really been a solid, officially supported way of splitting a single GA4 stream into multiple endpoints. This is useful in case you want to create a “global rollup” property that combines data from multiple local sites, for example.

With server-side Google Tag Manager, this has been quite easy to achieve. You just need to create multiple GA4 tags in server-side Google Tag Manager, and override the Measurement ID for each tag.

However, the downside of GA4 is that a significant portion of its processing happens client-side. Property-specific configurations for things like Key Events are determined client-side. So if you override the Measurement ID server-side, this type of information would not be automatically applied to the tags, so you had to use something like Transformations instead.

Until recently, that is. A late-2024 update to server-side Google Tag Manager automatically fetches relevant GA4 configuration settings for each outgoing request that has its Measurement ID overridden in the GA4 tag settings in server-side Google Tag Manager.

Read on.


X


The Simmer Newsletter

Subscribe to the Simmer newsletter to get the latest news and content from Simo Ahava into your email inbox!

Tip 140: SGTM automatically configures outgoing GA4 streams

Here’s the classic use case:

You have an event, let’s call it simo_conv that you collect client-side with the Measurement ID G-12345. In the G-12345 property, simo_conv is not flagged as a Key Event, so it doesn’t get the telltale &_c=1 parameter in the request:

Pay attention to the dma_cps parameter as well. It gets the value syphamo, which means that in the property G-12345, consent sharing has been enabled across Google services.

Now, when I create another GA4 event tag in SGTM only, with the Measurement ID of a GA4 property where simo_conv is marked as a Key Event, here’s what the outgoing request to GA4 looks like:

As you can see, magically the _c=1 parameter appears in the outgoing request, even though I don’t have a Transformation or a tag setting that adds it. Similarly, the value of dma_cps is now -, reflecting the fact that on this property, no Google services are allowed to share consent state.

This is certainly a relief when orchestrating Google Analytics 4 data stream splitting in server-side Google Tag Manager.

I haven’t tested this extensively enough to give you a comprehensive list of all the possible configuration flags applied to the outgoing requests. Features such as “Create or modify events” and “Identify unwanted referrals” are most likely still client-side only.

Justus Blümer was kind enough to test this, and he found that event creation and modification do get applied to the outgoing streams as well.

Let me know in the comments if you have additional questions or if you’ve found other configuration settings that are also automatically applied!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments

Skip to toolbar