Troubleshooting Consent Mode in Google Tag Manager
Benjamin Mangold
Google Consent Mode, when implemented with Google Tag Manager (GTM), helps you control how tags behave based on people's cookie choices – ensuring privacy compliance and responsible data collection. But as with any technical setup, things don't always go smoothly the first time. Whether you're just getting started or updating to Consent Mode v2, it's important to know how to debug common issues – and ensure everything is working as expected.
In this guide, I'll walk through how to troubleshoot Consent Mode (including Consent Mode v2), so you can confidently handle consent signals, tag firing behavior, and data collection settings.

Table of Contents
- What is Google Consent Mode?
- Troubleshooting Consent Mode in Google Tag Manager
- Common Consent Mode v2 Issues and Fixes
- Verifying Consent Signals with Tag Assistant
- Extra Tips for Troubleshooting GTM Consent Mode
- Next Steps
What is Google Consent Mode?
Google Consent Mode allows your website to adjust how Google tags behave based on a user’s consent choices. When someone visits your site, tags can delay data collection or collect anonymous hits until the person accepts or declines specific types of cookies.
With Consent Mode v2, Google has introduced the additional ad_user_data
and ad_personalization
consent signals. These work alongside the original ad_storage
and analytics_storage
signals.
Here’s a quick overview of what each of these consent signals is used for:
ad_storage
controls access to cookies used for advertising, including conversion tracking and remarketing.analytics_storage
determines whether analytics cookies (like those used by GA4) can be stored on a user’s device.ad_user_data
manages whether personal data can be collected for ad targeting and reporting.ad_personalization
controls if ads can be personalized based on user behavior or demographic data.
Google also recognizes additional consent types like personalization_storage
, functionality_storage
and security_storage
. Here's when you will use them:
personalization_storage
for features like remembering preferences or showing personalized content.functionality_storage
supports essential site features like chat widgets or saving progress in a form.security_storage
enables core functionality like login security and fraud prevention.
These additional consent types are typically marked as granted
by default, as they’re often necessary for your website to function properly.
Troubleshooting Consent Mode in Google Tag Manager
1. Check Default Consent State Is Correct
Before your analytics and advertising tags fire, GTM needs to recognize the default consent state. In most cases, you should use a tag template, like the Consent Mode template, to set the default consent states for each signal. When combined with 'Consent Initialization - All Pages' trigger, the tag template ensures that default consent states are set before other tags are fired.
Here’s an example of the default values you should see for each consent signal:
Type | On-Page Default |
---|---|
ad_storage | denied |
analytics_storage | denied |
ad_user_data | denied |
ad_personalization | denied |
personalization_storage | denied |
functionality_storage | granted |
security_storage | granted |
If you don't see denied
as the default value for consent signals that require people to opt-in, then there is likely an issue with either the default values being set for the tag or an issue with the trigger used for the tag.
Tip: The tag you use to set default consent signals should always fire before any other tags.
Important: Avoid setting the default consent state by hard-coding it directly into your website’s source code (for example, in a <script>
tag before the GTM container). This can conflict with the consent mode configuration you manage inside Google Tag Manager.
If you’re using the consent mode tag template in GTM, make sure this tag is solely responsible for setting the default consent state. Adding another instance outside of GTM (even with similar values) can result in unexpected behavior – including incorrect tag blocking or duplicate signals.
2. Confirm Consent Updates Are Firing
After setting the default consent state, you’ll need to make sure that consent is being updated when someone interacts with your banner. This is typically handled by a separate tag that sends a consent update event to the data layer once the user accepts or rejects cookies.
When someone accepts or rejects cookies, the cookie banner will also normally store a small cookie on the persons browser to record their selection. You can then use a custom variable in Google Tag Manager to pass the value of this cookie as a consent signal to Google and other platforms.
Here we can see the Consent Mode tag template is using variables to dynamically pass people's consent choices:

