Get in touch with our team
Feature image for 06.11.2023


6 min read

Unlock the benefits of server-side tagging in Google Tag Manager

Server-side tagging has recently been made available within Google Tag Manager and it comes with various benefits that better put data back into your hands.

How does server-side tagging work?

Before running through the benefits, let’s take a look at how server-side tagging works and how it is different from traditional Google Tag Manager tracking.

Traditionally, Google Tag Manager has been 100% client-side. This means tracking scripts will run in the user’s browser when required and any related javascript files will be downloaded. Often these scripts will then set third-party cookies and begin sending data to the related marketing platforms directly from the browser.  

Visualised below is a typical example of a website without Server-Side tagging. It shows how each event is sent directly to each platform directly from the browser.

With Server-Side tagging, this flow of data is different. A standard GTM container is still required, however this time, it works in parallel with an intermediary server-side container hosted with a provider of your choice. Instead of downloading and running multiple tracking scripts from your standard GTM container (often carrying out very similar jobs), you now only need to send one signal to your Server Side container. This can then be distributed directly to any platform that needs the data. This could be anything from a page view to a purchase event.

Website configuration with server-side Tag Manager:

Benefits of server-side tagging in Google Tag Manager

Simplified implementation of conversion APIs

Utilising a Google Server-Side container makes the implementation of server-side conversion APIs much easier. Currently, out of the box, you can utilise Facebook and Google Ads conversion APIs to send data directly to Google and Facebook Ad servers. This improves the accuracy of your conversion tracking in instances where the user may have an adblocker or is using a browser with enhanced tracking protection such as Safari or Firefox.

Full control over your data

When you place third-party tracking scripts directly on your website, vendors have the power to execute any code and collect any data they see fit. Whilst these are almost always trusted vendors, you still have less control over your data. With server-side tracking, you control exactly what data is collected without any third-party JS libraries being downloaded.

This level of control is crucial for safeguarding user privacy and compliance with GDPR, as you can implement strict PII filtering to ensure sensitive user information is not exposed.

Reduced load on customer’s browser

By moving tracking scripts server side, there is less to be downloaded and executed on the client’s web browser, reducing page loading times and making your website faster.

After setting up a server-side Google Tag Manager, you receive an automatically generated endpoint to send your measurement hits to. This can be changed to a domain of your choice such as a dedicated measurement subdomain e.g.

This means that any cookies set by your Server-Side GTM container will be first-party, bypassing the restrictions caused by browsers like Safari and Firefox which block them by default. 

Hide tracking IDs and other identifiers 

With client-side tracking, your account IDs are usually exposed and allow spammers to send bad data to your accounts. Whilst this isn’t a common issue, the added protection will ensure your data isn’t contaminated.

Currently, all these benefits are limited to a set of platforms that support Server-Side tagging. These are Google Analytics (Both UA and GA4), Google Ads and Facebook. Whilst custom scripts can be used for other platforms, these are the officially supported ones. This list will certainly expand over the coming months and years. 

Limitations of server-side tagging in Google Tag Manager

Expertise and Hosting Costs

While Server-Side tagging fits neatly alongside client-side tagging, setting it up requires advanced tag management knowledge and some understanding of server architecture. If you are looking to utilise Google Cloud services such as Cloud Run, you will be guided through using the setup using a wizard which makes things easier to a degree. For other deployments such as App Engine or manual Docker deployments, you’ll also need experience with them specifically.

Implementing Server-Side tagging through Cloud Run is now the default deployment option within Google Tag Manager, replacing App Engine. As previously mentioned, GTM provides an installation wizard that walks you through the process and this has also been switched to Cloud Run. It offers better scalability, and cost-efficiency and makes global deployments of sGTM easier. This makes it an attractive choice for large businesses that have customers visiting their websites from across the globe. Although it’s been replaced, App Engine is cost-free for testing purposes which does provide a convenient starting point for beginners and users wanting to have more flexibility with testing. You then still have the option to upgrade to a production setup as needed.

An alternative deployment option is to use a Docker container which offers a high degree of control over your server-side tagging infrastructure. While it provides full autonomy over your setup, the process can become intricate due to the requirements for you to manage your auto-scaling infrastructure – however, this may be preferable for some enterprise organisations that have strict data processing rules. It’s important to note that this approach can incur costs depending on the chosen service infrastructure and may require careful management to optimise expenses.

Last but not least you have the option to use third-party providers who have their server architecture specifically designed for server-side GTM (sGTM). Providers such as and offer bespoke hosting packages just for sGTM. They also have clear pricing structures based on the number of events you need your sGTM to process each month.

These services are completely web-based and therefore incredibly easy to set up. After signing up for a specific package, you are then provided with DNS settings and instructions that guide you through all the steps required to get your sGTM setup ready to receive events.

Another key benefit of using these third-party services is that they offer additional features such as cookie extenders and custom loaders that will further improve your data quality. These features you don’t get with other hosting options and they would be challenging to implement manually. 

Ultimately, whatever hosting option you choose depends on your technical expertise, budget and data processing rules your business needs to adhere to

For more insights and guides on measurement and GA4, be sure to take a look at our blog. If you want to talk about your business aspirations, get in touch!