Since Google released server container for Google Tag Manager (sGTM), it became possible to replace client-side tracking with server-side one. Replacing client-side tracking with server-side tracking is highly recommended based on recent changes in third-party cookies and tracking restrictions. Alternatively, you can use web and server tracking in parallel.
This post describes the potential and most common server-side tagging use cases.
The main attribute of server-side tracking is a cloud server that acts as an intermediary between your data source and third-party tracking platforms. Let's discuss server-side tagging using the Google Tag Manager server.
The first step is to set up a cloud server that hosts a container. Then, create a data stream for sGTM and distribute the data to your tracking tools.
The significant advantage of server-side tagging is the ability to set first-party cookies. Browsers with Intelligent Tracking Prevention mechanisms (like Safari and Firefox) have already limited the use of third-party cookies. In Google Chrome, the most widely used browser with over half of web traffic, third-party cookies will be phased out of Google Chrome in 2024. With the help of server-side tagging, you can set first-party cookies and extend their lifetime.
The second significant advantage of server-side tagging is loading scripts from your domain. For example, you can load gtm.js or gtag.js from your domain. You can even replace gtm.js with random symbols, making tracking even more accurate. It helps make tracking resistant to tracking prevention mechanisms, adBlockers, etc.
We also wrote about how client-side tracking differs from the server-side and covered server-side tagging benefits in our blog.
Facebook Conversion API allows you to send any event (standard and custom) from your server to the Facebook server. Facebook recommends using both web and server-side tagging. To prevent overreporting, you should set up event deduplication if sending events from both the web and the server.
You should send user data to help Facebook match users on your site with users in their database. Facebook asks you to send as much user data as you have. Each event gets an event match quality score from 0 to 10. This score depends on the number of user parameters and the parameter's quality. Before sending any users' data to Facebook, ensure it complies with the privacy policy and that you received user consent to share data with third-party networks.
The most significant push FB CAPI received was when Apple implemented web app tracking transparency. Facebook conversion API helps track users who have opted out of tracking on iOS devices.
If you are interested in the detailed guide on how to set up FB CAPI using the server Google Tag Manager, please follow this blog post on setting up Facebook conversion API using server Google Tag Manager.
Google explains the need to implement the Google Analytics server slightly differently than Facebook. The technology behind server GA 4 also differs from that of FB CAPI.
Google says that server-side GA helps increase cookie lifetime. Since GA does not have event deduplication, you must use web or server tracking. If you want to use both, just use different GA properties.
Increasing cookie lifetime might seem minor, but it may lead to inaccurate attribution to the traffic source responsible for the conversion.
We also have a step-by-step guide on setting up the server Google Analytics 4.
Server-side Tag Manager allows you to move your Google Ads conversion tracking tags from the webpage to server, which will help improve page load time and increase the accuracy of conversion tracking. Moving Adwords tags onto a server will reduce the amount of code that needs run in the webpages and aid with performance issues for slower internet connections as well.
Google Ads conversion tracking is a must if you want to have enough data to analyze your ad campaign results and give Google machine learning algorithms more information about your business goals.
If you want to learn more about configuring server-side Google Ads tracking, please check our blog post.
The TikTok events API technology is similar to Facebook's conversion API. It lists recommended events, event parameters, and user data that should be sent to TikTok servers. You can also use a test ID to test TikTok server events in real-time.
TikTok also supports event deduplication. A hybrid approach—web and server tracking—is possible. If you do so, remember to set event_id from both browser and server to let TikTok know about redundant events. We have instructions on how to set up the TikTok events API using Google Tag Manager.
Server-side tagging enables tracking of offline conversions, such as phone orders, in-store purchases, and data from the CRM. It also lets you see leads progress through the sales pipeline. This way, you get better insight into the performance of paid campaigns on social media or search platforms. It is particularly important for businesses with significant offline sales or longer conversion funnels.
With Stape sGTM Preview header config, configuring and testing offline data in sGTM is simple. We’ve got blog post on debugging offline data in sGTM and using webhooks to send data from your CRM to the Facebook conversion API if you need more info on the topic.
Unlike web tracking, server integration lets you integrate email software entirely with your site, including creating new contacts. Server-side integration speeds up your site's work because no third-party Javascript runs in the user’s browser. Stape created server GTM tags for ActiveCampaign, Klaviyo, Mailchimp and will be ready for more in the future.
Stape also created server GTM tags for a wide range of other platforms supporting Google Tag Manager server-side tagging.
Setting up a server Google Tag Manager container is easy with Stape.
1. Open your WEB Google Tag Manager container https://tagmanager.google.com/.
Click Admin. Under the container column, click +
2. Type the container name, choose Server, and click Create.
3. Choose Manually provision tagging server, copy your container config and paste it in any text editor. We will need it for the next steps.
4. Go to stape.io and create an account or log in.
5. Click Create container on the top right.
6. Enter your container details:
And you are all done! That’s how easy it is to host your server container on Stape.
There is a detailed tutorial on How to set up Google Tag Manager Server Container in our blog as well.
7. Choose a plan for your container. You can start with a Free plan. Click Continue with a Free plan.
8. You will see the status of your container, container config, and plan name. It takes around 5 minutes to deploy a server container. Please reload the page to update the status. If the Google Tag Manager server-side setup was done correctly, you should see the status “Running”.
That's it! Your container is up and running.
We have a more detailed guide where you can learn. how to set up a custom domain, set up GA4 analytics and test your container on our blog.
Server-side tagging is a powerful tool that can help you track user behavior and measure the impact of your marketing campaigns better. We’ve outlined the most common use cases for server-side tagging, but there are many other possibilities and platforms that support server-side tracking. If you need help setting up server-side tracking, contact us. Our team is happy to help you get started.
Stape has lots of tags for server GTM! Click on Try for free to register and check them all.