Consent Mode
Consent mode is a setup where your tracking tags change their behavior based on a visitor’s consent choice.
With consent, tags measure normally. Without it, they send less data, skip cookies and identifiers, or don’t run at all.
Many tag platforms and analytics tools offer a built-in consent mode, and you can build the same logic yourself.
How consent mode works
- Your page sets a default consent state before any tag fires, usually “denied”.
- A consent banner (CMP) asks the visitor and records the answer.
- The banner sends an update signal with the visitor’s choices.
- Each tag reads the state and decides whether to use cookies and what to send.
Most teams wire this through the data layer or a tag management tool, so every tag reads one signal.
The consent signals
Consent is rarely a single yes or no. Banners usually split it into purposes, and each one gets its own signal.
| Purpose | What it controls | Typical default |
|---|---|---|
| Analytics storage | Cookies or identifiers used to measure visits, such as visit duration | Denied |
| Advertising storage | Cookies or identifiers used for ads and ad measurement | Denied |
| Ad data sharing | Sending visitor data to ad platforms | Denied |
| Ad personalization | Personalized ads and remarketing | Denied |
| Functional and security | Features the site needs to work, such as login and fraud checks | Often allowed |
Map each tag to the purposes it needs. A tag that serves two purposes should wait for both.
Strict vs restricted consent mode
There are two common ways to run consent mode, and they differ in what happens before the visitor answers.
| Strict (block until consent) | Restricted (load with consent denied) | |
|---|---|---|
| Before the visitor answers | Tags don’t load | Tags load without cookies or identifiers |
| If the visitor declines | No data leaves the page | Cookieless pings with counts only |
| If the visitor accepts | Tags load and measure normally | Full measurement starts |
| Gaps in the data | Declined visits are invisible | Declined visits can be estimated |
Strict is easier to explain in a privacy review because nothing leaves the page before consent.
Restricted gives you more signals to fill gaps. You’ll want your lawyer’s view on sending those pings.
How modeling fills the gaps
When visitors decline, you can’t see their full journeys. Some tools estimate the missing conversions from consenting traffic.
- The model learns from visitors who accepted and applies the pattern to cookieless pings.
- It needs enough consenting traffic first, so small sites often get no estimate at all.
- Strict setups send no pings, so there’s nothing to model from declined visits.
Modeled numbers are estimates, so label them in reports before anyone mistakes them for observed counts.
Setting the default and the update
Whatever tool you use, the order is the same. The default runs first, and the update runs once the visitor answers.
| Moment | Consent state | What tags do |
|---|---|---|
| Page loads | Default: all purposes denied | Wait, or run without cookies |
| Visitor accepts | Update: chosen purposes granted | Set cookies and measure normally |
| Visitor declines | Update: purposes stay denied | Stay blocked or keep sending cookieless pings |
| Visitor changes mind later | Update from the banner settings | Switch behavior from the next hit |
- Add a short wait for the update if your banner loads slowly.
- Use different defaults per country if your rules differ by region.
- Set the default before any tag fires. A tag that loads first can set cookies before the rule exists.
How to test or audit consent mode
You don’t need a consultant for a first check. Your browser’s developer tools show what your tags do.
- Open your site in a private window and don’t answer the banner yet.
- In developer tools, check the cookies and local storage. Tracking identifiers shouldn’t be there yet.
- Open the Network tab and note which tracking requests already fire.
- Decline, reload and repeat the checks. Nothing new should appear after a decline.
- Accept in a fresh window and confirm the tags now set cookies and send full hits.
If identifiers appear before any answer, a tag runs ahead of your default state.
Repeat the test after every new tag or banner update. That’s when consent leaks usually creep in.
Quick math: what declines cost you
Say you get 10,000 visits a day, 60% accept, and each consenting visitor fires 3 key events.
- Observed events from consenting visitors: 10,000 × 0.60 × 3 = 18,000.
- The other 4,000 visits show up only as cookieless pings in restricted mode.
- In strict mode those 4,000 visits leave no trace in your reports.
What consent mode doesn’t do
- It doesn’t show a banner or store consent. Your consent platform does that job.
- It only steers tags that read the signal. Other scripts on your site need their own consent gating.
- It doesn’t decide what the law requires in your market. That depends on where your visitors are.
Implementation tips
- Default every tracking purpose to denied for visitors in the EU, including the ad purposes.
- Test the decline path, not only the accept path. That’s where leaks show up.
- Gate every identifier on consent, including first-party cookies and local storage.
- Write down which events run in each state, so your reports don’t drift silently.
Related: GDPR, Server-Side Tagging, First-Party Cookie, Tag