Server-side tagging vs client-side tagging

February 15, 2022

Understanding user actions on your site can be the difference between success and failure. By analyzing users' behaviors, you will have a better idea of what they are interested in why they are leaving. It also allows communicating more personalized offers relevant to each customer specifically.

One of the most popular ways of tracking is Google Tag Manager. It allows you to quickly and easily update measurement scripts and related code fragments (collectively known as tags) on your website or mobile app.

In 2020, Google introduced a server-side container for Google Tag Manager. It can work together with the web GTM container and use web GTM as a data source; or independently and use webhooks, CRM data, or any other requests as a data source. So, is it necessary to switch to the server-side method of tracking? 

In this article, I will talk about how server-side tracking differs from client-side, highlight the advantages and disadvantages of each system, and explain why Stape hosting is the best solution if you want to set up server GTM.

What is client-side tagging and why is it no longer enough?Copy link to this section

Client-side tracking is a common type of tracking where the user's browser interacts directly with analytics services. When a site page loads, the container is loaded simultaneously, tracking codes are triggered, and all interaction data is sent to analytics services. Such services can be Google Analytics as well as Google Ads and others. 

client side tracking

In the last few years, client-side tracking has been failing. Namely, the speed of the page decreased sharply, problems with security and with third-party cookies appeared. All because of heavy scripts (which overload the site), unwanted data leakage, low control, and increase of ad-blockers. 

This is when server-side tracking comes along to deal with these issues. It is becoming more popular, transparent, and accessible. 

What is server-side tagging?Copy link to this section

Server-side tracking is a different new type of tracking that involves a server instead of a client. You create, install and manage it yourself.

The working principle is the same as in client-side tracking, but with one additional step - it is a cloud server container. It is on that server that the tag manager gets the data from the browser and then redirects it to the analytics systems.

server side tracking

Instead of sending event data directly to analytics services, the data is sent first to sGTM and only then to the analytics services you use. User requests go to the server, then the Client transforms them into event data handled by tags, triggers, and other variables. 

Why is server-side tagging a success?Copy link to this section

Server-side tracking can speed up your site, handle data loss due to ITPs, iOS restrictions and reduce the impact of AdBlockers. This is all for two reasons: using a custom subdomain for server-side tracking, which sets first-party cookies and server-side data streams that can't be blocked or detected.

Server-side tracking can significantly improve the page speed by replacing third-party tracking scripts with server-side integration. Check this blog post to see the list of all platforms that support server-side tracking.

SS tagging is the best way to keep your customers and event data safe. Vendors have access only to data configured in the request. They do not have any technical possibilities to see other user or event information. While with client-side tagging, scripts can collect any information they want.

Last but not least is the ability to set first-party cookies. It is possible only if you use a custom subdomain for your tagging server. A custom subdomain should be located under the same hierarchy as your main site. For example, if your site is, your sGTM subdomain should look like In this case, Facebook, Google Analytics, or any other platforms that are using server-side integration will be able to set cookies from your domain name - first-party cookies.

But there are also two main disadvantages of ss tagging: cost and complexity. The critical component of ss tagging are cloud servers that handle all requests data, and you need to pay for servers separately. Though sGTM looks similar to the web one, the logic of setting up ss tagging is entirely different. It may result in misunderstands and complications when building ss tags.  

Pros and cons of client- and server-side taggingCopy link to this section

BenefitClient-side taggingServer-side tagging
Data protectionlowhigh
Data controllowhigh
Adblock resistancelowhigh
Functionalityhighin process

How can you use Stape for server-side tracking?Copy link to this section

Stape hosting for server Google Tag Manager is the cheapest and easiest way to set up a cloud tagging server for sGTM. Using stape, you can set up an sGTM tagging server with one click. We offer a free plan for small sites and two plans for the bigger ones: Pro ($20/month) and Business ($100/month)

Google recommends using at least 3 cloud servers per container in the production environment for redundancy, and it will cost $120/month on Google App Engine. We offer the same setup for $20.

Besides price and simplicity stape has other benefits:Copy link to this section

  • Custom gtm.js loader
  • Preview header
  • Faster gtm.js/gtag.js/analytics.js loading time
  • No need to run scripts if you want to upgrade to the production environment
  • No additional configuration in the server GTM container
  • Autoscaling
  • Access and billing
  • Account sharing
  • Logs
  • API

Conclusion:Copy link to this section

Client-side tracking is a great way to get your hands on data, but it’s not reliable and secure anymore. Plus, heavy javascript files can significantly decrease your site performance.

Server-side tracking is a powerful tool that has a number of advantages and eliminates all of the problems from client-side tracking. However, it also has some disadvantages that you should consider before implementing it on your site. 

Tagged with:GTMgtm serverTag

Host your GTM server at Stape

By signing up you agree to Stape’s Terms of Use and Privacy Notice