Google Tag Manager Server-Side (GTM Server-Side) has been attracting growing interest recently.

In this article, I would like to share initial observations and the first results of implementing GTM Server-Side for our client meblobranie.pl. We implemented the solution at the beginning of August, so the data presented comes from an environment that had been running for about three months.

How does Google Tag Manager Client-Side differ from Google Tag Manager Server-Side?

In brief, Google Tag Manager (GTM) has two versions:

  • Client-Side;
  • Server-Side.

In Google Tag Manager Client-Side, tracking tags run directly in the user's browser, collecting data and sending it to various analytics platforms.

In the Server-Side version, tags run on a server, allowing centralised data processing and transmission. As a result, GTM Server-Side can provide greater privacy, more control over data and better performance than the Client-Side version.

If you are unfamiliar with the topic, I recommend one of the many recently published articles or Google's help documentation, which explains the subject and discusses the advantages and disadvantages of this method.

Our Google Tag Manager Server-Side configuration:

We send an average of around 300,000 events a day to standard Google Analytics 4. To keep costs down and make scaling straightforward, we chose to deploy on Google Cloud - Cloud Run. We used the following settings:

  • Production: minimum 2 instances, maximum 5;
  • Preview: minimum 0, maximum 1;
  • Selected region: Warsaw (europe-central2).
Screenshot of the Google Cloud Run container management panel. It shows settings for CPU allocation, startup CPU boost, concurrency, request timeout and runtime environment, along with autoscaling options for the minimum and maximum number of instances.

Unfortunately, straightforward mapping of a custom subdomain to a Google Cloud Run application is not yet available in the Warsaw region. To avoid fees for GCP Load Balancer, a tool that distributes internet traffic across multiple servers to keep a website running smoothly and without interruptions, which in this case would route traffic from the chosen subdomain to our Google Cloud Run instance, we used Firebase Hosting to map the subdomain address to Google Cloud Run.

Approach:

We decided to test the readiness and performance of our solution by adding a parallel stream that sends signals from GTM Server-Side directly to BigQuery.

Alongside the existing Google Analytics 4 instance, we deployed an additional GA4 property, referred to here as GA4 Server-Side, which received signals exclusively through GTM Server-Side.

Both solutions ran at the same time, allowing us to compare the results. Events for GA4 Client-Side and GA4 Server-Side were initiated by the same triggers.

We decided that cookies and identifiers for GA4 Server-Side would be managed by the server rather than by JavaScript code.

Initial results:

For the analysis, I selected data from 1 September 2023 to 31 October 2023.

This should bring the number of returning users in GA4 Server-Side closer to the results from the traditional GA4 property. In addition, the effect of server-managed cookies should become more noticeable.

After a month of testing, we can see the following benefits from implementing Google Tag Manager Server-Side:

  1. Better visibility into the behaviour of Safari users.
    In standard GA4, the average time between seeing an ad and making a purchase is around 5 days for our client. In GA4 Server-Side, this increased to 7 days, bringing it closer to the behaviour of users who do not use Apple products.

  2. A smaller gap between CRM and GA4 Server-Side data compared with the gap between CRM and standard GA4 data.
    This discrepancy decreased by 2%. Although the differences between CRM and GA4 data were not significant for our client, I know they can matter for others, and GTM Server-Side may offer a solution.

  3. More active users and sessions recorded.
    GA4 Server-Side recorded an increase of 23% compared with standard GA4. Initial analysis suggests that these may be users with various ad blockers.

  4. A higher proportion of returning users.
    In traditional GA4, this was 23%, while in GA4 Server-Side it reached 30%. This provides deeper insight into the behaviour of users with more complex purchase journeys.

Costs:

At peak traffic, a maximum of four production instances were running, which happened twice, but for most of the time only two instances were active. This resulted in an average monthly cost of around 100 euros.

Chart showing the number of active instances in the Google Cloud Run container running GTM Server-Side. In September 2023, the maximum number of active instances was 4 and was reached only once.
Chart showing the number of active instances in the Google Cloud Run container running GTM Server-Side. In October 2023, the maximum number of active instances was 4 and was reached only once.

Summary:

Based on these initial observations, I can say that Google Tag Manager Server-Side is a tool with considerable potential. It enables a better understanding of user journeys, reduces discrepancies between data from different sources and provides more information about users.

To fully confirm these conclusions, we need a detailed analysis of data over a longer period. We will share more in-depth information in upcoming blog posts.

What comes next?

Soon, I will share our experience of implementing GTM Server-Side in a Kubernetes cluster. On the one hand, we do not have to incur additional costs because the client's platform is already hosted in the cluster. On the other, this protects us against Apple's recent announcements that first-party cookie data may be blocked if the analytics subdomain's IP addresses differ significantly from those of the main domain.

If you are interested in implementing GTM Server-Side at your company but lack the resources, please contact us. We would be happy to help at every stage of the project!