Skip to content
Consent mode

Consent mode

What is consent mode?

Consent mode is designed to help advertisers and publishers comply with data privacy laws. It works by enabling users to specify their consent preferences for tracking and analytics before any data is sent to Google's servers. Once consent preferences are set, consent mode determines which tags should be loaded, ensuring only authorized tags collect data.

How consent mode works

Consent mode receives users' consent choices from your cookie banner or widget, dynamically adapting the behavior of Analytics, Ads, and third-party tags that create or read cookies. This feature preserves a visitor’s consent state across different pages they visit, ensuring consistent application of their choices.

Consent mode operates by adding an extra parameter to requests sent to Google’s servers, indicating user consent status for ad personalization and analytics. Initially, when no consent is given, Google receives limited information (e.g., IP address, page URL). Once consent is provided, the parameter updates to reflect the user's choice, influencing subsequent data requests.

Implementation options

You can implement consent mode on your website or app using either of two methods:

  • Basic implementation: Prevents Google tags from loading until a user interacts with a consent banner. No data is transmitted to Google before user interaction. When the user consents, Google tags load and send the consent states to Google. If the user does not consent, no data is sent to Google, and tags are blocked from firing.
  • Advanced implementation: Google tags load when a user opens the website or app, setting default consent states (usually denied). The tags send cookieless pings until the user interacts with the banner. When consent is granted, the tags send full measurement data. This enables improved, advertiser-specific modeling compared to the basic implementation.

Consent mode modeling

To address data collection gaps, Google products use consent mode pings to model your metrics. This modeling helps maintain accurate measurement solutions while protecting user privacy. More details on specific modeling circumstances and processes can be found in Google's documentation:

Tags with built-in support for consent mode

Several Google tags come with built-in consent checks, adjusting their behavior based on the user’s consent state. These include:

  • Google Tag
  • Google Analytics
  • Google Ads (supports conversion tracking and data segments; support for Phone Call conversions pending)
  • Floodlight
  • Conversion Linker

Impact of consent mode

After implementing consent mode for at least seven days, Google Ads and Google Analytics may provide data on the impact of consent mode. Uplift numbers will be shown when the data meets a minimum threshold, offering insights into how consent mode affects your analytics and advertising efforts.

CookieHub integration with consent mode

CookieHub integrates seamlessly with consent mode, allowing Google tags to automatically adjust based on signals from CookieHub. This ensures compliance with data privacy regulations without requiring script changes. By integrating with CookieHub, you can:

  • Enhance user experience: Provide a seamless and privacy-compliant user experience.
  • Gain valuable insights: Collect meaningful data about website performance while respecting user consent choices.
  • Ensure compliance: Meet GDPR, CCPA, and other data privacy regulations.

Integration with Google Tag Manager

Consent mode can be easily integrated using the CookieHub Google Tag Manager (GTM) template. With consent mode enabled, GTM automatically includes consent mode headers in all tags that support it, such as Google Analytics, Google Ads, and Floodlight. For tags without built-in support, additional consent configurations can be set up in GTM.