UTM and server-side tracking
Server-side tracking reads the UTM parameters from the incoming HTTP request on your server, rather than relying on a browser tag to capture them. This makes campaign attribution resilient to ad blockers, script failures, and consent-gated client tags. The trade-off is that the server sees the landing request but must be designed to persist the campaign context across the visit. This page covers the mechanics and limits.
Why read UTMs on the server
A client-side tag only captures the UTM if the browser loads and runs the script and the visitor consents. Ad blockers, network failures, and strict privacy settings can all prevent that, silently dropping the campaign.
Reading the utm_ query parameters from the landing request on the server captures them before any of that can interfere. The request reaches your server regardless of client-side script execution.
- Survives ad blockers and script failures
- Captured before consent-gated client tags load
- Reads utm_ directly from the request URL
Persisting context and limits
The landing request carries the UTM, but subsequent page views may not. Server-side setups persist the captured campaign in a first-party session so the whole visit is attributed, not just the entry page.
Server-side is not a privacy loophole: downstream use of the data still must respect consent. And it cannot recover a UTM that was never on the link — it only captures what arrives.
How it appears in analytics and logs
When UTMs are read server-side, every landing request carrying utm_ parameters is recorded regardless of whether the browser ran an analytics script. A gap between server-side UTM counts and client-side ones usually reflects client tag loss (blockers, consent, errors), not real traffic difference.
Diagnostic use case
Capture campaign attribution reliably by reading utm_ parameters from the request server-side, so a blocked or failed client tag does not silently drop the campaign.
What WebmasterID can help detect
WebmasterID is built around server-side measurement: it reads UTM parameters from the request, classifies bots versus humans, and records campaign source without depending on a client script, so attribution holds up when client tags are blocked.
Common mistakes
- Assuming server-side captures campaigns even when the link was never tagged.
- Reading UTM on the landing page but not persisting it across the session.
- Treating server-side tracking as exempt from consent for downstream profiling.
- Comparing server-side and client-side counts and assuming the gap is error, not blocker loss.
Privacy and accuracy notes
Reading a UTM server-side processes link metadata in the request, not personal data. Server-side tracking still requires honouring consent for any downstream profiling; the UTM itself describes the campaign, not the visitor.
Related pages
- UTM tracking in single-page apps
Single-page apps (React, Vue, and similar) load once and then route in the browser, which can drop UTM parameters before analytics reads them. This page explains capturing UTMs on the first request, persisting them across in-app navigation, and the SPA pitfalls that silently lose campaign attribution.
- Auto-tagging vs manual UTM tagging
Some ad platforms auto-tag clicks with their own identifier (for example a click ID), while you also add manual UTMs. Used together carelessly, the same click gets attributed two ways. This page explains how auto-tagging and manual UTMs relate, which to trust per channel, and how to avoid conflicts.
- UTM parameters in BigQuery
When GA4 is linked to BigQuery, campaign data arrives in the event export as nested event_params and traffic-source fields. The UTM-derived values — source, medium, campaign, content, term — are queryable with SQL via UNNEST, letting you build custom attribution beyond the GA4 UI. This page covers where UTM-derived fields live in the BigQuery schema and the basic query shape.
- Website observability
Read UTMs server-side, resilient to client tag loss.
Sources and verification notes
- MDN — URL and URLSearchParamsHow a server parses query parameters like utm_ from the request URL.
- Google Tag Manager — Server-side tagging overviewServer-side tagging model that reads request data including UTMs.
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.