Stape
Search

Server-Side Tracking Use Cases

Updated
Jun 5, 2024
Published
Mar 8, 2022

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.

What is server-side tagging, and how does it work?

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.

How server-side tracking works - Stape

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.

What are the most common use cases of server-side tracking?

Set up Facebook Conversion API

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.

Server-side Google Analytics 4

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. 

Server-side Google Ads

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.

TikTok events API

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.

Track offline data

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.

Server-side email software integration

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.

Enhance data security and privacy

  • Data security. Server-side tagging gives you fuller data control since data is processed and stored on your servers before it’s sent to third-party services. By doing so, you can achieve better compliance with data protection regulations.
  • Privacy compliance. When you go with server-side tagging, you can ensure that only the necessary and compliant data is shared with third-party services. This helps you reduce the risk of data breaches and keep user trust.

Performance optimization

  • Improved page load times. By handling tracking and analytics on the server side, you can reduce the amount of JavaScript running in the user's browser. This results in faster page load times and improved user experience.
  • Reduced client-side processing. Offloading data collection and processing to the server can reduce the load on the client side. This change boosts the performance of web applications, particularly on devices with limited resources.

Custom data enrichment

  • Advanced data enrichment. Server-side tracking permits the integration of additional data sources, such as internal databases or third-party APIs. This way, you can enrich event data before sending it to analytics platforms.
  • Complex data transformation. Perform complex data transformations and calculations on the server before sending the data to third-party services, ensuring cleaner and more accurate data.
  • Refined attribution models. When you extend cookie lifetimes and combine web and server-side data, you can achieve more accurate attribution models. This way, you can get better insights from your marketing campaigns.
  • Bypass ad blockers. Server-side tagging is less likely to be blocked by ad blockers since the data is sent directly from your server. You get more reliable data collection.

Improve integration with other systems

  • Integration with internal systems. Server-side tracking enables straightforward integration with internal systems like ERP, CRM, and other business intelligence tools. It makes comprehensive data analysis possible.
  • Custom workflows and automation. Based on server-side event data, you can create custom workflows and automation to trigger marketing campaigns or operational alerts.
  • Offline Data Integration. With server-side tracking, you can integrate offline conversion data, such as in-store purchases or phone sales, with online data to create a complete view of the customer journey. This way, you finally get a complete picture without any missing puzzles.

How to get started with server-side tagging?

Setting up a server Google Tag Manager container is easy with Stape.

1) From your Tag Manager account:

Select the needed account → Click Admin → Click + next to the Container name.

Creating a new server container - Stape

2) Add Container Name → Under Target platform, choose Server.

Creating a new server container - Stape

3) Click Create.

Creating a new server container - Stape

4) Choose Manually provision tagging server.

Create server container on Stape.

5) Copy container configuration and add it to the sGTM container setting on Stape. 

Create server container on Stape.

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.

Conclusion:

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.

Tagged with:gtm server

Host your GTM server at Stape