Analytics and tracking

Do I need a cookie banner for GA4, and what does consent mode do?

Whether you need a cookie banner depends on the privacy laws that apply to you and your visitors, which is a question for a legal adviser. Consent mode is the Google feature that lets GA4 and Tag Manager respect a visitor's choice once you have a banner.

Published . Last updated . By Hevaris.

Whether you need one depends on the privacy laws that apply to you and to your visitors, and that is a question for a legal adviser. This guide covers how Google’s tools behave, not what the law requires.

Google’s consent mode help says you need to collect consent from your website users, and notes that privacy laws differ by region. Choosing a consent tool and writing your privacy and cookie notices is your responsibility.

Consent mode passes a visitor’s consent choice to Google, and tags change how they behave to match it. In Tag Manager, consent settings let you control how each tag responds.

You still need a way to ask the visitor. A banner or similar tool collects the choice, and consent mode carries it to the tags.

What happens to the data when a visitor declines?

What you lose depends on how the tags are set up. The table sets out the two setups Google describes.

SetupWhat happens when a visitor declinesWhat it means for your reports
Tags are blocked until the visitor consentsNo tag runs for that visitorGoogle says this loses the modeled data that consent mode can provide
Tags run under consent modeTags send pings instead of storing cookiesGoogle says GA can fill some gaps with conversion modeling and behavioral modeling

Will modeled data fill the gap on a small site?

Maybe not. Google sets eligibility thresholds for behavioral modeling, and a small site can fall below them. Where it falls below, the data from visitors who declined is not reported.

Google’s behavioral modeling page lists the eligibility conditions as at least 1,000 events a day with analytics storage denied for seven days, and at least 1,000 daily consented users on seven of the previous 28 days. It also says modeled events are reported only when there is high confidence.

Test the site twice, once accepting and once declining, and compare what each visit sends. Use Tag Manager Preview and GA4 DebugView.

  • Accept. Events should arrive in DebugView.
  • Decline. Google says DebugView does not show events when consent mode denies analytics storage, so a quiet DebugView is the expected result.
  • Check the tags. Preview shows which tags fired for each choice.

If both visits behave the same way, the consent tool is not connected to the tags.

What sources does this guide use?

The primary sources are linked below, so each statement can be checked at its origin.

Frequently asked questions

Does this guide tell me whether I legally need a cookie banner?

No. It is not legal advice. Google's own help says you need to collect consent from your website users and notes that privacy laws differ by region. Ask a legal adviser which rules apply to you and where your visitors are.

What does consent mode do in simple terms?

Consent mode passes a visitor's consent choice to Google, and tags adjust their behaviour to match. Tag Manager has consent settings that control how each tag responds to that choice.

If visitors decline, is their data gone?

Mostly, but not entirely. Google says that with consent mode, tags send pings instead of storing cookies when consent is denied, and that GA fills some gaps with conversion modeling and behavioral modeling. Modeling has eligibility thresholds that a small site may not meet.

Why is DebugView empty when I decline cookies?

That is expected. Google says DebugView does not show events when consent mode denies analytics storage or when client-side privacy controls are in place. Test the accepted and declined cases separately.