WebmasterID logoWebmasterID
UTM tracking

UTM and cookie consent banners

Cookie consent banners often block analytics scripts from running until a visitor consents. Because UTM attribution happens when the analytics script reads the landing URL, a consent gate can cause the campaign to be missed if the visitor navigates away or the UTM is gone before consent is granted. This page explains the interaction and mitigations.

Verified against primary sources

Where attribution is lost

If a consent banner blocks the analytics tag until acceptance, a visitor who lands with UTM tags but leaves before consenting is never attributed. Even on acceptance, if the page reloaded or the URL was rewritten to drop UTM, the campaign can be lost.

The core issue is timing: UTM attribution requires the script to read the campaign URL, and consent gating delays or prevents that read.

Mitigations

Options include Google's Consent Mode, which lets tags adjust behavior based on consent state and can model some gaps, and privacy-first or server-side approaches that record a campaign touch without cookies. Preserve UTM in the URL until consent resolves so a post-consent read still finds the tags.

Always treat consent-scoped campaign numbers as such, and document the methodology so stakeholders interpret totals correctly.

How it appears in analytics and logs

A drop in attributed campaign traffic that coincides with a consent banner usually means the analytics script did not run, or ran after the UTM was cleared, on non-consenting sessions.

Diagnostic use case

Understand why consent-gated analytics can under-report UTM campaigns, and choose mitigations like consent mode or first-party/server-side capture.

What WebmasterID can help detect

WebmasterID's privacy-first, cookieless model can record the UTM-tagged landing touch without setting tracking cookies, reducing the campaign blind spot that cookie-based tools face under consent gating.

Common mistakes

Privacy and accuracy notes

Consent gating exists to respect visitor choice; UTM values still describe the campaign, not the person. Any pre-consent signal must avoid personal data, and WebmasterID records touches without raw IP, exact location, or a cross-site identity.

Frequently asked questions

Does a consent banner break UTM tracking?
It can. If analytics is blocked until consent and the visitor leaves first, the UTM campaign is never recorded. Consent Mode or a cookieless server-side touch can reduce the gap.

Related pages

Sources and verification notes

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.