Once someone selects the option to accept all types of cookies being stored in their browser, you will see updated consent states like we can see in this example:
Type | Current State |
---|---|
ad_storage | granted |
analytics_storage | granted |
ad_user_data | granted |
ad_personalization | granted |
personalization_storage | granted |
functionality_storage | granted |
security_storage | granted |
Tip: Some cookie banners will push an event to the data layer when people accept cookies. For tags that don't have built-in consent mode compatibility, ensure that these tags are only fired after this event occurs or when subsequent pages where content is set to granted
.
Common Consent Mode Issues and Fixes
Issue: Consent Mode says 'granted' by default even when it shouldn’t
This can happen if the default consent state is incorrectly set or if the default consent state is being pushed too late.
Fixes:
- Ensure the 'Consent Initialization - All Pages' trigger is used for the tag controlling the default consent state on your website.
- Ensure you only have one consent management solution installed on your website at a time.
- Ensure that your cookie banner is correctly implemented to work with Google Tag Manager. Different consent management platforms use slightly different methods for integrating with Google Tag Manager. If in doubt, contact support for the solution you're using on your website for assistance.
- If you're using a tag template in Google Tag Manager to set the default consent state, ensure this tag fires before any other tag in your GTM container.
- Check the default consent state values are being passed to the tag template correctly. You might find the default values are not being correctly set by the variable or tag.
The following example is a JavaScript variable used to check the value of the cookie created by a cookie banner. If there is no cookie, then the variable will return a value of denied
or if there is an error, the variable will again return a value of denied
. If these fall-backs weren't included, then you might encounter issues with the default consent mode state.
function() {
var match = document.cookie.match('(^|;)\\s*cc_cookie\\s*=\\s*([^;]+)');
if (!match) return 'denied';
try {
var cookie = decodeURIComponent(match[2]);
var consent = JSON.parse(cookie);
return (consent.categories && consent.categories.indexOf('statistics') > -1) ? 'granted' : 'denied';
} catch(e) {
return 'denied';
}
}
Once you've made any adjustments, make sure you delete any cookies (or other browser storage) used by your consent banner, then reload your website using Tag Assistant and select the 'Consent Default' data layer event. You should see these values:
Type | On-Page Default |
---|---|
ad_storage | denied |
analytics_storage | denied |
ad_user_data | denied |
ad_personalization | denied |
personalization_storage | denied |
Issue: 'Accept All' clicked, but consent still shows 'denied'
If you see the consent status is still set to denied
even after you've accepted cookies, there a few things to review. You should check how the updated consent status is meant to be passed to Google Tag Manager and how tags are triggered after cookies have been accepted.
Fixes:
- Check the value of the variable (or variables) used to update the consent status. To do this, open Tag Assistant, and then select the event that is pushed to the data layer once cookies have been accepted. After selecting the 'Variables' tab in Tag Assistant, you should see the value of
granted
for the variable. If you don't see the correct value, then the issue could be with the configuration of your variable. - Check that the tag template is receiving the correct value from the variable. If no variable is selected for the tag template or the wrong variable is selected, then the consent signal values will be incorrect too.
- If your cookie banner creates it's own cookie to store people's consent selections, then check that the cookie is created and contains the correct value based on your selection. If the cookie isn't created or the value isn't correct, you should contact the provider of cookie banner for assistance.
- Depending on how you configure and implement your cookie banner, a number of solutions will only show consent status as
granted
once you view a second page on your website. You can check this by allowing cookies and then navigating to another page while using Tag Assistant. - Check that your cookie banner is correctly pushing an an update event to the data layer.
You should see the following values if someone accepts all cookies on your website:
Type | Current State |
---|---|
ad_storage | granted |
analytics_storage | granted |
ad_user_data | granted |
ad_personalization | granted |
personalization_storage | granted |
Issue: Missing ad_user_data or ad_personalization Signals
Consent Mode v2 requires the ad_user_data
and ad_personalization
signals. If they’re missing:
- Tags like the Google Tag for Google Ads might not load correctly.
- You may see warnings in Tag Assistant or missing data in Google Analytics.
Fixes:
- Update your consent banner to include these signals.
- Ensure these signals are correct for both the default consent state and the updated consent state on your website.
Issue: Tags Fire Before Consent Is Set
If your default consent is applied too late, some tags may fire before they're meant to.
Fixes:
- Check tag firing sequence – the 'Consent Initialization - All Pages' trigger must be used for consent-related tags so they fire first.
- Avoid placing cookie banner and consent-related scripts in Custom HTML tags that fire after other triggers.
Issue: personalization_storage, functionality_storage, or security_storage show as 'granted' by default
This is expected behavior unless you explicitly override it in your default consent configuration. Google treats functionality_storage
and security_storage
as essential and usually grants them by default.
Fixes:
- To override this, ensure you set a default consent state of
denied
for these consent signals. - Be cautious – denying these may break core website functionality (like login forms or security features),
Tip: If you’re subject to laws or regulations that require full opt-in (such as GDPR), you may need to deny all categories by default and only grant them after acceptance.
Verifying Consent Signals with Tag Assistant
Using Google Tag Assistant to preview your GTM container can help you:
- See which tags fired or didn’t fire due to consent
- View real-time consent signals
- Detect errors in Consent Mode configuration
The basic steps to use Tag Assistant to check and test consent mode are:
- Open your website using Tag Assistant
- Make a selection on your cookie banner
- Look for the consent states shown for each data layer event

Extra Tips for Troubleshooting GTM Consent Mode
- Don’t combine triggers for consent tags. Use the ‘Consent Initialization - All Pages’ trigger separately from 'Initialization - All Pages' or any other triggers.
- Clear local storage and cookies between tests. It's common for cookie banners to store selections using it's own cookie. This can impact testing.
- Check timing of event listeners – sometimes the update event pushed to the data layer is triggered before consent mode.
- Keep
functionality_storage
andsecurity_storage
granted by default unless legally required to restrict them. - If you’re using server-side GTM, make sure consent signals are correctly passed from the client container to the server container.
Next Steps
Troubleshooting Consent Mode in GTM can feel a bit tricky – especially with the additional requirements in Consent Mode v2. But once you have the right default signals, triggers, and tag settings in place, your tags should fire and behave based on people's consent choices.
If you're still running into issues, I recommend contacting support for the provider of your consent management platform and cookie banner. They should be able to support you through issues you encounter when implementing their solution.
Comments