Server-to-server tracking is a method that more and more businesses use to better understand what users do on different websites or improve their advertising. It's different from older ways of tracking because it collects data more accurately, follows privacy rules better, and doesn't depend as much on third-party cookies and web scripts that can be blocked by web browsers.
The most common tool to integrate server-side tracking is the server Google Tag Manager container. There are two ways of integrating server-side tracking using sGTM: web+server (the most popular one) and server-to-server.
This blog post delves into server-to-server tracking using Google Tag Manager's server container capabilities. We'll explore how it works, its benefits, and how you can implement it to gain deeper insights into your analytics while maintaining user privacy and data integrity.
This method is the most popular one. With the hybrid method, you use a web GTM container to deliver data to the server GTM container. The two most popular ways to deliver data from the web to server GTM are server-side GA4 or Data Tag/Data Client.
Benefits of using server-side GA4 for sending data from web to server GTM:
Disadvantages of using ss GA4:
Server-to-server tracking is a data collection method that sends information directly from one server to another, bypassing the client or user's browser. S2S tracking is more challenging to set up than web+server. The fundamental difficulty of s2s tracking in sGTM lies in delivering and debugging data to sGTM. The most popular way to deliver data to sGTM is through webhooks, which can be sent from CRM or CMS.
Using webhooks from CRM to sGTM can provide valuable insights about offline sales. Configuring webhooks is easy in sGTM with the help of the sGTM preview header powered up by stape.
Using webhooks from payment processors is another popular way of delivering data to sGTM. It can be beneficial if you want to track recurring orders, upsells, or refunds in sGTM.
In this example, I will use the WordPress Stape plugin to send server data to sGTM. The debugging and retrieving of data in sGTM will be identical for all ways of delivering data to sGTM. So, it does not matter how you send data the steps of debugging and retrieving data will be the same for you.
1. Install Wordpress Plugin.
2. Open the General tab of the plugin settings and check that the following:
3. Go to the Webhooks tab:
4. Open the server Google Tag Manager container and enable the preview.
5. Go to your stape.io account and open the container for configuring server events.
6. Add Data Client to sGTM container.
7. Configure Data Client in sGTM.
8. Open sGTM preview mode and test that the webhook was processed successfully. I’ve made a test purchase on the site, and in the sGTM debugger, I can see /order requests that the Data client claims. If you go to the Event Data in the sGTM debugger, you should see all the information that was parsed by the data client from the webhook.
9. Now, when you’ve successfully processed webhook data in sGTM, the further setup goes similar to any other setup in sGTM. You can use this data to transfer to whatever server tag you want.
Server-to-server tracking has unbeatable advantages over web+server tracking, such as better accuracy and higher security standards. But in some cases, like server Google Ads tracking, setting up pure s2s integration is impossible because native server Google Ads requires using Google Analytics 4 requests, which works in a hybrid method. However, you can combine web+server and s2s tracking by implementing Google Ads offline conversions.
In this guide, I’ve outlined several ways of sending server data to sGTM and showed an example of configuring s2s tracking in sGTM with the help of the GTM server-side plugin by stape. When setting up pure s2s tracking inside sGTM, the most tricky part is debugging webhook data and retrieving webhook data in sGTM. Using the HTTP Preview header and Stape’s Data Client are helpful for these.
As we move towards a more privacy-conscious world, the methods and tools we use for tracking and analytics must evolve. Server-to-server tracking with sGTM is at the forefront of this evolution, providing businesses with the tools to make informed decisions based on comprehensive, reliable data.
Whether you're a marketer, webmaster, or developer, the insights provided in this post should guide you in making an informed decision about integrating server-to-server tracking into your analytics strategy. Embracing this technology means staying ahead in the digital game ensuring your analytics are insightful, compliant, and future-proof.
Wondering if server-side or client-side tagging is the right choice for your website? Here, we break down the pros and cons of each method to help you decide.Oct 31, 2023
In this article, we'll walk you through setting up the server-to-server Voyado tracking using server Google Tag Manager.