Server-side tracking
Server-side tracking is a setup where data about events on the site (a view, the cart, a purchase) is sent not straight from the browser to Google, Meta and other services, but first to your own server, and from there passed on under your rules. In Google Tag Manager this is called server-side tagging.
This is not legal advice: below is what the sources say, with links.
How it works
In the classic setup, the visitor's browser loads a pile of third-party scripts and sends them data itself. In the server-side setup, `gtag.js` sends requests to your server container (the address is set with the `server_container_url` parameter), the server turns the requests into events, and tags forward the data (Google, Server-side tagging).
The server runs in your Google Cloud project or in another environment of your choice; only you have access to the data before it is passed on, and you control which data goes where. Google strongly recommends hosting the server on your own domain (same source).
What it gives you
According to Google's documentation (overview):
- page speed: part of the tags' work is moved from the browser to the server, which can improve loading;
- control over data: you decide which fields to give each vendor;
- data quality: Google lists this as a benefit without explaining the mechanism.
Google notes that for the full benefit you need your own domain for the server container.
What server-side tracking does not solve
- Consent. Google's documentation says it directly: server-side tagging does not remove the need for consent; you need a consent solution on the site, and Consent Mode works together with your CMP and is configured in the web container (Google, Consent mode with server-side). For the EU, consent is needed to store or read data on a device (art. 5(3) of Directive 2002/58/EC), and further processing falls under the GDPR. Supervisory authorities in the 2023 Taskforce confirmed that the GDPR applies to further processing, and that a breach of art. 5(3) means further processing cannot be lawful either (EDPB, Taskforce).
- Personal data. Data from the server is the same data; as its controller you are responsible for what you send.
- Safari blocking. WebKit limits cookie lifetime to 7 days if a subdomain points to a third party via CNAME, and deletes cookies and storage created by script after 7 days without interaction (WebKit). A server-side setup on your own domain does not help everywhere: the details depend on the configuration. Check in practice how it works for your setup.
- Complexity and cost. It is your own server: hosting, maintenance, monitoring. Google's documentation does not discuss cost.
- Quality of setup. If events are described incorrectly, they are just as incorrect on the server.
When to consider it
- The store invests seriously in advertising, and measurement losses are noticeable.
- You need control over what is passed to vendors (hiding extra fields).
- You have the resources to maintain a server technically.
For a small store, the priorities are: a proper banner, Consent Mode, clean event markup and your own data (first-party data). This is my assessment, not a conclusion of the sources.
Common mistakes
- Treating server-side tracking as a way to "get around the banner".
- Moving everything to the server without understanding what exactly is passed.
- Not setting up your own domain for the server.
- Not passing the consent state to the server.
FAQ
What is server-side tracking in plain words? Data goes from the site to your server, and from there to advertising and analytics systems.
Is consent needed with server-side tracking? Yes, if data is stored or read on the device of a visitor from the EU, or personal data is processed further. According to Google's documentation, server-side tagging does not remove the need for consent.
Can it get around ad blockers? The sources do not claim this; Google promises only better data quality without explaining the mechanism.
How much does it cost? Google's documentation gives no cost: it depends on hosting and traffic.
Does a small store need server-side? It depends on ad volumes and technical resources; set up the banner and Consent Mode first.
Related terms
Sources
- Google, Server-side tagging: overview — developers.google.com/tag-platform/tag-manager/server-side
- Google, Introduction to server-side tagging — developers.google.com/tag-platform/tag-manager/server-side/intro
- Google, Consent mode with server-side tagging — developers.google.com/tag-platform/tag-manager/server-side/consent-mode
- WebKit, Tracking Prevention — webkit.org/tracking-prevention
- Directive 2002/58/EC, art. 5(3) — eur-lex.europa.eu/eli/dir/2002/58/oj
- EDPB, Cookie Banner Taskforce report (17.01.2023) — edpb.europa.eu/system/files/2023-01/edpb_20230118_report_cookie_banner_taskforce_en.pdf
Related
Selling abroad from Ukraine: logistics, duties, payments
Cross-border e-commerce is selling goods to buyers in another country through your own site or a marketplace. For a Ukrainian store this means three separate tasks: getting the goods across the border, handling the duties and taxes of the buyer's country…
Personal data in Ukraine
Personal data in Ukrainian law is information or a set of information about an individual who is identified or can be specifically identified. Its processing is regulated by the Law of Ukraine "On Personal Data Protection" of June 1, 2010, No. 2297-VI. A new…
Returning goods to an online store
A product return is the process in which a shopper gives a purchased item back to the seller and receives money or an exchange. In Ukraine, the shopper's rights are defined by the Law "On Consumer Rights Protection," and the rules for returning an online…
PRRO and fiscalization for an online store
A PRRO (software cash register, "програмний реєстратор розрахункових операцій") is a program registered on the tax authority's fiscal server, through which the seller carries out a payment and creates a settlement document (a fiscal receipt) (Law No.…