Contact salesTry for free

Google tag manager server-side: How to set up server Tag Manager, Universal Analytics, GA4, and Facebook conversion API

Ivanna Holubovska

Ivanna Holubovska

Author
Updated
Mar 27, 2025
Also available in

Server-side tagging has been one of the main trends in web analytics for the last couple of years. Ad blockers, Intelligent Tracking Protection, 3rd party cookie restrictions, regulations like GDPR made analytics and advertising companies start worrying about how and what information they collect about site visitors. Server-side tagging allows moving third-party tags off your site and into a cloud server. In this case, third-party pixels are loaded directly from the could server rather than your site. 

In this article, I will explain and demonstrate the basics of setting up Google Tag Manager server container, server Universal Analytics, GA4, and Facebook Conversion API.

Why use server-side tagging?

One of the first companies that started to talk about server-side tagging was Facebook. They announce a new method of tracking users in 2018. And in 2021, they renamed it to Facebook Conversion API and said that all FB advertisers should implement FB CAPI, making it almost mandatory.

The logic behind the Facebook conversion API is very similar to offline events: you push information about a user (email, name, phone number, etc.) and event data (such as click ID, event name, event id, etc.) to Facebook and they are trying to match a user from your site to a user in their database and assign the event to this particular user. The more information about the user and event you send to Facebook, the more likely they’ll match a user who converted on your site to a user in their database. Inside the FB events manager, you can see your event match quality. Event Match Quality has the highest rate of 10 and shows the effectiveness of the user information sent from your server in matching events to a Facebook account. High event match quality might have a positive impact on your ad performance and attribution.  

Though Facebook Conversion API is highly recommended (because of iOS 14 restrictions, ITPs, and ad blockers), you can still use browser tagging. There are several methods of setting up Facebook tracking:

1) Browser. If you are using only browser methods, most likely, Facebook will underreport events. Some researches show that around 80% of people are using Facebook only on mobile devices. iOS market share is approximately 30%. According to FB internal estimations, fewer than 20% of Facebook iOS users will allow tracking. In the end, your Facebook pixel will miss events data for around 16% of your site users. But of course, this number will vary based on your country, target audience, and product. 

2) Combined Browser + Server. This method has two sub-methods. 

     2.1) track all events both in the browser and on the server. This way, you can secure yourself from losing data about your clients. But for this method, you’ll need to set up deduplication. Otherwise, events will be tracked twice. Data won’t be accurate, and you’ll see an error inside the events manager on Facebook.

     2.2) Track some events in the browser and other events on the server. If you were using Shopify native Facebook app for conversion tracking and switched to the maximum data sharing, Facebook will track the Purchase event from the server and other events in the browser.

3)  Server. In this case, all events will be tracked from the server. It will help to collect data about all users and increase the page speed. With server tracking, it’s essential to send as many user data and event parameters as possible. All private information about your user that you send to Facebook should be hashed.

In 2020, Google released a new version of Google Tag Manager – server container. The logic behind server containers utterly different from what we used to have inside the web container. Besides that, Google added a new object to the server container – it’s called Client. 

Another big difference between web and server containers is that the server container is not free. If you use Google Cloud Platform, most likely, you’ll pay a minimum of $120/month. There is an option to set up a test container for free using one server. But Google recommends using a minimum of 3 servers to reduce the risk of data loss (each server costs around $40), but of course, you may choose to run fewer (or more) servers. 

Bear in mind that you cannot move all tracking pixels to a server-side. For example, LinkedIn and Twitter do not support server-side tagging yet. At the same time, you can move Facebook, Universal analytics, GA4, Snapchat, Bing, Reddit, Pinterest, Yandex, Klaviyo (and some other email platforms) to a server-side tagging. 

All these changes in Google’s and Facebook tracking infrastructure prove that the world of tracking will change in a couple of years, and server-side tagging might become a new standard of tracking user behavior. 

author

Ivanna Holubovska

Author

Content contributor at Stape.io, focusing on server-side tracking, digital marketing, and innovative solutions to optimize online business performance. optimize online business performance.

Comments

Try Stape for all things server-side

What’s going on?

Where are we going?

Attention!
This is a stand-up dog zone.