Free auditStart free
GlossaryGlossary · Measurement

Consent mode

Consent mode lets Google tags change behavior based on a visitor's consent. Basic vs advanced, the four consent types, a working snippet, and how to check it.

2 min
read
2
sources
Oct 31, 2026
updated
Scaplet Editorial Team
author
In one line

Consent mode is a Google feature that adjusts how Google tags and SDKs behave based on the consent choices users make. You collect consent, tell Google the result, and the tags respect it. In basic mode tags are blocked until the visitor interacts with a banner. In advanced mode they load with default states.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
ad_storage, analytics_storage, ad_user_data, ad_personalization
Consent types
Basic and advanced
Modes
default, then update
Commands
A consent banner you provide
Needs
01At a glance

What it controls

Consent mode does not collect consent. You need a banner or consent management platform for that. It passes the visitor's choice to Google tags so they change what they store and send.
Consent type

ad_storage

Covers
Advertising cookies and device identifiers
When denied
No new advertising cookies or identifiers are written, existing ones are not read
Consent type

analytics_storage

Covers
Analytics storage such as visit duration
When denied
First-party analytics cookies are not read or written
Consent type

ad_user_data

Covers
Sending user data to Google for advertising
When denied
Data such as user_id and enhanced conversions data is not collected
Consent type

ad_personalization

Covers
Personalized advertising
When denied
Remarketing and personalized ads are disabled
03At a glance

Anatomy of the snippet

Part

consent default

Job
The state before the visitor chooses. Runs first on every page
Part

wait_for_update

Job
Milliseconds tags wait for an asynchronous banner to call update
Part

consent update

Job
Sent after the visitor chooses
Part

region

Job
Optional parameter scoping a default to ISO 3166-2 regions
Default before the Google tag, update after the choice
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('consent', 'default', {
    'ad_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied',
    'analytics_storage': 'denied',
    'wait_for_update': 500
  });
</script>
<!-- Google tag loads here -->
<script>
  function allConsentGranted() {
    gtag('consent', 'update', {
      'ad_storage': 'granted',
      'ad_user_data': 'granted',
      'ad_personalization': 'granted',
      'analytics_storage': 'granted'
    });
  }
</script>
04How it works

Check it in 2 minutes

  1. 01

    View source

    Confirm the consent default call appears before any Google tag, config or event command.

  2. 02

    Test denied

    Load the page in a clean browser, decline in the banner, and confirm no new analytics or advertising cookies are written.

  3. 03

    Test granted

    Accept, then confirm the update call fires and tags behave normally.

  4. 04

    Use Tag Assistant

    Google links a guide, Troubleshoot consent mode with Tag Assistant, for verifying states.

Sources · 2

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • google.com
  1. 01Consent mode overview (Google tag platform)developers.google.com · checked 2026-11-01
  2. 02Set up consent mode on websites (Google tag platform)developers.google.com · checked 2026-11-01
Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly