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 mode | Advanced consent mode | |
|---|---|---|
| Tag loading | Blocked until user interaction with a consent banner. | Loads with defaults set to denied, unless configured otherwise. |
| Data transmission | No 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 modeling | General 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
| Installation | Mode |
|---|---|
| Script in the website code, Google tags on the Scripts tab | basic |
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 script | advanced |
Google Tag Manager with the Cookies správně template, Google tags with Require additional consent and a consentUpdate trigger | basic |
| Google Tag Manager with the Cookies správně template, Google tags without additional consent on an All Pages trigger | advanced |
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
- Insert the code from the Implementation tab as the first script in the
<head>of every page, withoutasyncanddefer. In Configuration keep Implementation type set to Cookies správně. - Remove the Google tag (the gtag.js library and its configuration) from the website template.
- 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
- 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.
- 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_storagefor GA4 andad_storagefor Google Ads, possibly alsoad_user_dataandad_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.” - 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
- Insert the code from the Implementation tab as the first script in the
<head>. Keep the implementation type Cookies správně. - 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
- Set up the Cookies správně template with the Consent Initialization – All Pages trigger and choose Implementation type Google Tag Manager in Configuration.
- 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.
- 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.
- For third-party tags (Meta, Sklik, LinkedIn, custom HTML) set Require additional consent and a Custom Event
consentUpdatetrigger, 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:
- 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.
- Move Google tags to the Scripts tab, or mark them in the website code with
type="text/plain"anddata-cookiecategory, as in basic mode above. - 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 EventconsentUpdatetrigger with a condition on a dataLayer variable, for exampleanalytics_storageequalsgranted. The bar pushesconsentUpdateeven 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.