Google Consent Mode v2
When Send Google Consent Mode v2 signals is on (the default), the
cookie consent banner tells Google's tags (Google Analytics,
Google Ads, Floodlight and Tag Manager) what each visitor allowed, using
gtag('consent', ...).
What the banner sends
On every page load, before anything else: a default with everything denied except security storage:
gtag("consent", "default", {
ad_storage: "denied",
ad_user_data: "denied",
ad_personalization: "denied",
analytics_storage: "denied",
functionality_storage: "denied",
personalization_storage: "denied",
security_storage: "granted",
wait_for_update: 500
});
For a returning visitor, an update with their stored choice follows
immediately.
When the visitor chooses: an update with the types their categories
grant, sent at once in the click, before the choice is posted to Overture. A
dataLayer event follows, so Tag Manager triggers can react:
{ event: "overture_consent_update",
overture_consent: { action, consentId, granted: [...], denied: [...] } }
The banner also sets ads_data_redaction and url_passthrough as configured.
Which categories grant what
Each category grants Google consent types. The defaults are:
| Category | Grants |
|---|---|
| Necessary | security_storage (always) |
| Preferences | functionality_storage, personalization_storage |
| Analytics | analytics_storage |
| Marketing | ad_storage, ad_user_data, ad_personalization |
Change these per category on the banner's Categories & cookies tab.
Order matters
Google requires the default command before any Google tag loads. Put the
banner's script tag in <head> above your Google tag or Tag Manager snippet,
without async or defer, and keep data-overture-gcm on it:
<head>
<script src="https://script.app.overtureforms.com/contact-form.bundle.js"
data-overture-consent="YOUR_TENANT_ID/YOUR_BANNER"
data-overture-gcm></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag("js", new Date());
gtag("config", "G-XXXXXXX");
</script>
</head>
data-overture-gcm sends the default as the bundle loads. Without it, the
default is sent once the banner's settings arrive, which can be after a Google
tag has already started.
Basic or advanced mode
Google describes two ways to run Consent Mode, and the banner supports both:
- Advanced: Google tags load right away and, while consent is denied, send cookieless pings that Google uses for modeling. Install the Google tag as usual, as above.
- Basic: Google tags don't load at all until consent. Hold the Google tag
back by category, either on the banner's Scripts tab or with
type="text/plain"anddata-overture-consent="analytics"(see Keeping scripts off until consent).
Google Tag Manager
With Tag Manager, put the banner's script above the GTM snippet. The consent
default is in place before the container loads, so tags with built-in consent
checks (Google's own) wait for it. For other tags, add a trigger on the
custom event overture_consent_update, or require consent in each tag's
Consent settings.
Checking it
Open your site with Tag Assistant and look
at the Consent tab: you should see the default (all denied but
security_storage) on load, and an update after you make a choice.