Google Consent Mode v2

Google Consent Mode v2 lets Google services like Analytics, Ads, and Floodlight adjust their behavior based on user consent. It helps you comply with privacy laws by informing Google how to operate before and after a user makes a consent choice.

CookieHub integrates with Consent Mode v2 automatically and sets the required signals for you.

What does Consent Mode v2 do?

Consent Mode v2 uses parameters that control how Google tags behave. These parameters are sent via gtag or Google Tag Manager (GTM):

Parameter Purpose
ad_storage Controls advertising cookie storage
analytics_storage Controls analytics cookie storage
functionality_storage Controls non-essential functional features
security_storage Controls security-related cookie storage
ad_user_data Controls if user data is sent for ads
ad_personalization Controls if ads can be personalized

CookieHub automatically maps these to your cookie categories.

CookieHub integration

  • No manual gtag setup is needed
  • Signals are sent automatically to Google
  • Works with both HTML and GTM implementations

Implementation options

HTML integration

  • Add the CookieHub script in your site’s <head>
  • Consent Mode initializes before any Google tags run
  • No extra setup needed if Google tags load after CookieHub

GTM integration

  • Use the CookieHub CMP template from the GTM Community Template Gallery
  • Enter your CookieHub domain code
  • Set the trigger to Consent Initialization – All Pages
  • Save and publish

This ensures Consent Mode is applied before tags execute.

For non-Google tags, configure [Additional Consent Mode](link to relevant KB article).

Parameter mapping

CookieHub Category Consent Mode Parameters
Marketing ad_storage , ad_user_data , ad_personalization
Analytics analytics_storage
Preferences functionality_storage
Necessary security_storage (always allowed)

Parameters update automatically when consent changes.

When is Consent Mode v2 required?

Use Consent Mode v2 if:

  • You run Google Ads, AdSense, or Analytics in the EU, UK, or Switzerland
  • You must comply with Google’s EU User Consent Policy
  • You need analytics or conversion data under privacy laws

Summary of features

Feature CookieHub Support
Consent Mode v2 integration ✅ Yes
HTML script integration ✅ Yes
GTM integration with template ✅ Yes
Automatic parameter mapping ✅ Yes