Consent Mode

Consent Mode is a specific feature developed by Google to help website owners manage how Google services on their sites use cookies and collect data in compliance with privacy regulations like the General Data Protection Regulation (GDPR) in Europe and the California Consumer Privacy Act (CCPA) in the United States. Consent Mode allows website owners to adjust the behavior of Google's services based on the consent status of their users. For instance, it can modify how Google Analytics and Google Ads behave when a user does not consent to cookies or other tracking mechanisms.

While Consent Mode is specific to Google's services, the underlying principle of obtaining user consent for data collection and processing is not exclusive to Google. Many other services and technologies require similar mechanisms to comply with privacy laws. Various third-party tools, content management systems (CMS), and plugins offer consent management functionalities to help website owners comply with these regulations by controlling cookies, tracking scripts, and data collection practices.

In practice, this means that while Google provides a structured and integrated solution for managing consent for its services, website owners must also ensure they obtain and manage user consent for all other non-Google services they use that collect personal data. This is often achieved through implementing a consent management platform (CMP) or similar solutions that provide users with clear choices about what cookies and tracking technologies they agree to while using a website.

Comparing Consent Mode (v1) and Consent Mode v2

Consent Mode (v1)

  • Introduced in 2020
  • Has two consent parameters:
    • analytics_storage: Controls analytics data collection
    • ad_storage: Controls advertising data collection

Consent Mode v2

  • Updated version introduced in 2023
  • Has four consent parameters:
    • analytics_storage
    • ad_storage
    • ad_user_data: Additional control for sending user data to Google for ads
    • ad_personalization: Additional control for personalized ads
  • Two implementation modes:
    • Basic: Tags blocked until consent is granted
    • Advanced: Tags load by default, behavior adjusted based on consent

The key differences in v2 are the additional consent parameters for enhanced user control over advertising data and the introduction of Basic and Advanced implementation modes.

The updated v2 aims to better comply with privacy regulations like GDPR and provides more flexibility for websites to balance privacy compliance with the continued use of Google services.

Comparing Consent Mode v2 Basic and Advanced Mode

Behavior of Tags and Cookies

Basic Consent Mode

  • Google tags are blocked until consent is granted
  • No data collected before consent, not even consent status
  • When consent is denied, tags are blocked completely

Advanced Consent Mode

  • Google tags load before the consent banner
  • Default consent set to denied
  • When consent is denied, cookieless pings are sent to Google
  • Allows limited data collection and modeling even without consent

Implementation Process

Basic Consent Mode

  • Simple setup
  • Less customization needed
  • Block tags until consent is granted

Advanced Consent Mode

  • More complex setup
  • Need to customize tag behavior based on consent
  • Allow tags to load initially, then adjust based on consent

The critical tradeoff is that advanced consent mode allows for better modeling and metrics, even for non-consenting users, at the cost of more implementation effort. The basic consent mode is more straightforward but leaves you in the dark if consent is denied.

Is Implementing Consent Mode mandatory?

It is not yet globally mandatory, but Google strongly recommends complying with privacy regulations like GDPR. It will likely become a global requirement in the future.

It is mandatory for websites using Google services (Analytics, Ads, etc.) that collect data from users in the EEA starting March 2024. Without it, Google services may stop functioning or limit data collection from EEA users after this deadline.

Consent Mode works together with an existing consent banner/CMP. It does not replace the need to display a cookie consent banner to users.

Implementing Consent Mode

To enable consent mode:

  1. Set up a consent management platform (CMP) and banner to collect user consent
  2. Add the initial Consent Mode configuration code on your pages
  3. Integrate the CMP to communicate consent status to Google
  4. Customize Google tag behavior based on consent settings

Here is a summary of key steps to prepare your website for implementing Google's Consent Mode v2:

Check requirements

  • Determine if Consent Mode v2 is mandatory for your website based on targeting users in the EEA or using Google services like Analytics and Ads
  • If so, you must implement it by March 2024 deadline

Select implementation approach

  • Decide between Basic or Advanced Consent Mode
    • Basic blocks tags until consent is granted
    • Advanced allows tags to load by default, then adjusts behavior based on consent
  • Advanced allows better modeling but needs more customization

Set up consent banner

  • Don't have one yet? Obtain and configure a consent management platform (CMP)
  • Ensure it aligns with Google's standards and your privacy regulations
  • Customize consent options and text as needed

Integrate CMP with Google

  • Enable Consent Mode in the CMP platform
  • Add Google services as vendors to collect consent signals
  • Set default consent to ‘denied,' then update based on user choice

Test and refine

  • Verify correct functionality under different consent scenarios
  • Check consent parameters are passed to Google properly
  • Monitor and tweak implementation over time

The key is integrating your consent banner with Google services via Consent Mode v2 to adjust Google tag behavior dynamically based on user privacy choices.

Implementing Consent Mode On Your Custom Code Website

Here are the steps to implement Google Consent Mode v2 in advanced mode on your custom code website:

1. Add the default consent mode snippet in the head section:

html

2. Integrate with your consent management platform (CMP) to update consent values when users interact with the consent banner. For example:

js

function updateConsent(consentValues) {
gtag('consent', 'update', consentValues);
}

3. Load the Google Tag Manager gtag.js snippet:

html

4. Initialize gtag.js:

js

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

5. Add additional gtag config and event tracking code as needed.

6. Load the CMP script to show the consent banner.

This ensures advanced consent mode where tags load by default and behavior adjusts when the user interacts with the consent banner.

Google's resources:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top