Documentation › Google Consent Mode › Settings and signals

Consent Mode settings and signals

An overview of every technical Consent Mode setting in Cookies správně: which consent types the bar sends, when the default and the updates go out, what the switch in Configuration does and which options the Google Tag Manager template has. Each setting is explained following Google's documentation, which we link next to it.

Consent types

In both commands, the default and the update, the bar sends the four consent types that Consent Mode v2 requires. The middle column quotes Google's Consent mode overview.

Consent typeDescription by GoogleWhat controls it in the bar
ad_storageEnables storage, such as cookies (web) or device identifiers (apps), related to advertising.The Marketing category (marketing)
analytics_storageEnables storage, such as cookies (web) or device identifiers (apps), related to analytics, for example, visit duration.The Analytics category (analytics)
ad_user_dataSets consent for sending user data to Google for online advertising purposes.The Advertising data sharing (Google) toggle (ad_user_data)
ad_personalizationSets consent for personalized advertising.The Personalised advertising (Google) toggle (ad_personalization)

The Necessary category controls no signal and is always on. The names of the two Google toggles are default texts; you can change them on the Texts tab.

The visitor's choice becomes signals like this:

Choice in the barSignals
Accept allAll four types granted.
Reject allAll four types denied.
Saving the detailed settingsEach type follows the category or toggle that controls it. Whatever the visitor did not switch on stays denied.

The default (consent default command)

Google says to set a default value for each consent type you use “on every page of your site before any commands that send measurement data”, and that “if your consent code is called out of order, consent defaults won't work” (Set up consent mode on websites).

The Cookies správně bar sets the default as soon as its script loads:

gtag('consent', 'default', {
  ad_storage: 'denied',
  analytics_storage: 'denied',
  ad_user_data: 'denied',
  ad_personalization: 'denied',
  wait_for_update: 500
});

For the default to come before Google tags, insert the bar's script as the first script in the <head> of every page, above Google Tag Manager and gtag.js, and without the async and defer attributes. Google's troubleshooting guide explicitly says not to set default consent states asynchronously. The ready-made embed code is on the license's Implementation tab:

<script src="https://cookies-spravne.cz/static/cc_v2?key=YOUR_LICENSE_KEY"></script>

wait_for_update

Google: “specify wait_for_update along with a millisecond value to control how long to wait before data is sent.” It gives a consent management tool time to respond before Google tags send data.

The bar sends 500 ms. A returning visitor gets the update straight away, so tags do not wait. For a new visitor, tags wait at most 500 ms and then work with the denied default until the visitor chooses.

The update (consent update command)

Google says to “update the consent status as soon as a user interacts with your consent management solution.” Consent Mode does not store the choice itself; the bar does.

The bar sends an update:

  • when the visitor clicks in the bar or saves the detailed settings,
  • to a returning visitor as soon as the page loads, from the choice stored in the cc_cookie cookie,
  • when the visitor later changes the choice through the Cookie settings link or the bar's badge. The page then reloads.

The order is always the same: first the update command, then the consentUpdate event, and only then does the bar run the scripts of the allowed categories, that is scripts from the Scripts tab and scripts marked type="text/plain". A Google tag the bar releases this way already works with the current consent state.

The consentUpdate event

With every update the bar also pushes this event to the dataLayer:

{
  event: 'consentUpdate',
  ad_storage: 'granted',
  analytics_storage: 'granted',
  ad_user_data: 'denied',
  ad_personalization: 'denied'
}

Use it as a Custom Event trigger in Google Tag Manager for tags without built-in consent checks. It is always sent, even with Consent Mode signals switched off: it is an ordinary event, not a Consent Mode command.

The GTM template also pushes a gtm_consent_update event, but only to a returning visitor when the page loads, never after a click in the bar. Use consentUpdate to fire tags.

The Send Google Consent Mode signals switch

The switch is in the license Configuration, in the Implementation type box. It is on for every new license.

StateWhat the bar does
OnSets the default (in Cookies správně mode) and sends an update after every choice.
OffSets no default and sends no update. It keeps blocking scripts from the Scripts tab and scripts marked type="text/plain", and keeps pushing the consentUpdate event.

Switch it off only if you want to control Google tags yourself and block them until consent. The steps are in Turning Consent Mode off and going back to blocking tags. You also see the current state on the Implementation tab, in the Google Consent Mode box.

Implementation type

The Implementation type option in Configuration tells the bar who sets the default:

OptionThe default is set byUpdates are sent by
Cookies správněthe bar, as soon as its script loadsthe bar
Google Tag Managerthe Cookies správně template in GTMthe template for a returning visitor on page load, the bar after every choice

The option has to match how you actually install the bar. Template in GTM: choose Google Tag Manager. Script in the page code: choose Cookies správně.

Options of the Google Tag Manager template

With GTM, the Cookies správně template from the Community Template Gallery sets the default. Fire it with the Consent Initialization – All Pages trigger, which according to Google is meant to “ensure that all consent settings are honored before any other triggers fire” (Tag Manager consent mode support). The template uses the setDefaultConsentState and updateConsentState APIs, as Google recommends for templates (Create a consent mode template).

Template fieldWhat it doesDefault
License keyThe key of the license for the domain.empty, required
LanguageEmpty means the language is chosen from the visitor's browser. A selected language is always used.Automatic
wait_for_updateHow long Google tags wait for an update, see above. A value of 0 does not send the parameter at all.500 ms
Ads RedactionSets ads_data_redaction. Google: “To further redact your ads data when ad_storage is denied, set ads_data_redaction to true.” Ad click identifiers sent by Google Ads and Floodlight tags are then redacted. It has no effect when ad_storage is granted.off
URL Pass ThroughSets url_passthrough. Google: when cookies are denied “you can optionally elect to pass information about ad clicks through URL parameters across pages using URL passthrough.”off
Region-specific default consentEach row sets the default for the four consent types in the listed regions. Enter ISO 3166-1 or ISO 3166-2 codes separated by commas, e.g. US, CA or US-CA. Per Google, a default without a region applies to all other visitors, and when two apply, the one with the more specific region takes effect. The visitor's choice in the bar always wins.no rows, denied everywhere

Besides the four types above, the GTM template also sets the three other consent types GTM knows. The descriptions are Google's again:

Consent typeDescription by GoogleValue
functionality_storageEnables storage that supports the functionality of the website or app, for example, language settings.default denied, granted once the visitor has a stored choice
personalization_storageEnables storage related to personalization, for example, video recommendations.default denied, then follows the Personalised advertising toggle
security_storageEnables storage related to security such as authentication functionality, fraud prevention, and other user protection.always granted

The full setup is in How to install the cookie bar through Google Tag Manager.

Google documentation for this page