Analytics and Data Science
Server-side tracking is the latest container type within Google Tag Manager. This container type switches tracking from the browser or app (client-side) to the cloud (server-side) for processing. This is a fundamental shift and provides several advantages from a performance and security point of view. The key advantages of server-side tracking are:
In this blog, we’ll provide five tips and considerations to help you get started with server-side Google Tag Manager.
Server-side containers introduce a new mechanism called clients, which are not found in the common web container. It is therefore important to understand the concept of a client before making any changes to a production-ready server-side container.
A client is created to claim an incoming request based on priority. Once a client has claimed a request it processes and transforms the data into an event that the container can understand with the use of tags, triggers and variables. A response can also be sent back to the requestor.
Popular tags such as Google Analytics will have clients pre-built and are immediately available in the container. It is also worthwhile keeping an eye on the community template gallery as it expands to see if a client already exists for the tracking you’d like to add.
This official guide will give you a more comprehensive overview of how clients work.
The server-side container approach naturally links up with Google’s own cloud technology platform, Google Cloud Platform (GCP). You can automatically provision a central US-based tagging server within the Tag Manager interface, but this may not be the best option for your business. In the default scenario, all tracking requests will be processed in this location, which is inefficient if most of your website or app traffic originates from outside of the US.
Manually provisioning a tagging server in or as close to your core users as possible will improve tracking responsiveness and reduce GCP costs by eliminating the distance at which network traffic must travel.
This step-by-step guide will assist you through the process of manually provisioning a tagging server. A note of caution, however, some technical expertise is required!
The default tagging server will be hosted on an automatically generated Google App Engine domain. This will be the URL endpoint at which you will push tracking requests to the server container. However, it is highly recommended that you create your own custom website subdomain as your endpoint (example: tracking.yourwebsite.com). This will enable you to:
This step-by-step guide will help you set up a custom domain for your tagging server. You will likely need IT support to assist with the domain creation and configuration.
This route would require some careful technical planning but would be worthwhile in a competitive market where every positive gain counts.
You will get one server within your GCP project if you choose the automatic provision option when creating a server-side container. This may be fine for low traffic websites/testing reasons, but you’ll likely need to upgrade to an App Engine Flex Environment with autoscaling enabled for production deployments.
The minimum and maximum number of servers required will depend entirely on the amount of traffic you expect to receive. On average each server is expected to cost around $40 per month. It is therefore important to estimate traffic levels and GCP costs prior to deployment. It is also advisable to review usage as the project progresses to ensure it is set up correctly for your needs.
Want the latest data news delivered straight into your inbox?Sign up to our email newsletter