What Is GTM Server-side Tracking and Why Do You Need It?

3 min readApr 22, 2020


Server-side tracking is a brand new feature in the Google Tag Manager. So far it is a non-public beta, available to partners for testing and we, at Optimics have already started playing with it. Here’s what we have learned so far:

Quick Facts

Server-side processing allows analytics and marketing tags to be processed on a server instead of the user’s browser, speeding up the website, reducing network traffic and improving overall tracking accuracy.

Instead of implementing many analytics and marketing tags, marketing scripts and pixels into a website, server-side processing means reducing the overall size and complexity of such tracking (thus speeding up the website). Moreover, for every tracked event, only one request can be sent to the server for processing instead of sending a separate request to every single marketing and analytics tool. By speeding up the website, this could also improve reliability and accuracy.

Less Work in Browser & Faster Website

Who doesn’t want to speed up both desktop and mobile performance?

Thanks to moving to the server, the total size of the frontend GTM container and various marketing scripts is reduced to an absolute minimum. In fact, only a minimum amount of javascript is required on the webpage, with its sole functionality limited to sending signals to the server-side container for further processing.

Therefore we get rid of tons of tracking scripts and libraries implemented in the website, speeding up page load and render time, which improves the overall user experience. It is often the case that a user leaves a web page before it is fully loaded, meaning losses in tracked data.

With a faster website, such losses are no longer an issue and data accuracy is considerably improved.

What about Security?

Server-side tracking has multiple advantages in website security, too! To name a few:

Keep Your Tracking IDs to Yourself

By using a server-side container as a middleware between your website and analytics, tracking IDs don’t have to be present on the website at all. Not exposing them publicly naturally means less spam traffic in your analytics and marketing tools.

No More Crashing!

Have you ever implemented a new fancy tool within your standard GTM that turned out to be slowing down or crashing your website? (Lucky you if haven’t!) With moving such logic to the server instead of a website, you will not risk such annoyance anymore.

Fight Evil Trackers

And speaking of shiny always-new trackers… Once upon a time, there was an evil tracker that copied whole dataLayer content and sent it to its own suspicious servers without mentioning this anywhere :) Server container naturally helps to prevent such events.

Hide your API keys

Various APIs, internal CRM systems, Mailchimp… They all use security keys or passwords for their APIs that should not be available to the end-user. To prevent this, we have always developed server-side scripts. As server-side tracking is server-side by nature, we can now include those easily in the GTM server container.

1st party context

In today’s tracking-prevention world, the advantage of having important cookies in first-party is immense. Server-side tracking will be hosted on your domain, setting required cookies in the first-party context, preventing many problems with the rising trend of blocking 3rd party cookies and scripts.


Currently, a server-side GTM container is available for partner whitelisting and their managed accounts only.

The setup of the server-side GTM container is a little more complex than a standard GTM. (likely to be improved before public roll out). After the installation, the container is hosted within the Google Cloud Platform’s Compute Engine.

The Server-side GTM comes with a Price Tag

The whole infrastructure now costs approximately 8 USD per 24 hours of usage (240 USD/month). This amount seems independent of its usage; we have tested sending 10M Google Analytics hits over 2 days and the price remained the same as if there was no traffic at all.

However, the operating costs are likely to decrease in the future, as the current setup is scaled for big projects. We have tested this hypothesis by manually limiting compute power, being able to bring the price down to by 75% (2 USD daily), while still processing GA requests normally.

Ready to give it a try? Drop us a message :-)