Stape
Search
Try for free

What is Google Tag Manager server-side tracking?

Updated
Dec 12, 2024
Published
Sep 30, 2020
Also available in

In this blog post, we explore server-side tagging with Google Tag Manager (GTM). Unlike traditional client-side tracking, server-side GTM processes tags on a server, enhancing performance, security, and data accuracy. This approach also helps maintain user privacy by limiting third-party script access.

As data privacy regulations become stricter and tracking technologies evolve, server-side tagging offers a robust solution for modern digital marketing needs. Let's dive into how this technology works and why it's essential for your website.

What is server-side GTM?

There are two ways to collect data: client-side and server-side, both with their benefits and challenges. Traditional tag management, analytics systems, and advertising services collect data using the client-side tracking method. How does it work? With client-side tracking, the browser sends a request directly to a third-party tracking service like Google Analytics. The interaction takes place between two parties: the browser and a third-party service.

With server-side tracking, an intermediate point is added. In this case, it is the Google Tag Manager cloud server. The request first goes to the cloud server, which processes it and sends it to a third-party system (Google Analytics). This means the cloud server processes the request instead of the client's browser.

Here is a visualization of how server-side tracking works:

stape server gtm

What is a web GTM container?

A web GTM container is a Google Tag Manager environment that runs on the client-side within a user's web browser. It enables the deployment and management of tags (like analytics and marketing scripts) on a website without directly altering the site’s code.

What is a server GTM container?

A server GTM container is a component of Google Tag Manager's server-side tagging environment. It runs on a server instead of the client's browser. Handling tag processing and data collection server-side helps improve performance, security, and data accuracy.

a clear view with server-side tracking

A popular use case for a server GTM container is working with analytics tags. Instead of loading Google Analytics tags directly on the client's browser, the website sends data to the server GTM container.

Why is a server-side GTM container necessary?

Over recent years, data privacy regulations have become progressively stricter, and tracking-preventing technologies have also become more advanced. For instance, Safari and Firefox have already implemented Intelligent Tracking Algorithms that can block trackers. Safari has built-in Intelligent Tracking Prevention algorithms that cut cookies’ lifetime to 24 hours (most of the time).

What’s more, starting on January 4th, 2024, Chrome restricted third-party cookies for 1% of its Stable users. Chrome’s timeline indicates a significant shift in Q1 2025, with the start of the third-party cookie phaseout for all users. It all comes down to this: digital advertising methods reliant on third-party cookies to target consumers might become ineffective or even stop working altogether.

betterbuild.cc

One more point to mention here is privacy and data regulations. Numerous privacy concerns have been growing over the last years, so marketers and business owners expect the ITP technology to spread across all popular browsers and devices.

Different data protection regulations were developed in response to citizens' privacy concerns. First, there is GDPR. According to the GDPR, cookies qualify as personal data since they are used to identify users. So, GDPR cookie consent compliance is a must. GDPR is complemented by the ePrivacy Directive and ePrivacy Regulation, which also determine what user data you can collect and how you can process and store it.

Why use GTM server-side now?

How can you prepare for Intelligent Tracking Prevention while complying with the ever-stricter data regulations? How can you move from using third-party cookies to first-party cookies?

The answer is - to integrate the Google Tag Manager server-side container. If you set up GTM server-side on your website, AdBlockers and ITPs won’t be able to find your tracking technologies, leading to better data quality.

server-side tracking benefit

What are server-side GTM benefits?

Below are the top five benefits of SGTM:

  • With server-side tracking, the tracking code is executed on the server rather than the user's browser. This means the user's device does not need to store any tracking data, which is done entirely on the server side.
  • Website speed boost. Heavy third-party codes and JavaScript execution in user browsers are usually the biggest problems causing low website speed. Fixing them requires a lot of developers’ time. Moving JavaScript execution to the server side will make your website load faster and rank higher.
  • More accurate data collection and conversion tracking. Server-side tagging can help reduce data loss due to ITP and iOS restrictions and may also decrease the impact of AdBlockers.
  • Data control. Server-side tagging helps you control what data each vendor receives. They can access only the information you configured in the request.
  • Compliance and control. Server tracking ultimately allows you to control data flow, each vendor receives only information configured in your server-side tags.

These are only the top advantages of the GTM server container. We have a blog post on our blog covering all the benefits of server-side tracking in detail.

site speed

Why do you need both server and web GTM containers to set up server-side tracking?

To set up server-side tracking using Google Tag Manager (GTM), you need both a server container and a web container, which serve distinct purposes and complement each other.

The web container is responsible for managing and deploying tags on your website. It collects data from user interactions on your website (e.g., page views and clicks) and sends it to your server container. The web container holds the client-side tags, triggers, and variables that capture events and user information from your website.

On the other hand, the server container processes and forwards the data received from the web container to your desired endpoints (e.g., Google Analytics, Facebook Pixel) in a secure and controlled way. It acts as an intermediary between the web container and third-party services.

The server container gets data from the web container, processes it, and then sends it to the analytics and marketing platforms you set up. This setup helps to protect user privacy and improve data accuracy by handling data processing on your server instead of directly in the browser.

How can you start server-side tagging using Google Tag Manager?

To set up the GTM server-side on your own, you need to know how Google Tag Manager, Google Analytics, Google Cloud, and web technology in general work. Plus, your development team needs to be involved in this process, especially if you want to test it in the production environment.

Server GTM is arguably the best option for server-side tagging solutions among all tools. The main reason for this is that web GTM is free. What’s more, sGTM is cheaper than most of its competitors. Due to the community gallery, the number of integrations in sGTM is massive.

We created a tool to help you set up a GTM server-side container within minutes. It can be hosted either on your subdomain or our subdomain. The benefit of hosting it on a custom subdomain within the same top-level domain is that all requests will be considered a first-party cookie and prevent data loss.

There’s a detailed guide on how to set up server-side tracking with the Stape service on our blog.

Here is an example of steps needed to start server-side tracking with Stape:

Step 1. Create a stape.io account.

You might also want to set up the following options:

A bunch of tracking and advertising platforms support server-side tracking. You can find a list of platforms supporting Google Tag Manager server-side tagging and links to documentation on how to implement it on our blog as well. 

How much does a server-side container cost?

Google offers a free test environment. However, to integrate it into production, you must pay a minimum of $120/month + additional fees that depend on the website traffic.

Stape has a range of pricing plans to choose from: free, pro, business, enterprise and custom. Our free plan lets you get up to 10,000 requests per month. There is also a pricing calculator on our website that lets you figure out which plan is right for your site.

Conclusions

Is server-side tracking worth trying? We believe the answer is absolutely YES if you want to collect data about your website visitors using advanced technology in a privacy-compliant way.

When it comes to GTM server-side vs. client-side, the server-side option has numerous advantages at the onset of the cookieless era. With server-side tracking, you get more accurate data collection and conversion tracking, complete data control, and faster website load. You can gather more data efficiently and get insights client-side tracking could never provide. Most importantly, server-side GTM helps you stay compliant and treat customer data responsively. Arguably, compliance is a very important aspect of a business's reputation in customers' eyes.

If you have any questions about sending data to the server side in GTM, our team of experts can help!

Tagged with:gtm server

Try Stape for all things server-sideright now!