Skip to main content

How to Upgrade from Google Consent Mode v1 to v2?

Last updated on March 22, 2024

CookieYes has implemented support for Google Consent Mode version 2 (v2) signalling within its consent management platform. This update enables CookieYes customers who use Google advertising products to seamlessly integrate with the CookieYes CMP using its default configuration settings. The integration with Google’s Consent Mode v2 provides website publishers with a streamlined way to deliver transparency around data collection practices and choices to users. This guide walks you through the step-by-step process to upgrade from Google Consent Mode v1 to v2.

Use Cases

Note

What is Google’s Consent Mode v2?

Google Consent Mode v2 is an enhanced version of Google Consent Mode, aiding website publishers and advertisers in obtaining explicit user consent for web tracking, aligning with privacy regulations like GDPR. This updated version introduces standardised banners and user controls, streamlining the consent-gathering process for setting cookies and utilising tracking technologies.

Implementing Consent Mode v2 enables advertisers to integrate user consent with Google advertising services, empowering them to generate granular reports on campaign performance and conversion tracking. Consent Mode v2 provides the capabilities to acquire user consent specifically for advertising and analytics cookies in a legally compliant way under privacy laws.

What’s new in Consent Mode v2?

Google introduced Consent Mode v2 as an update to its existing Consent Mode platform to continue alignment with privacy regulations and provide users enhanced transparency and control. Two notable new parameters have been added:

ad_user_data

This parameter includes the user’s consent preference for sharing their data with Google’s ad services. The possible values are “granted” or “denied” based on user choice collected through the site’s cookie consent banner. If consent is denied, Google advertising tags will avoid collecting or sending identifiable user data.

ad_personalization

This parameter indicates if a user has opted-in to ad personalisation and remarketing. Like ad_user_data, it reflects user preferences captured through the consent UI. A value of “denied” will turn off personalised ad functionality such as remarketing or interest-based targeting.

Upgrade to Google Consent Mode v2 with CookieYes

CookieYes has provided two methods to integrate Consent Mode with CookieYes — with and without using the Google Tag Manager Template.

Method 1: Implementation using Google Tag Manager template

For existing users who have implemented Consent Mode using the Google Tag Manager template follow the steps below.

Step 1: Add Default Consent Setting

In the CookieYes CMP template, the two new parameters ad_user_data and ad_personalization, have been added to Default Consent Settings.

Select Enabled/Disabled from the drop down for each cookie category based on your requirements.

Step 2: Update the CookieYes CMP template.

1. From the Google Tag Manager Dashboard, navigate to Templates in the left sidebar. Then, locate the CookieYes CMP tag template. Click on the Update icon.

2. Click Accept Update to update the CookieYes CMP template to v2.

Step 3: Republish the script.

Method 2: Implementation using the custom script

For existing users who have implemented Consent Mode using the custom script have to add the following new parameters to the existing script:

gtag("consent", "default", {
        ad_user_data: "denied",//new parameter
        ad_personalization: "denied",//new parameter
        });

After adding the above parameters to the existing script, the resulting script should resemble the following:

<script>

    window.dataLayer = window.dataLayer || [];

    function gtag() {

        dataLayer.push(arguments);

    }

    gtag("consent", "default", {
        ad_storage: "denied",
        ad_user_data: "denied", 
        ad_personalization: "denied",
        analytics_storage: "denied",
        functionality_storage: "denied",
        personalization_storage: "denied",
        security_storage: "granted",
        wait_for_update: 2000,
    });

    gtag("set", "ads_data_redaction", true);
    gtag("set", "url_passthrough", true);

</script>

Troubleshooting Google Consent Mode v2

If updates to CookieYes Google Consent Mode v2 configuration in your Google Tag Manager container are not enabling the new consent features on your live site pages, even after updating the CookieYes CMP template, Log In to the CookieYes Web App and republish the script to sync the Configuration.

Have more questions?

Reach out to us and we'll answer them.

Contact us