COOKIES. CONSENT. COMPLIANCE
secure privacy badge logo
December 25, 2024

Google Consent Mode: Technical Setup and Best Practices for Implementation

Learn how to implement Google Consent Mode, understand its features, and optimize tag behavior based on user consent states for Analytics and Ads tracking.

With privacy regulations and user expectations for data transparency becoming more comprehensive, Google Consent Mode provides a robust framework to balance compliance with effective analytics. This guide offers a panoramic overview of its features, implementation, and best practices.

1. What Is Google Consent Mode?

Google Consent Mode is a dynamic framework that integrates user consent preferences into website and app data collection processes. It adjusts the behavior of Google tags—such as those for Google Analytics, Ads, and Floodlight—based on user consent states for cookies and app identifiers.

Consent Mode works with existing consent banners or Consent Management Platforms (CMPs) to dynamically adapt tag behavior while respecting privacy choices.

2. Key Features and Benefits

Data Transmission

Consent Mode ensures data handling reflects user preferences:

  • When Consent Is Granted: Tags function normally, collecting and transmitting data.
  • When Consent Is Denied: Tags operate in a consent-aware state, sending only non-identifiable cookieless pings to Google servers.

Tag Behavior

Google tags dynamically adjust based on consent states:

  • ad_storage: Controls cookies for advertising and remarketing.
  • analytics_storage: Governs cookies for analytics and measurement.

Conversion Modeling

To address data gaps from denied consent, Google Consent Mode enables conversion modeling using cookieless signals. Businesses can choose between a general or advertiser-specific modeling approach for more accurate insights.

3. Basic vs. Advanced Consent Mode

FeatureBasic Consent ModeAdvanced Consent Mode
Tag LoadingBlocked until user interacts with a consent banner.Loads immediately with defaults set to "denied," unless configured otherwise.
Data TransmissionNo data is sent before user consent—not even the default consent state.Cookieless pings are sent when consent is denied; full data is sent when consent is granted.
Consent StatesSet after user interaction.Defaults to "denied" but updates dynamically based on user choices.
Conversion ModelingRelies on a general model.Uses an advertiser-specific model for better accuracy.

4. Consent Mode Pings

Consent-aware tags communicate key data through cookieless pings, ensuring compliance while enabling data modeling:

  • Consent State Pings: Indicate the default and updated consent states for ad_storage and analytics_storage. Sent from each page load or when consent changes.
  • Conversion Pings: Triggered when a conversion occurs, even without cookies.
  • Google Analytics Pings: Log events and page activity for consented users.

Ping Data Includes:

  • Functional information: timestamps, user agents, and referrer data.
  • Non-identifiable aggregates: random page-load numbers and boolean consent indicators.

These pings allow Google to model metrics for Ads and Analytics while safeguarding user privacy.

5. Setting Up Consent Mode

For Websites

  1. Obtain User Consent: Deploy a consent banner (via a CMP or custom setup).
  2. Configure Google Tags: Use the gtag('consent') API to communicate consent states dynamically.
  3. Enable Ads Data Redaction (if needed):

gtag('set', 'ads_data_redaction', true);

  1. Verify Implementation: Test for accuracy and compliance.

For Apps

  1. Implement a consent mechanism (banner or dialog).
  2. Use the Google Analytics for Firebase SDK to communicate consent states to Google services.
  3. Regularly test and refine the implementation to ensure compliance.

6. Common Implementation Issues

Consent Not Updated on Transition Pages

When consent changes during navigation, tags may lose critical data, resulting in incomplete reports.

Solution: Call the update command whenever consent state changes.

gtag('consent', 'update', { 'ad_storage': 'granted' });

Consent Updated Before Page Reload

If the update command is logged during a page unload, requests may be canceled.

Solution: Ensure updates are logged well in advance of page reloads.

7. Tags and Consent Mode Compatibility

Google tags with built-in consent checks include:

  • Google Tag
  • Google Analytics
  • Google Ads (supports conversion tracking and data segments)
  • Floodlight
  • Conversion Linker

For custom tags, add consent checks via Google Tag Manager using Advanced > Consent Settings.

8. Consent Mode Impact Results

After at least seven days of implementing Consent Mode, you can review its impact on conversion rates and analytics. Google Ads and Analytics provide uplift numbers when data meets minimum thresholds, allowing you to evaluate Consent Mode's effectiveness.

9. Best Practices

  1. Enable Ads Data Redaction: Prevent ad click identifiers from being transmitted when consent is denied.
  2. Choose Advanced Consent Mode: Maximize insights with advertiser-specific modeling.
  3. Log Consent Updates Promptly: Avoid data gaps by ensuring timely updates.
  4. Test Regularly: Continuously verify your setup to ensure compliance and accuracy.

Conclusion

Google Consent Mode is an essential tool for businesses balancing privacy compliance with the need for actionable analytics. By understanding its technical capabilities and best practices, organizations can maintain user trust while optimizing data-driven strategies. Implementing Consent Mode—whether basic or advanced—ensures a privacy-first approach to measurement and advertising in a dynamic regulatory environment.

logo

Get Started For Free with the
#1 Cookie Consent Platform.

tick

No credit card required

Sign-up for FREE