-
Written by Mikael Björkman
Mikael is a full-stack developer with almost two decades of experience. He is particularly fond of React and .Net Core. On his spare time he does not mind a good book or podcast.
There is so much upheaval in the world of analytics and conversion tracking that you would think digital marketers would be sort of used to it by now. But alas, a new shift in how data flows between websites and ad platforms has renewed the general sense of chaos in the industry.
But don’t worry about claims of impending doom or the “cookie-pocalypse.” A solution is at hand: server-side tagging.
While you may have heard of the term before, the concept is probably still a bit hazy for you. After all, it can quickly get a bit technical, especially when it comes to implementation. So let’s take some time to break down exactly what server-side tagging is, why it’s important, and how you can implement it.
The key terms to know
Server-side tagging. Server-side tracking. Conversion APIs. All three of these terms are often used in the same context. Normally, the speaker or author is trying to warn about the shift from third-party cookies to first-party cookies. There might even be mentions of Safari ITP or Firefox Total Protection.
Sure, having cookies at a party while on safari might sound great, but all these terms are enough to make your head spin. A few easy definitions should help with that, though.
First- and third-party cookies
Advertising platforms have traditionally used third-party cookies to identify users and store information about their behavior. They are termed third party, since they belong to the ad platform’s domain rather than yours. Unfortunately, this “outsider” status is what also made them a privacy concern. These cookies are a sort of homing device that is dropped onto a user’s browser after visiting a website that loads a specific line of code (usually a pixel) from the given ad platform.
A first-party cookie is one that belongs to your domain. The usage of this kind of cookie is directly connected to your site. They keep users logged in, store preferences, track what blog posts the user has read, and more. They are also becoming more popular for analytics and conversion tracking, since they don’t carry the same privacy concerns as third-party cookies.
Safari ITP and Firefox Total Protection
Both Safari Intelligent Tracking Prevention and Firefox Total Protection are privacy features that seek to protect user data while using each browser. They are also part of the reason you need to implement server-side tagging in a hurry.
Much like the concept of old pop-up blockers, these built-in privacy features prevent third-party cookies from being dropped onto a user's web browser.
They even restrict some first-party cookie uses. One such restriction is limiting allowed cookie lifetime. This can interfere with non-tagging related functionality on your site. And while Chromium based browsers like Chrome and Edge allow more cookie usage, it’s not hard to imagine them implementing a similar privacy feature in the near future.
You’ll need to keep these important restrictions in mind when setting up your tagging system, and you’ll also need to stay abreast of the latest updates to these features, too.
Server-side tagging
As we’ve covered before, server-side tagging is all about maximizing analytics and conversion tracking capability by moving tags (i.e., pixels or other scripts) from your user's web browser to your organization’s backend infrastructure. This confines data collection to a first-party context.
It’s important to note, though, that server-side tagging may create additional costs for your business, since the tag manager will run on your website or cloud provider infrastructure. The increase in operational costs is offset by the greatly increased data privacy controls. Plus, with fewer pixels and scripts to load when opening a webpage, your site performance will improve.
Server-side tagging helps confine all of your data operations to a more privacy-friendly first-party context. In other words, you can keep gathering insights from user behavior despite stronger privacy features being launched by the world’s most popular web browsers.
It can also help feed user data back to ad platforms, allowing them to improve performance. Which brings us to…
Conversion API
Pixels (basically just small scripts) used to be the gold standard for tracking user behavior and sending that data back to a given ad platform. This user data helped to confirm conversions and sales, leading to more accurate performance data on each platform. With the rise of advanced algorithms assuming control of operational processes like bidding, placements, and more, this user data is increasingly critical to the success of your digital advertising.
Since pixels rely on third-party cookies, though, they are being blocked by new browser privacy features. This might spell doom for digital marketers if it weren’t for conversion APIs.
Much like how an API acts as a gateway between two software systems, a conversion API can act as a gateway that sends first-party user data from a given website back to an advertising platform. In application, it connects your server-side tagging manager to the ad platforms.
While the concept may seem new (and, indeed, there is a new sense of urgency around the topic), conversion APIs have actually existed for quite some time. In fact, they have mostly been used to report conversions that occur outside of a user’s browser or app. Think: over-the-counter type sales or product returns.
How to implement server-side tagging
There are a myriad of ways to implement server-side tracking. Technically inclined folks might choose to do it themselves while platforms like Shopify and Hubspot offer ready-made plugins.
For non-developers, using a tag-manager is a common solution. A tag-manager helps you add, configure and run tags on your website without any coding skills. There are multiple to choose from. Examples include TagCommander, Adobe Experience Platform Launch, Google Tag Manager and Cloudflare Zaraz (still in beta as of writing this).
Of the above, Google Tag Manager is a popular and easy option to start with – both for client- and server-side tracking. Let’s give it a closer look.
Server-side Google Tag Manager
To set up Google Tag Manager on your server, you’ll need to install an additional piece of software so that the tag manager can become part of the user’s first-party context. That is to say, it needs to be part of your domain structure (i.e. gtm.mydomain.example). You can let Google host it or use a provider like Stape.
While these providers make it incredibly easy to set up for non-technical users, this is where the additional cost comes into play.
Once the tag manager software is up and running, you’ll need to follow a particular set of next steps:
- Serve GTM client assets from your new tracking domain. Server-side GTM has built-in support that allows you to host the required client-side assets on your new first-party domain. This will significantly increase your chances of avoiding the privacy-oriented browser features we discussed earlier. Some providers, like Stape, also offer additional improvements in file-level optimizations to increase those chances further.
- If adding server-side tracking to an existing client-side GTM-powered site, make sure to correctly configure the migration of Google Analytics cookies to its server-based first-party counterpart. Not doing so can result in losing an already established user association, creating new ones and skewing your analytics metrics.
- Maximize cookie lifetimes. The longer a user- or click-identifying cookie is allowed to exist, the higher the quality of user behavior data.
Privacy-oriented web browser features tend to allow server cookies to live longer than client set ones. Therefore, server cookies should be used wherever possible.
There are ways to extend cookie lifetime even further.Some providers, such as Stape, offer solutions that "resurrect" cookies after the user's web browser has removed them.
Additionally, installing your GTM behind the same content delivery network as the rest of your website can also improve cookie lifetime.
We recommend that you reach out to a provider directly if these steps still seem a bit too technical.
Deduplication
Most ad platforms recommend using their conversion APIs with your server-side tracking tools to complement the existing pixel approach. This helps to maximize the reliability and quality of the reported data.
However, doubling your tracking efforts will also double the data created. That means, for example, two instances of every event or conversion — leading to error-filled data and poor analysis.
To avoid this, you’ll need to perform deduplication. Much as the name suggests, this is removing duplicated data. This can also be quite a technical process, so be sure to reach out to your provider if you need some help implementing it.
Next stop: the future of digital marketing
Server-side tagging and conversion APIs are our links to the future of digital marketing. Without these tools, we would simply be at a loss — adrift in an ocean of marketing without the data rudder to steer us.
Plus, with increased scrutiny of user privacy protections, these tools and processes will only become more valuable. In fact, Google Chrome plans to ditch third-party cookie support by the end of 2024.
That will leave us in a world where all major browser providers have completely removed or severely limited support for third-party cookies. It will be interesting to see how that will affect the use of web browser pixels and what new technology will emerge as the most widely adopted standard.
The good news is that you now know how to navigate this new world and sail on to continued digital marketing success.
-
Written by Mikael Björkman
Mikael is a full-stack developer with almost two decades of experience. He is particularly fond of React and .Net Core. On his spare time he does not mind a good book or podcast.