On this page
Google Consent Mode is how your consent banner tells Google's tags what a visitor agreed to. Instead of choosing between "tags on" and "tags off", Google Analytics and Google Ads adjust their behaviour to each visitor's choices. Version 2 added two signals for advertising data, and since March 2024 Google's EU user consent policy has relied on them: without them, EEA users are left out of the GA4 audiences you use in Google Ads, and Customer Match lists for the EEA need both new signals set.
This guide explains the signals, the difference between basic and advanced mode, and how to set it all up in Google Tag Manager (GTM) and check that it works.
The consent signals
Google defines seven consent types. Four of them control advertising and analytics (Google documentation):
Signal | What it controls |
|---|---|
| Storage, such as cookies, related to advertising |
| Storage related to analytics, such as visit duration |
| Consent for sending user data related to advertising to Google (new in v2) |
| Consent for personalised advertising, such as remarketing (new in v2) |
The other three, functionality_storage, personalization_storage and security_storage, cover things like language settings, recommendations and fraud prevention. They are useful for gating your own tags in GTM.
Basic vs advanced mode
The difference is what happens before the visitor makes a choice:
Basic mode. Google tags do not load until the visitor interacts with the banner. If they decline, the tags never fire and nothing is sent to Google. Conversion modelling uses a general model.
Advanced mode. Google tags load straight away with consent set to denied. While consent is denied they send measurements without cookies, which Google uses to build an advertiser-specific model of the conversions you cannot observe.
Advanced mode recovers more data, but it does send cookieless pings before consent. Basic mode sends nothing until the visitor agrees. Which one is right depends on your risk appetite and on what your regulator and legal team are comfortable with. Modelling also has minimum traffic thresholds, so small sites may see little benefit from advanced mode.

Set up Consent Mode v2 in GTM, step by step
These steps assume Cookie Panda as your banner, but the GTM side is the same for any consent platform that supports Consent Mode v2.
Step 1: Add the banner script before GTM
Put the Cookie Panda script in your <head> above the GTM container snippet. Cookie Panda emits Consent Mode v2 signals automatically, along with the IAB TC and GPP strings, as visitors make or change their choices.
<script
src="https://sdk.cookiepanda.app/cookiepanda.min.js"
data-cp-token="cp_xxx"
async
></script>
<!-- Google Tag Manager container snippet goes below -->Step 2: Turn on Consent Overview
In GTM, go to Admin → Container Settings and tick "Enable consent overview". A shield icon appears in the Tags list, showing which tags have built-in consent checks and which need extra settings (GTM help).
Step 3: Make sure a default is set before any tag fires
Google requires the default consent state to be set on every page before any measurement or ad calls. In GTM, anything that sets defaults belongs on the "Consent Initialization - All Pages" trigger, which always fires first. If you set defaults in code instead, they look like this, with wait_for_update giving the banner time (in milliseconds) to send the visitor's stored choice:
gtag('consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
wait_for_update: 500
});You can also add a region parameter with ISO 3166-2 codes to apply different defaults in different places; the most specific region wins. Check in Step 6 that only one default reaches your tags, so a hard-coded default does not contradict the one your banner sets.
Step 4: Choose basic or advanced
For advanced mode, leave your Google tag, GA4 and Google Ads tags on their normal triggers. Their built-in consent checks read the signals and send cookieless pings while consent is denied.
For basic mode, stop Google tags from firing until consent: in each tag, open Advanced Settings → Consent Settings, choose "Require additional consent for tag to fire" and add
analytics_storageorad_storage. Alternatively, let Cookie Panda's Prior Cookie Blocking hold the tags back until the visitor opts in.
Step 5: Gate your non-Google tags
Consent Mode only changes how Google's own tags behave. Meta, TikTok, LinkedIn and other tags in your container ignore it unless you add consent checks. For each one, set "Require additional consent for tag to fire" with the matching signal, usually ad_storage for advertising pixels.
If you prefer to trigger tags on the consent decision itself, Cookie Panda dispatches a cookiepanda:consent event on the document with the chosen categories. A small Custom HTML tag can forward it to the data layer:
document.addEventListener('cookiepanda:consent', function (e) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'cookiepanda_consent',
cp_categories: e.detail.categories
// { necessary, analytics, advertising, preferences }
});
});Then create a Custom Event trigger for cookiepanda_consent and use it on the tags that should fire after a choice.
Step 6: Optional settings
url_passthroughpasses ad click information through URLs when ad cookies are denied, to improve measurement.ads_data_redactionredacts ad click identifiers whenad_storageis denied. It has no effect once ad storage is granted.
How to verify it in Tag Assistant
In GTM, click Preview and open your site in Tag Assistant, in a private window and from an EEA location if possible.
Before touching the banner, select the first event and open the Consent tab. The "On-page Default" column should show the four signals as denied. An empty Consent tab means Consent Mode is not implemented.
Click "Accept all". A new event should show the signals as granted in the "On-page Update" column.
Repeat with "Reject all" and check that the update stays denied and that your gated non-Google tags did not fire.
In your browser's network tab, requests to Google carry a
gcsparameter with the ad and analytics storage state, and agcdparameter with more detail. If they change after your choice, the signal is getting through (Google's debugging guide).
Common mistakes
Setting only
ad_storageandanalytics_storage, the v1 signals, and forgettingad_user_dataandad_personalization.Loading GTM before the banner, so tags fire before any default exists.
Assuming Consent Mode covers Meta or TikTok. It does not.
Never sending an update when a returning visitor's stored choice loads, so every page view looks like "denied".
Running a store? Our Black Friday consent checklist for Shopify and WooCommerce covers pixels and campaign apps. For everything else Cookie Panda connects to, from GTM to signed webhooks, see Integrations & Webhooks and the frameworks and signals docs.
Consent Mode v2, without the dataLayer engineering
Cookie Panda emits all four Consent Mode v2 signals, plus IAB TCF and GPP strings, from one script tag.
Free for one domain. No credit card required.



