Server-Side GTM: What You Need to Know

Server-side tagging in GTM is one of the biggest recent changes to Google Tag Manager.

Since server-side tagging in GTM is relatively new, I thought it would be a good idea to catch everyone up on this feature and how useful it will be for your tracking deployment.

If you haven’t set it up already, check out our handy guide and learn how to set up Google Tag Manager server-side tagging.

This tutorial will explain:

Let’s dive in!

What Is Client-Side Tracking?

Client-side tracking involves communication between the user’s browser (client) and the mother server for your tracking tools.

Confused? Let’s break this down a bit.

First, when a user enters a web page, their browser sends a request to the website’s server to access the page. The server sends back a document with HTML, CSS, and JavaScript—this is what the user sees as the web page.

Flowchart of web browser sending data to web server, which sends back a file comprised of HTML, CSS, and JavaScript

The JavaScript part of that web page file also includes our tracking codes. The browser executes these tracking codes and then sends data (such as the time, page path, etc.) to the mother-server, which could be tracking tools like Facebook Ads, Google Ads, or Google Analytics.

Extension of first flowchart, with Facebook Ads, Google Ads, and Google Analytics connected to the web browser with arrows

In traditional client-side tracking, there is a direct connection between the user’s browser and your tracking tools.

What Is Server-Side Tracking?

In server-side tracking, you build your own tracking server, which serves as an interface between the user’s web browser and your tracking tools.

Don’t worry, it’s not as complicated as it sounds. Let me show you how it works.

Using a tool like Google Tag Manager, you create a tracking server that is independent of the web server. This tracking server is the only thing that communicates directly with your tracking tools.

But how does tracked data get to the server? You can actually send data from either the client (browser) or from the website server.

Either way, the data only needs to be collected and sent from a user session once (just to the tracking server) instead of multiple times (once for each tracking tool).

Flowchart showing data passing from browser and web server to GTM tracking server, which sends data to tracking tools

What Is the New Server-Side GTM?

Although this feature is new to Google Tag Manager, server-side tracking isn’t really a new concept. Tools like Segment or Tealium have had this approach for years, and you could also send data to Google Analytics from the server-side via the Measurement Protocol.

So what’s the big deal about server-side tracking for GTM?

Well, you can now choose to create your own server in the Google Cloud to play the role of the tracking server directly from the GTM interface.

All you have to do is select the Server as the Target platform when making a new container.

Creating a tracking server in Google Cloud for GTM

Then, you simply configure your website data to be sent to the Google Cloud server. From there, GTM picks up the data, fires your Tags, and forwards that data to your tools like Google Analytics.

The setup isn’t really too hard, but it sometimes takes a while to get used to the new paradigm of server-side tracking if you’re used to client-side tracking. (To learn more, check out my tutorial for GTM server-side tracking.)

Once data is sent from the browser (or web server) to your GTM server-side instance, it needs to be claimed by something called GTM Clients. These clients are your tracking tools, like Google Analytics.

GTM preview console shows that Universal Analytics client has claimed the request
Then, these clients parse the data and trigger Tags, just like with normal client-side GTM tracking.
 GTM preview mode shows Tag fired in server-side tracking

The biggest challenge right now is that there aren’t many templates and Tags currently available for server-side GTM. This makes it a bit difficult to migrate your data from client-side to server-side for now.

Of course, this is likely to change rapidly, since the awesome GTM community always produces new templates. We just have to be a little patient.

The other thing to be aware of is the cost. Just like when you build your site on a web server on the internet, building a tracking server doesn’t come for free.

Google gives you a free sandbox at the beginning to test out your Tags and get it all configured if you’re still deciding whether or not to incorporate server-side tracking. But if you want to run this on a live website, you need to upgrade your account. This usually costs at least $100/month.

Use Cases for Server-Side GTM

So if it’s extra work and costs money, why would you still want to use server-side tracking in GTM?

The biggest factor is that you have more control since you are sending data to your own server.

Once the data arrives on your tracking server, you can do whatever you want with it. You can change it around, manipulate it, or add more data.

For example, you could:

  • Use your tracking server to strip Personal Identifiable Information (PII) from the request before you send it to your tracking tools.
  • Send certain data requests only to one specific tool rather than all of your tracking tools.
  • Add data that you want to keep secret from the client, such as an API key.

There are many creative uses for GTM server-side tracking, but the point is that you have much more control over your data before it goes on to your tracking vendors.

Server-side tracking can also improve user experience if you are using lots of different tracking tools. Since your GTM tracking server distributes data to your tools, the user’s browser only needs to send a single tracking point—just to your tracking server. This saves data resources and could improve site speed, leading to happier clients.

Another advantage to server-side tracking is that you send data to a domain that you own and that looks like your website. This is useful because client-side tracking sends data to your tools (such as Google Analytics), which some ad blockers may block.

Ad blocker browser extension recognizes and blocks tracking

Many ad blockers recognize the domains of tracing tools, but they’re less likely to notice when you send data to your own tracking domain. Therefore, server-side tracking could be a good way to circumvent ad blockers and get more data into your system.

However, note that this could change in the future when adblocker technology catches up. Once more people start using this technique, they will probably shut down this loophole.

Similarly, we could also get some help with the Intelligent Tracking Prevention (ITP) by Apple for Safari browsers.

The ITP introduced restrictions like a cookie expiration date, which is set differently depending on how you set your cookies. So cookies would only be valid in the Safari browsers for 1 to 7 days.

The revised timeline for classified domains’ cookies and website data looks like where Cookies are blocked in third-party contexts, existing cookies are purged, and new cookies are blocked

But with server-side tracking, you can actually send something called an HTTP cookie, which currently doesn’t fall under these restrictions. This can get you around the ITP at least partially.

However, this could also change at any point in time once the WebKit browsers change their approach as well.

Should You Use Server-Side GTM? 

Maybe some of these use cases have convinced you that server-side tracking is a good idea. So should you start using GTM Server-Side right now?

Well, I’d say hold your horses for just a bit longer.

While this is a really cool feature for GTM, it’s definitely not yet in primetime. It comes with some drawbacks, like the cost and lack of community resources.

If you plan on using server-side GTM for your website, you need to set this up on a server and pay for it on a monthly basis.

You should also not underestimate the cost that comes with migrating your tracking codes onto the server-side instance. You would need to re-implement and then test it all again. And this is still in beta, so a lot could still change even after you set everything up.

But if that doesn’t hold you back and you are one of the enthusiasts who really wants to tinker with this tech, you can get started right now. It’s pretty easy to set up, and you can check out my guide to server-side GTM here.


Overall, I’m super excited about GTM server-side tracking and what it will let us do in the future.

Although it may be a little while before server-side traffic is practical for most GTM applications, there are a lot of benefits for marketers. The increased control over data makes the investment in both time and money worth it, especially as the tool improves in the coming months.

What do you think: can server-side tracking solve some of your current challenges? Will you try it out while it’s still in beta, or will you stick to your client-side implementations for now? Let me know in the comments down below!


Master Data & Analytics with Measuremasters

Exclusive Courses & Workshops | Ongoing Troubleshooting | Support Resources, Tools & much more
Inline Feedbacks
View all comments

Blog Categories

Want to find the Best Sources for Learning GTM? Subscribe & Get our FREE Resource Guide

Google Tag Manager FREE Resource Guide

now it's time to

Start measuring like a master

Itching to jump into the world of MeasureMasters? This is what you have to look forward to.