Introduction
Updated for 2026 compliance practices.
For website owners using HubSpot CMS, implementing consent mode v2 is a critical step toward aligning with GDPR requirements while maintaining valuable analytics and advertising capabilities. This HubSpot CMS consent mode v2 setup guide provides a practical, technically focused walkthrough—from understanding what consent mode v2 means for your site to verifying that your implementation works correctly. We’ll cover the necessary steps, highlight common pitfalls, and show you how to use GDPRChecker to validate your setup. Remember, this guide offers technical implementation guidance, not legal advice. For legal questions, consult a qualified professional.
What HubSpot CMS Consent Mode v2 Setup Guide Means for Website Owners
Consent mode v2 is Google’s updated mechanism for communicating user consent choices to Google tags. For HubSpot CMS users, this setup guide addresses how to integrate consent signals—specifically ad_storage, analytics_storage, ad_user_data, and ad_personalization—directly into your HubSpot-hosted pages. Unlike a generic consent banner, consent mode v2 allows tags to adjust their behavior based on consent state, enabling cookieless pings that preserve some measurement even when users decline tracking. This is particularly relevant for sites using Google Analytics 4, Google Ads, or Floodlight tags.
From a compliance perspective, the European Data Protection Board (EDPB) has emphasized that consent must be freely given, specific, informed, and unambiguous. Consent mode v2 helps operationalize these principles by ensuring that Google tags respect the user’s choices at a technical level. For website owners, this means you must configure your HubSpot CMS to pass accurate consent states before any tags fire. The setup involves coordinating your consent management platform (CMP), your tag management system (like Google Tag Manager), and your HubSpot CMS templates. The goal is to close the “Consent Mode gap”—the disconnect between what users agree to and what your tags actually do.
This guide focuses on practical implementation. We’ll assume you already have a CMP that supports consent mode v2 (either a Google-certified CMP or one that implements the consent API correctly). If you’re unsure whether you need a CMP, see our guide on do I need a CMP if I do not run Google Ads. For a broader overview of consent mode v2, check our Google Consent Mode v2 guide.
Requirements and Compliance Expectations
Before diving into the technical steps, let’s clarify the requirements. Under GDPR, consent is required for storing or accessing information on a user’s device (ePrivacy Directive) and for processing personal data (GDPR). Consent mode v2 does not replace the need for a compliant cookie banner; it works alongside it. Your banner must provide clear options, including a reject-all button, and must not nudge users toward acceptance. The EDPB’s guidelines stress that cookie walls (forcing consent to access content) are generally not compliant.
For HubSpot CMS, this means your site must: - Display a cookie banner that obtains valid consent before any non-essential cookies or tracking scripts are set. - Implement consent mode v2 so that Google tags default to denied states until consent is granted. - Update consent states dynamically when users change their preferences. - Ensure that consent signals are sent reliably on every page load.
A common misconception is that consent mode v2 alone makes you compliant. In reality, it’s a technical tool that must be paired with proper disclosures in your privacy policy and a robust consent mechanism. The “Close the Cookie Banner gap” and “Close the Privacy Policy gap” are equally important. Your privacy policy should explain what data is collected, how consent is managed, and how users can exercise their rights, including DSARs (data subject access requests). For more on banner requirements, see our cookie banner requirements guide.
From a technical standpoint, consent mode v2 requires that the consent state be set before any Google tags load. This is typically done by injecting a small script in the <head> of your HubSpot CMS pages that calls gtag('consent', 'default', {...}). The default should be denied for all storage types unless you have a legal basis other than consent (e.g., strictly necessary cookies). Then, when the user interacts with your CMP, the consent state is updated to reflect their choices.
How to Implement HubSpot CMS Consent Mode v2 Step by Step
Implementing consent mode v2 on HubSpot CMS involves several layers: the CMP configuration, the consent mode script, Google Tag Manager (if used), and verification. Here’s a step-by-step approach.
Step 1: Choose and Configure Your CMP
First, ensure your CMP supports consent mode v2. If you use a Google-certified CMP, it will handle much of the consent signaling automatically. However, even with a certified CMP, you need to verify that the consent commands are fired correctly on your HubSpot pages. If you’re using a non-certified CMP, you’ll need to implement the consent API calls manually. For a comparison, see our article on consent mode v2 vs Google certified CMP.
Configure your CMP to: - Set the default consent state to denied for all parameters (ad_storage, analytics_storage, ad_user_data, ad_personalization). - Fire an update command when the user makes a choice. - Handle asynchronous loading so that the default state is set before any tags.
Step 2: Add the Consent Mode Default Script to HubSpot CMS
In your HubSpot CMS, you need to add the consent mode default script to every page. This script must run before any Google tags or GTM container. The best practice is to place it directly in the <head> of your site’s global template or via the site header HTML setting in HubSpot.
Here’s a minimal example (note: this is a conceptual illustration; actual implementation depends on your CMP):
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
'ad_storage': 'denied',
'analytics_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'wait_for_update': 500
});The wait_for_update parameter tells Google tags to wait up to 500 milliseconds for an update call before proceeding. This is useful if your CMP loads asynchronously. Adjust the timeout based on your CMP’s typical load time.
In HubSpot CMS, you can add this script in Settings > Website > Pages > Site Header HTML or by editing your global template in the design manager. Ensure it’s placed before any other scripts that load Google services.
Step 3: Integrate with Google Tag Manager (If Used)
If you use Google Tag Manager on your HubSpot site, you need to configure it to respect consent mode. In GTM, you can use the built-in consent settings (under Admin > Container Settings > Enable consent overview) to map consent states to tag firing. However, the consent mode default script must still be present on the page.
For GTM, the recommended approach is: - Load the GTM container script after the consent default script. - In GTM, set up consent checks for tags that require consent (e.g., Google Analytics 4, Google Ads). - Use the Consent Initialization trigger to fire tags that set default consent, but be careful not to duplicate the default command.
A common mistake is to fire the default consent command inside GTM. This is too late because GTM itself loads after the page has started. The default must be set inline in the page’s <head>.
Step 4: Implement Consent Update Calls
When a user interacts with your cookie banner and makes a choice, your CMP must call gtag('consent', 'update', {...}) with the appropriate granted or denied states. For example, if the user accepts analytics cookies but denies advertising, the update call would be:
gtag('consent', 'update', {
'analytics_storage': 'granted',
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied'
});This update must happen on every page where the user has already made a choice, not just on the page where they interacted with the banner. Most CMPs handle this by storing the consent choice in a cookie and re-firing the update on each page load. Verify that your CMP does this reliably.
Step 5: Handle HubSpot-Specific Considerations
HubSpot CMS has its own analytics and tracking scripts. While consent mode v2 primarily targets Google tags, you should also ensure that HubSpot’s tracking respects consent. HubSpot’s cookie banner can be configured to block HubSpot tracking cookies until consent is given. However, if you use a third-party CMP, you may need to manually integrate it with HubSpot’s tracking API. This is beyond the scope of this guide, but be aware that consent mode v2 does not automatically control non-Google tags.
Common Mistakes and How to Avoid Them
Even with careful setup, several mistakes can undermine your consent mode v2 implementation. Here are the most frequent ones and how to avoid them.
Mistake 1: Default Consent Set to Granted
Setting the default consent to granted defeats the purpose of consent mode. Always default to denied unless you have a lawful basis for processing without consent. This is a critical compliance point. Use GDPRChecker to scan your site and verify that no Google tags fire before consent.
Mistake 2: Consent Default Script Loads Too Late
If the default script is loaded after Google tags or GTM, the tags will assume granted by default. Place the script as high in the <head> as possible, before any other scripts. In HubSpot CMS, avoid adding it via a module that loads asynchronously.
Mistake 3: Missing Update Calls on Subsequent Pages
Some CMPs only fire the update call on the page where consent is given. On subsequent pages, the default denied state remains, causing tags to under-report. Ensure your CMP re-applies the user’s choice on every page load.
Mistake 4: Ignoring the Reject Flow
Many implementations focus only on the accept flow. Test what happens when a user clicks “Reject All.” The update call should set all parameters to denied, and no consent-requiring tags should fire. Use GDPRChecker’s scanner to simulate a reject flow and check for pre-consent network requests.
Mistake 5: Not Updating Privacy Policy
Your privacy policy must disclose the use of consent mode and how it affects data collection. This is part of closing the “Privacy Policy gap.” Update your policy to reflect the specific consent states and the implications for users.
How to Validate with GDPRChecker
After implementing consent mode v2 on your HubSpot CMS, validation is essential. GDPRChecker provides scans that help verify pre-consent network requests, banner behavior, and disclosure gaps. Here’s how to use it effectively.
Scan for Pre-Consent Requests
Run a GDPRChecker scan on your site with the scanner configured to simulate a first-time visitor (no consent cookies). The scan will identify any network requests that occur before consent is given. Look for requests to google-analytics.com, doubleclick.net, or other Google domains. If any appear, your default consent script may not be working correctly.
Verify Consent State Changes
Use the scanner to test different consent scenarios: accept all, reject all, and custom preferences. GDPRChecker can check whether the consent state is correctly communicated to Google tags. For example, after accepting analytics only, the scan should show that analytics_storage is granted but ad_storage remains denied.
Check Banner Compliance
GDPRChecker also evaluates your cookie banner for compliance with EDPB guidelines. It checks for a reject button, pre-ticked boxes, and whether the banner reappears if consent is withdrawn. See EDPB Cookie Banner Taskforce report. This helps close the “Cookie Banner gap.”
Validate Disclosure Gaps
The scanner can identify missing or incomplete privacy policy disclosures related to consent mode. It checks for mentions of data recipients, purposes, and user rights. This helps close the “Privacy Policy gap” and the “DSAR gap.”
After making changes based on scan results, re-scan to confirm the issues are resolved. Regular scans are recommended, especially after updating your CMP, tags, or HubSpot templates.
Implementation Checklist
Use this checklist to ensure your HubSpot CMS consent mode v2 setup is complete and verified.
- Confirm your CMP supports consent mode v2 and is correctly configured.
- Add the consent mode default script to the
<head>of your HubSpot CMS global template. - Set all default consent states to denied (
ad_storage,analytics_storage,ad_user_data,ad_personalization). - Include
wait_for_updatewith an appropriate timeout (e.g., 500ms). - Ensure the default script loads before any Google tags or GTM container.
- Verify that your CMP fires an update call on every page load with the user’s saved preferences.
- Test the reject flow: after clicking “Reject All,” no consent-requiring tags should fire.
- Test the accept flow: after accepting, tags should fire with granted consent.
- Test partial consent (e.g., analytics only) and verify correct states.
- Update your privacy policy to explain consent mode and its implications.
- Run a GDPRChecker scan to detect pre-consent network requests and banner issues.
- Re-scan after any changes to your CMP, tags, or HubSpot settings.
FAQ
What is HubSpot CMS consent mode v2 setup guide?
This guide explains how to implement Google’s consent mode v2 on websites built with HubSpot CMS. It covers the technical steps to ensure Google tags respect user consent choices, helping site owners align with GDPR requirements while maintaining analytics and ad functionality.
Do I need HubSpot CMS consent mode v2 setup guide for GDPR?
If your HubSpot site uses Google services like Analytics or Ads and serves EU visitors, implementing consent mode v2 is strongly recommended. It helps ensure that personal data is only processed after valid consent, reducing compliance risks. However, it is not a complete GDPR solution on its own.
How do I implement HubSpot CMS consent mode v2 setup guide?
Implementation involves adding a default consent script to your HubSpot CMS templates, configuring your CMP to update consent states, and integrating with Google Tag Manager if used. The default script must set all consent parameters to denied and load before any Google tags.
How can I verify HubSpot CMS consent mode v2 setup guide with a scanner?
Use GDPRChecker to scan your site for pre-consent network requests, verify consent state changes, and check banner compliance. The scanner simulates user interactions and identifies gaps in your consent mode implementation, helping you close compliance gaps.
What are common HubSpot CMS consent mode v2 setup guide mistakes?
Common mistakes include setting default consent to granted, loading the default script too late, missing update calls on subsequent pages, ignoring the reject flow, and failing to update the privacy policy. Regular scanning with GDPRChecker can catch these issues.
Next Steps for Your HubSpot CMS Compliance
Implementing consent mode v2 on HubSpot CMS is a significant step toward GDPR compliance, but it’s just one piece of the puzzle. To fully close the gaps, you should also address cookie banner requirements, privacy policy disclosures, and data subject access request processes. For more detailed guidance, explore our related guides:
- Google Analytics GDPR Compliance
- Google Consent Mode v2 Guide
- Consent Mode v2 vs Google Certified CMP
- Do I Need a CMP if I Do Not Run Google Ads?
- Google Consent Mode v2 Checker
- Cookie Banner Requirements
Ready to verify your setup? Run a GDPRChecker scan now to identify any remaining consent mode gaps and ensure your HubSpot CMS site respects user choices. Our scanner provides actionable insights to help you close the Consent Mode gap, Cookie Banner gap, and more. Start your scan today.
Copyright and editorial notice
© GDPRChecker
This original AI-assisted editorial draft was selected, reviewed, and published by GDPRChecker. All rights are reserved where protected by applicable law. Do not reproduce the article without permission.