Documentation › Google Consent Mode › Basic and advanced mode

Basic and advanced Consent Mode

Google distinguishes two ways to implement Consent Mode. They differ in whether Google tags load before the visitor consents. With Cookies správně you can set up both, with the script inserted directly into the website and in Google Tag Manager.

The difference according to Google

The comparison is taken from Google's Consent mode overview:

Basic consent modeAdvanced consent mode
Tag loadingBlocked until user interaction with a consent banner.Loads with defaults set to denied, unless configured otherwise.
Data transmissionNo data is sent before a user consents, not even the default consent status.When consent is denied, consent state and measurements without cookies are sent.
Conversion and key event modelingGeneral model (less detailed modeling).Advertiser-specific model (more detailed modeling).

About basic mode Google adds that “when the user doesn't consent, no data is transferred to Google at all – not even the consent status.” In advanced mode “Google tags load when a user opens the website or app.”

Which mode you choose is up to you; Google refers to your company's own guidelines.

Which installation gives which mode

InstallationMode
Script in the website code, Google tags on the Scripts tabbasic
Script in the website code, Google tags marked type="text/plain"basic
Script in the website code, Google tag (gtag.js) inserted normally below the bar's scriptadvanced
Google Tag Manager with the Cookies správně template, Google tags with Require additional consent and a consentUpdate triggerbasic
Google Tag Manager with the Cookies správně template, Google tags without additional consent on an All Pages triggeradvanced

In both modes keep Send Google Consent Mode signals switched on. In basic mode the bar sends the consent update before it releases the Google tag, so the tag works with the right state from the moment consent is given.

Basic mode with the script inserted directly

  1. Insert the code from the Implementation tab as the first script in the <head> of every page, without async and defer. In Configuration keep Implementation type set to Cookies správně.
  2. Remove the Google tag (the gtag.js library and its configuration) from the website template.
  3. Put it on the Scripts tab: analytics such as GA4 under Analytics scripts, Google Ads tags under Marketing scripts. Or keep it in the website code and mark it with a category:
<script type="text/plain" data-cookiecategory="analytics"
    src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script>
<script type="text/plain" data-cookiecategory="analytics">
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-XXXXXXX');
</script>

The bar runs such a script once the visitor allows its category, and always after the consent update has been sent. It runs the scripts in the order they appear on the page, and a script with src finishes loading before the next one starts. See The text/plain method for details.

Basic mode in Google Tag Manager

  1. Set up the Cookies správně template as described in Google Tag Manager, with the Consent Initialization – All Pages trigger. In the license Configuration choose Implementation type Google Tag Manager.
  2. On every Google tag open Consent Settings, choose Require additional consent for tag to fire and add the consent types the tag needs, typically analytics_storage for GA4 and ad_storage for Google Ads, possibly also ad_user_data and ad_personalization. According to Google such a tag “will only fire if the status of all specified consent types are 'granted' when the tag is triggered.”
  3. Change the tag's trigger from All Pages to a Custom Event with the event name consentUpdate (Triggers → New → Custom Event). The bar pushes this event after the visitor's choice and again on every page for a returning visitor, so the tag fires once, and only when consent exists.

Why not All Pages: it fires only when the page loads. For a new visitor, consent is still denied at that moment, so a tag with an additional consent check does not fire, and nothing fires it again after the click in the bar.

Advanced mode with the script inserted directly

  1. Insert the code from the Implementation tab as the first script in the <head>. Keep the implementation type Cookies správně.
  2. Below it, insert the Google tag exactly as Google provides it. Without type="text/plain" and not on the Scripts tab:
<script src="https://cookies-spravne.cz/static/cc_v2?key=YOUR_LICENSE_KEY"></script>
<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>

The Google tag loads straight away. Until the visitor decides it works with the denied default, and as soon as they decide it receives the update from the bar. Keep blocking third-party scripts that do not know Consent Mode with the Scripts tab or type="text/plain".

Advanced mode in Google Tag Manager

  1. Set up the Cookies správně template with the Consent Initialization – All Pages trigger and choose Implementation type Google Tag Manager in Configuration.
  2. Google tags have built-in consent checks. Google: “Tags with built-in consent checks include logic that changes the tag's execution behavior based on the user's consent state.” Set them to No additional consent required in Consent Settings and keep their All Pages trigger.
  3. Remove any blocking you set up for Google tags earlier: exception triggers and consent-based trigger conditions. Google covers this in Unblock Google tags when using consent mode.
  4. For third-party tags (Meta, Sklik, LinkedIn, custom HTML) set Require additional consent and a Custom Event consentUpdate trigger, as in basic mode.

Consent Overview shows the consent settings of all tags. Enable it in Admin → Container Settings → Additional Settings and open it from Tags.

Turning Consent Mode off and going back to blocking tags

If you do not want to use Consent Mode, switch the signals off and block Google tags until consent like any other script:

  1. In the license Configuration switch off Send Google Consent Mode signals and click Save configuration. Use Refresh widget cache for the change to show on the website immediately. The bar then sets no default and sends no updates.
  2. Move Google tags to the Scripts tab, or mark them in the website code with type="text/plain" and data-cookiecategory, as in basic mode above.
  3. If you use Google Tag Manager, do not install the bar with the template, because the template always sets a default. Insert the bar's code directly into the <head> and fire tags in GTM with a Custom Event consentUpdate trigger with a condition on a dataLayer variable, for example analytics_storage equals granted. The bar pushes consentUpdate even with the signals off.

The Google Consent Mode box on the Implementation tab then shows Consent Mode signals are off for this website. You can switch them back on at any time with the same switch.

Google documentation for this page