-
SectorOthers
-
CountriesGlobal
In the current context of digital analytics, the protection of user privacy and the evolution of cookie management are driving major changes in how we collect and process data. Regulations such as the GDPR have established clear restrictions on the use of cookies that mean that browsers are implementing more aggressive blocking of third-party cookies. This is pushing to look for alternative methods that ensure quality data collection, but respect users’ privacy.
This is where GTM Server Side comes into play as a powerful alternative to GTM Client Side. Unlike traditional GTM (client side), which operates in the user’s browser and relies directly on cookies, GTM server side allows user data to be sent first to the site’s own server before being passed to platforms such as Google Analytics.
GTM Server-Side Web Configuration
This approach provides greater control over data by reducing the reliance on cookies.
Given this situation, we have decided to implement the measurement in GA4 through both methods, one measured with GTM client side and the other with GTM server side. This way we will be able to compare the results obtained in both Google Analytics properties.
How did we do it?
To carry out this comparative implementation through GTM client side and GTM server side, we have followed a structured process in several stages to ensure the correct configuration, accurate data collection and sending it to GA4:
- GTM server side container creation and implementation. We created a specific GTM Server Side container, deployed it on a server and performed initial testing to verify its operation.
- Custom domain verification and mapping. We set up and verified the custom domain of the server side container to ensure that data is sent from our own domain, which would reduce dependency on third party cookies.
- Client configuration on GTM server side. Configure the specific client to process incoming requests from the GTM client, allowing for effective and seamless communication of data from the web environment to the server.
- Modification of GTM client to redirect data to GTM server side. We adjusted the configuration of the GTM client side container to send data from the web directly to GTM server side.
- Validation of incoming requests on GTM server side. We check that all requests sent from GTM client to GTM server side are received correctly, monitoring the consistency of the incoming data and verifying its correct processing.
- Sending data from the server side container to GA4. We configure tags and clients on the GTM server side to send data to GA4 in a controlled manner, ensuring that the data collected meets the measurement target and is aligned with the GA4 configuration.
- SGTM update and publication. We update the container configuration and publish the setup.
This approach ensures that both configurations (client side and server side) are operational and can be accurately compared to assess their differences in measurement and impact on the quality of the data obtained.
Results
To compare both client-side and server-side GA4 measurement implementation methods, we focused on analysing the main metrics of the ecommerce conversion funnel. The idea was to see if there were any noticeable differences in the data recorded by each method and to evaluate if the new server-side configuration brought improvements in terms of the main event data.
On reviewing the data, we found that the results between the two configurations are very similar.
Client vs Server daily transactions
In the image you can see that the total transaction numbers hardly differ, with only about 120 more transactions captured by the server-side implementation, which represents a difference of about 0.94% compared to the transactions measured by GTM client side (traditional). Furthermore, the daily transaction patterns remain almost identical between the two, which indicates that there is a great deal of consistency in the data collected.
On the other hand, the funnel steps (such as product views, cart additions, checkout initiations and purchases) also show very close figures between the two methods. This similarity allows us to confirm that GA4 measurement using GTM client side is still reliable today and serves its purpose well, accurately reflecting user behaviour on the web.
Advantages and Disadvantages
Implementing GA4 using GTM server-side has several interesting advantages, especially if the focus is on optimising data quality and maintaining control. For example, this method can help reduce page load time by relieving the browser of some of the processing. It also allows for much more precise control over what information is sent to the platforms, which is ideal for preventing the accidental sending of personally identifiable data (PII).
Another great benefit is that, by operating in a controlled environment on the server, the impact of ad blockers, which often block scripts running in the user’s browser, is significantly reduced. This means that you can get more complete and accurate data, even when users have ad blockers enabled.
However, it’s not all plain sailing. Using GTM server-side involves certain challenges that cannot be ignored. Firstly, it is a costly solution, as it requires cloud infrastructure, which can be an obstacle for teams on a tight budget.
On the other hand, it is a more technical and complex implementation than the traditional GTM client side. This means that not only does it require a higher level of expertise to set it up, but it can also be more complicated to debug, which ultimately translates into more man hours and maintenance effort. If your team is not familiar with this type of configuration, it can be a significant time investment.
Conclusions
So, is it worth making the leap to GTM server-side? Based on our test results, we found that, on a measurement level, the traditional GA4 configuration using GTM client-side is quite robust and reliable. The data captured by both approaches was virtually identical, with a minimal difference of only 0.94% in recorded transactions. This confirms that GTM client side remains a fully valid option for measuring web performance.
That said, it is important to consider the additional advantages that GTM server-side offers, especially if data privacy and performance optimisation are priorities for your business. However, you also have to be realistic about the challenges involved: not only is it more expensive to implement, but it also requires more technical expertise and more time to set up and maintain.
In short, if you already have a well-optimised setup with GTM client side and you are getting reliable data, there may be no need to rush to migrate to server side unless your strategy requires deeper control over data collection.
Ultimately, as always, the choice will depend on your specific needs, your available resources and your priorities in terms of data and privacy. GTM server side has a lot of potential, but it is not a magic solution for everyone. Evaluate your priorities and resources before making the decision, because it can be a powerful tool, but only if implemented with a clear strategy.
This content is translated with AI. Read article in its original language.