Integrations
Google Consent Mode v2: Complete Setup, Examples & Testing Guide
Understand all four signals, choose Basic or Advanced, configure Consentory and verify every consent choice.
What is Google Consent Mode v2?
Google Consent Mode tells Google tags how to behave according to a visitor’s consent choice. It connects your consent interface with Google Analytics 4 and Google Ads measurement. Consent Mode does not display a banner, collect consent, or store a visitor’s choice by itself; your banner or CMP must do that work.
Start with a default state before Google tags run, then send an update when the visitor accepts, rejects, or changes preferences. Choose the deployment model that fits your tag behavior and applicable requirements.
Consent Mode v1 vs v2: the four signals
Consent Mode v2 adds ad_user_data and ad_personalization to the two core storage signals. Each value is granted or denied.
| Signal | Introduced | What it controls |
|---|---|---|
| analytics_storage | v1 | Storage used by analytics tags. |
| ad_storage | v1 | Storage used for advertising. |
| ad_user_data | v2 | Sending user data to Google for advertising. |
| ad_personalization | v2 | Use of data for personalized advertising. |
These are Google consent signals, not legal-purpose definitions. Map them to the choice your visitors actually made.
Basic vs Advanced Consent Mode
Basic
- Visitor opens the page.
- Google tags remain blocked.
- After consent, permitted tags load and receive default then updated states.
- After rejection, Google tags remain blocked.
No Google data is sent before the choice. Google Ads modeling uses a more general model.
Advanced
- Visitor opens the page.
- Google tags load with denied defaults.
- Cookieless pings may be sent before a choice.
- After the choice, signals update or stay denied.
This can support more detailed modeling, but the pre-consent data flow needs separate legal and technical review.
For a detailed comparison and decision helper, see Basic vs Advanced Consent Mode v2. For prior blocking beyond Google tags, see configure prior blocking.
How to implement Consent Mode v2
Choose one integration path and one owner for consent commands. Defaults must be available before the relevant Google tags evaluate consent, and updates must reflect the visitor’s choice on the same page.
- Consent Mode v2 with GTM: step-by-step setup covers Consent Initialization, template APIs, tag settings and container preview.
- Consent Mode v2 with gtag.js: code examples covers early defaults, banner callbacks, saved choices and direct tag loading.
For Basic mode, hold Google tags until the relevant consent. For Advanced mode, load them only after the denied default is set. The integration must also store preferences and apply them on later visits.
Configure Consent Mode with Consentory
- Create a site in the Consentory dashboard and configure its consent categories.
- Install the generated widget snippet early in the page head. The widget sets denied defaults when it starts, so it must run before Google tags that read consent. See the installation guide.
- For a GTM installation, download the Consentory GTM template from the onboarding screen and assign its tag to Consent Initialization – All Pages. This template loads the widget script asynchronously; verify that defaults are set before other tags. If they are not, move the widget to the head or add a synchronous consent-default template.
- Consentory grants
analytics_storagefor analytics or performance choices. Its advertising category controlsad_storage,ad_user_data, andad_personalizationtogether. - Test the first visit, saved choice, rejection, custom choice, and withdrawal before launch.
Consentory supplies the signal mapping and consent widget. Your team still owns Google tag configuration, regional decisions, and verification. Review consent records and retention separately.
Explore the consent signals
Interactive example
Consent Mode simulator
Change the example choices to see the resulting update command.
Resulting signals
- analytics_storage
- denied
- ad_storage
- denied
- ad_user_data
- denied
- ad_personalization
- denied
gtag('consent', 'update', {
analytics_storage: 'denied',
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied'
});Educational demonstration only. Consentory maps its three advertising signals to one advertising category; these independent switches show the Google API, not Consentory’s preference UI or a complete CMP integration.
How to test Consent Mode v2 with Tag Assistant
In a fresh session, check that all four defaults precede Google tags. Test Reject, Analytics only, Accept all and withdrawal. Compare each update with the actual Network and Storage behavior for the mode you chose.
Use the Tag Assistant debugging guide and symptom checker for the detailed inspection sequence. Then run the Consent Mode v2 launch checklist before release.
Common errors and troubleshooting
| Symptom | What to check |
|---|---|
| No default in Tag Assistant | Set all four defaults synchronously before any Google tag. In GTM, use Consent Initialization. |
| Default arrives too late | Move the consent snippet above tags; check script and GTM trigger order. |
| Choice does not change signals | Check the banner callback, saved preference mapping, and update on the same page. |
| Unexpected tags after Reject | Inspect GTM consent settings, non-Google scripts, and prior blocking rules. |
Frequently asked questions
Does Consent Mode v2 make my site GDPR compliant?
No. It changes Google tag behavior. Your consent interface, purposes, vendor disclosures, storage controls, and legal basis still need review.
Do I need a CMP?
You need a way to collect and maintain the visitor’s choice. That may be a CMP or a correctly implemented custom solution; Consent Mode itself is not a banner.
Does GA4 require all four signals?
The v2 implementation defines four core signals. Analytics storage affects GA4 storage; the two new signals concern Google advertising use. Set each signal to reflect the actual choice.
Which mode should I choose?
Basic prevents Google tags from sending data before consent. Advanced permits consent-aware cookieless pings with denied defaults. Review your requirements and the resulting network traffic.
Does Consentory configure my GTM tags automatically?
No. Consentory provides a GTM template and consent signals; you still configure triggers, tag consent settings, and testing in your own container.
Configure Consent Mode v2 with Consentory
Set up the widget and category choices, then verify consent signals and tag behavior on your site.
Explore plansTechnical references: Google setup guide · Google Consent Mode overview · Google debugging guide.