Server-side tagging is now available within Google Tag Manager (GTM), putting better marketing effectiveness data back into your hands. Packed with tips from our in-house experts, this guide unpacks the principles of server-side tagging and how you can use it to evolve your measurement strategy in GTM.
Read on to discover the benefits of this approach, and ways to overcome common limitations that our analytics consultants have encountered. Need support with implementing server-side tagging in GTM? Contact our team today for a free consultation.
What is server-side tagging, and why consider it?
In recent years, the ability for web and ad analytics platforms to capture the page and attribution data we are used to has been decreasing. There are a number of reasons for this, including technical changes driven by privacy regulations, and in general, the response has been for tech vendors to collect less personally identifiable information.
At the same time, these technological changes have begun to have lasting impacts on the efficacy of the collection mechanisms previously used.
Collecting your ad tech and analytics through a server-side solution, such as Server-Side Google Tag Manager can give you many benefits, including:
- Improve data collection, including conversion tracking
- Reduce the impact of ad blockers by moving to a first-party context
- Extend cookie lifetime beyond third-party cookie browser limitations
- Better data governance and control
- Control which data is sent to each ad tech and martech vendor
- Enrich your data (via APIs and your first-party databases), but do so in a private and safe manner
- Reduced browser load; Increase page speed
- Send data once to your container, then from there to multiple platforms
- Moving tagging server-side can improve page load speeds by up to 7% (Case study)
If these benefits sound like they may help solve some of the challenges you have with your marketing data collection and accuracy, please get in touch with our Media Solutions team.
How does server-side tagging work?
Before running through the benefits, let’s take a look at how server-side tagging works and how it is different from traditional Google Tag Manager tracking.
Traditionally, Google Tag Manager has been 100% client-side. This means tracking scripts will run in the user’s browser when required and any related javascript files will be downloaded. Often these scripts will then set third-party cookies and begin sending data to the related marketing platforms directly from the browser.
Visualised below is a typical example of a website without Server-Side tagging. It shows how each event is sent directly to each platform directly from the browser.
With Server-Side tagging, this flow of data is different. A standard GTM container is still required, however this time, it works in parallel with an intermediary server-side container hosted with a provider of your choice. Instead of downloading and running multiple tracking scripts from your standard GTM container (often carrying out very similar jobs), you now only need to send one signal to your Server Side container. This can then be distributed directly to any platform that needs the data. This could be anything from a page view to a purchase event.
Website configuration with server-side Tag Manager:
Benefits of server-side tagging in Google Tag Manager
Simplified implementation of conversion APIs
Utilising a Google Server-Side container makes the implementation of server-side conversion APIs much easier. Currently, out of the box, you can utilise Facebook and Google Ads conversion APIs to send data directly to Google and Facebook Ad servers. This improves the accuracy of your conversion tracking in instances where the user may have an adblocker or is using a browser with enhanced tracking protection such as Safari or Firefox.
Full control over your data
When you place third-party tracking scripts directly on your website, vendors have the power to execute any code and collect any data they see fit. Whilst these are almost always trusted vendors, you still have less control over your data. With server-side tracking, you control exactly what data is collected without any third-party JS libraries being downloaded.
This level of control is crucial for safeguarding user privacy and compliance with GDPR, as you can implement strict PII filtering to ensure sensitive user information is not exposed.
Reduced load on customer’s browser
By moving tracking scripts server side, there is less to be downloaded and executed on the client’s web browser, reducing page loading times and making your website faster.
First-party cookie context
After setting up a server-side Google Tag Manager, you receive an automatically generated endpoint to send your measurement hits to. This can be changed to a domain of your choice such as a dedicated measurement subdomain e.g. measurement.impression.co.uk.
This means that any cookies set by your Server-Side GTM container will be first-party, bypassing the restrictions caused by browsers like Safari and Firefox which block them by default.
Hide tracking IDs and other identifiers
With client-side tracking, your account IDs are usually exposed and allow spammers to send bad data to your accounts. Whilst this isn’t a common issue, the added protection will ensure your data isn’t contaminated.
Currently, all these benefits are limited to a set of platforms that support Server-Side tagging. These are Google Analytics (Both UA and GA4), Google Ads and Facebook. Whilst custom scripts can be used for other platforms, these are the officially supported ones. This list will certainly expand over the coming months and years.
Limitations of server-side tagging in Google Tag Manager
Expertise and Hosting Costs
While Server-Side tagging fits neatly alongside client-side tagging, setting it up requires advanced tag management knowledge and some understanding of server architecture. If you are looking to utilise Google Cloud services such as Cloud Run, you will be guided through using the setup using a wizard which makes things easier to a degree. For other deployments such as App Engine or manual Docker deployments, you’ll also need experience with them specifically.
Implementing Server-Side tagging through Cloud Run is now the default deployment option within Google Tag Manager, replacing App Engine. As previously mentioned, GTM provides an installation wizard that walks you through the process and this has also been switched to Cloud Run. It offers better scalability, and cost-efficiency and makes global deployments of sGTM easier. This makes it an attractive choice for large businesses that have customers visiting their websites from across the globe. Although it’s been replaced, App Engine is cost-free for testing purposes which does provide a convenient starting point for beginners and users wanting to have more flexibility with testing. You then still have the option to upgrade to a production setup as needed.
An alternative deployment option is to use a Docker container which offers a high degree of control over your server-side tagging infrastructure. While it provides full autonomy over your setup, the process can become intricate due to the requirements for you to manage your auto-scaling infrastructure – however, this may be preferable for some enterprise organisations that have strict data processing rules. It’s important to note that this approach can incur costs depending on the chosen service infrastructure and may require careful management to optimise expenses.
Last but not least you have the option to use third-party providers who have their server architecture specifically designed for server-side GTM (sGTM). Providers such as Owntag.eu and Stape.io offer bespoke hosting packages just for sGTM. They also have clear pricing structures based on the number of events you need your sGTM to process each month.
These services are completely web-based and therefore incredibly easy to set up. After signing up for a specific package, you are then provided with DNS settings and instructions that guide you through all the steps required to get your sGTM setup ready to receive events.
Another key benefit of using these third-party services is that they offer additional features such as cookie extenders and custom loaders that will further improve your data quality. These features you don’t get with other hosting options and they would be challenging to implement manually.
Ultimately, whatever hosting option you choose depends on your technical expertise, budget and data processing rules your business needs to adhere to
For more insights and guides on measurement and GA4, be sure to take a look at our measurement blog. If you want to talk about your business aspirations, get in touch!