Server-side tagging is the process of moving tags and third-party scripts off of your company’s website and onto a server that your organization owns and control.
Currently, most websites/applications use client-side tracking. Essentially, this means that all of the scripts and tags are placed and loaded in the source code of the actual website. The data is then sent to the appropriate places (e.g. Google Analytics).
Server-side tagging is distinct in the fact that a server (like Google Cloud Platform) sits in the middle of the website/app and directs the data to the appropriate place. Metaphorically speaking, think of this approach like an air traffic controller. You (or your organization) decides which planes (data) comes in and direct it to the appropriate landing spots (such as Google Analytics)
Why You Should Consider Server-Side Tracking
Server-side tracking is important for the following reasons:
- It reduces the number of tags and scripts that a website loads which can lead to a faster website and an overall better user experience. (And in many cases, a faster website can lead to a higher conversion rate.)
- It gives you the ability to inspect/alter data before sending it off to its final destination (such as Google Analytics). For example, you may notice some personal identifiable information (PII) in a data stream. When it hits the server, you can alter it before sending it to Google Analytics. This reduces the risk of regulatory liability (e.g. GDPR, CCPA)
- Because server-side tagging is not frequently used, a fair amount of web browsers do not have the same level of restrictions/blocks. For example, many analytics blockers are set up to stop traffic flowing from a Google Analytics domain/URL, but not from a custom domain (e.g. gtm.domain.com).
[Note: Using a first-party hostname has its advantages. Most ad blockers block third-party hostnames and scripts. Using a domain/url like gtm.domain.com makes it less likely that tracking will be blocked. However, it’s very important that you ensure you are still complying with relevant privacy regulations.]
Who Should Consider Server-Side Tagging?
Before starting a server-side tagging endeavor, it’s important to evaluate whether or not your organization is ready. To know whether or not server-side tagging a potentially-beneficial option for your company right now, consider the following points:
- You should already have a pretty solid understanding of Google Tag Manager.
- Setting up GTM server-side tagging is more technically-complex than a standard implementation, so it’s important that your organization has a robust technical team available. A lack of developer buy-in/resources can be a bottleneck to implementation.
- If your organization deals with a fair amount of PII data, server-side tagging could improve control.
- Your organization will likely benefit from server-side tagging if you deal with a fair amount of PII data (because of the improved control that server-side tagging affords).
- If you have a need to mix datasets, then server-side tagging may be beneficial. For example, your organization can send a product ID to the server and then populate the rest of the product information when it hits the server.
Pros and Cons of Server-Side Tagging
- With server-side tagging, there is no longer a need to have as many scripts and tags on your website/app, which may improve site performance
- Your organization will be able to sanitize data (specifically PII data) before sending it off to its respective destinations.
- With server-side tagging, an organization can combine data on it’s server before sending it off to its destination. For example, an organization can add product information before sending the data to Google Analytics.
- It can be difficult to debug/check if the correct data is being collected. In traditional web development, the heavy lifting is handled by the actual website, so it is very easy to check if the correct analytics are firing with tools like Charles Proxy.
- It requires a paid server on Google Cloud Platform.
- It requires a complete overhaul of your analytics strategy and implementation. An offshoot of this is that server-side tagging via GTM is fairly new, and thus the documentation and people with the expertise is comparatively sparse.