Skip to main content

Google Consent Mode v2

One Privacy emits Google Consent Mode v2 signals automatically. Your Google tags receive denied defaults before consent and granted updates the moment a visitor accepts the relevant category. There's nothing to wire up by hand.

This page documents the calls One Privacy makes so you know what's happening under the hood.

Defaults at page load​

As soon as the widget loads, One Privacy pushes a default consent state with everything denied except security_storage:

emitted-by-onePrivacy.js
gtag('consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
functionality_storage: 'denied',
security_storage: 'granted',
wait_for_update: 500
});

The wait_for_update: 500 tells Google to wait up to 500ms for a follow-up update call before firing tags. This avoids tags firing in a denied state and then being re-fired when consent is granted.

When the visitor saves a choice, One Privacy maps the cookie categories to Google's signals and pushes an update:

emitted-after-consent.js
gtag('consent', 'update', {
security_storage: 'granted',
functionality_storage: '<C0002 ? granted : denied>',
analytics_storage: '<C0003 ? granted : denied>',
ad_storage: '<C0004 ? granted : denied>',
ad_user_data: '<C0004 ? granted : denied>',
ad_personalization: '<C0004 ? granted : denied>'
});
Google signalMapped from
security_storageAlways granted (Necessary)
functionality_storageC0002 Functional
analytics_storageC0003 Performance
ad_storageC0004 Targeting
ad_user_dataC0004 Targeting
ad_personalizationC0004 Targeting

What you don't need to do​

You don't need to write your own gtag('consent', ...) calls.

You don't need to gate Google Analytics or Google Ads behind consent in your own code; the gtag signals do that for you.

You don't need to wire anything up in the dashboard for this to work.

What you do need to check​

Make sure your tags honor consent. In Google Tag Manager, every Google tag (GA4, Ads, Floodlight) has a "Consent Settings" section. Check that "Require additional consent for tag to fire" is set up correctly, or use the default "No additional consent required" so the tag respects Consent Mode signals from One Privacy.

Order of scripts. Make sure the One Privacy snippet is in the page before your Google tag, so the default call fires first.

Test it. Open Chrome DevTools β†’ Network β†’ filter for collect and verify Google Analytics requests don't fire until the visitor accepts.

What's next​

JavaScript API.

Consent events.

Google Consent Mode (overview).