Permission: Vendor list - GDPR
Google Consent Mode 2.0 ensures that Google vendors on your property comply with an end-user's consent choices for purposes (called consent checks) defined by Google. When a website visitor indicates their consent choices, tags with consent checks adjust their behavior, and user consent choices are preserved across their interaction with the website.
In this article, we will cover how to configure the integration between Sourcepoint and Google Consent Mode 2.0 for a web property that is running a GDPR TCF campaign.
- Consent check overview
- Google Tag Manager vs
gtag.js
- Implement Google Consent Mode 2.0 on web
- Debug default consent mode timing
- Test integration
Note: Be advised that Google Consent Mode 2.0 only impacts your organizations if you use one or more of the following Google products:
- Google Ads
- Google Analytics
- Search Ads 360
- Campaign Manager 360
- Display & Video 360
Consent check overview
Consent check(s) indicates the kind of storage a Google vendor uses. An end-user can deny or grant the collection of this data. The consent check varies across each Google vendor and can be viewed by selecting a vendor from the GTM platform and expanding the Advanced Settings > Consent Settings tab.
Please refer to the table below for the different consent checks available in Google Consent Mode 2.0:
Consent check | Values | Description |
ad_storage |
granted | denied | Enables storage (such as cookies) related to advertising. |
analytics_storage |
granted | denied | Enables storage (such as cookies) related to analytics (e.g. visit duration). |
ad_user_data |
granted | denied | Set to granted when end-user has consented to have their data shared with Google. |
ad_personalization |
granted | denied | Set to granted when the user has consented to have their data shared with Google for the purposes of ad personalization. |
Google Tag Manager vs gtag.js
Before configuring the implementation, your organization will need to decide whether to implement using Google Tag Manager or gtag.js
.
Follow the directions in your Google Tag Manager account to install Google Tag Manager on your property. Installing GTM on your property requires adding a code snippet to your <head>
tag and a code snippet to your <body>
tag.
Ensure that you define the data layer before Sourcepoint's tags (i.e. add the GTM code snippet before Sourcepoint's tags within the <head>
tag)
Note: Be aware that if implementing Basic consent mode, in addition to defining the dataLayer you will need to also define a function that controls the firing of Google tags based on the end-user's consent. Leverage the grants
object in the getCustomVendorConsents API to implement this function that suits your organization's needs. If implementing Advanced consent mode, you will only need to define the dataLayer as described above.
Follow the instructions on how to install gtag.js
onto your web property for each Google product you use. See the Google documentation below for more information about installing gtag.js
for various Google products.
gtag.js
documentation
Note: Be aware that if implementing Basic consent mode, in addition to defining the dataLayer you will need to also define a function that controls the firing of Google tags based on the end-user's consent. Leverage the grants
object in the getCustomVendorConsents API to implement this function that suits your organization's needs. If implementing Advanced consent mode, you will only need to define the dataLayer.
Implement Google Consent Mode 2.0 on web
Sourcepoint supports four different ways to implement Google Consent Mode 2.0 on your property running a GDPR TCF campaign. Click the tabs below to review which implementation method is suitable for your organization:
The preferred method of implementing Google Consent Mode 2.0 on your web property using Google Tag Manager requires enabling an Advanced Setting flag in your GDPR TCF vendor list associated with your property.
From the GDPR TCF vendor list associated with your property, add the "Google Advertising Products" vendor (GV: ID 755), which is required for this implementation method.
Note: If you leverage any Google Products that require analytics_storage
you may add additional custom vendors to your vendor list that best represent your Google product usage (e.g. Google Analytics). In addition to adding these custom vendors you will need to configure GTM containers, a new custom purpose, etc... see below for more information
Once the Google vendors are added to the vendor list, click Advanced Settings.
Enable the checkbox for Use TCF to Enable Google Consent Mode 2.0.
Click Apply Changes when finished.
Save your vendor list to confirm the changes.
The Use TCF to Enable Google Consent Mode 2.0 setting enables Sourcepoint to set an additional flag when initializing the TCData object. This additional flag allows Google to infer and map consent settings to the following Google Consent Mode 2.0 consent checks based on GDPR TCF purposes:
ad_storage
ad_personalization
ad_user_data
Please see the table below for how Google Consent Mode 2.0 maps GDPR TCF purposes to Google's consent checks:
Purpose | Description | Google tag behavior when Purpose is denied |
1 | Store and/or access information on a device |
ad_storage: denied ad_user_data: denied
|
3 | Create a personalised ads profile | ad_personalization: denied |
4 | Select personalized ads | ad_personalization: denied |
7 | Measure ad performance |
Disables the Google signals feature in Google Analytics. |
9 | Apply market research to generate audience insights | Disables the Google signals feature in Google Analytics. |
10 | Develop and improve products | Disables the Google signals feature in Google Analytics. |
Note: If your organization utilizes any Google products that require the analytics_storage
consent check (e.g. Google Analytics), you will need to perform additional steps. Expand the accordion below for more information.
Sourcepoint's preferred method of implementing Google Consent Mode 2.0 (i.e. the setting of the Use TCF to Enable Google Consent Mode 2.0 flag in Advanced Settings) does not cover the analytics_storage
consent check. In this section, we will use Google Analytics as an example to review the additional steps necessary to support analytics_storage
using Google Tag Manager.
- Configure GTM template for Google Consent Mode 2.0
- Add Google product to vendor list
- Configure custom purpose for
analytics_storage
Configure GTM template for Google Consent Mode 2.0
Sourcepoint GTM Template
Sourcepoint's GTM template is available directly within Google's Community Template Gallery or as a manually imported template. Please follow the instructions in the link below:
Once Sourcepoint's GTM template is available in your account, navigate to a container and click Tags on the left-hand rail.
Click New in the subsequent panel.
Click the Tag Configuration pane and select Sourcepoint CMP - Consent Mode v2 from the modal.
By default, all Google consent checks will default to denied (including analytics_storage
) for all regions. If this default is acceptable then you can move onto the trigger configuration.
If you would like to change the default settings for any of the Google consent checks, select Add Row and set the default settings for all regions/per region.
Click Triggering and then select Consent Initialization - All Pages from the next page.
Save the tag and when finished click Submit to publish your tag.
Add Google product to vendor list
From the GDPR TCF vendor list associated with your property, add Google vendors that your organization works with (e.g. Google Analytics).
Configure a custom purpose for analytics_storage
Your organization will finally need to create a custom purpose in your GDPR TCF vendor list that maps to the analytics_storage
consent check used by the Google product(s) running on your property.
Google Analytics example
Google Analytics requires the following consent checks:
ad_storage
analytics_storage
You will need to create a custom purpose for analytics_storage
but you do not need to create a custom purpose for ad_storage
since that consent check will be set via the Use TCF to Enable Google Consent Mode 2.0 flag you configured earlier.
Click + Add Custom Purpose from the vendor list builder page. Use the provided modal to input a name for the custom purpose.
Use the Google Consent Mode Category dropdown menu and select analytics_storage
. Click Create purpose when finished.
As a best practice, Sourcepoint recommends that you describe the Google products that currently rely on the purpose.
Navigate to the newly created custom purpose and click the custom purpose name.
Use the provided description field to note the Google products utilizing the custom purpose as part of the Google Consent Mode integration. Click Apply changes when finished.
Set the legal basis for the custom purpose to User Consent.
Click Save to confirm the updates to your vendor list. Your Sourcepoint and Google Consent Mode 2.0 integration setup is complete.
As an alternative to the preferred method of implementing Google Consent Mode 2.0 using Google Tag Manager on your property running a GDPR TCF campaign, your organization can perform the following:
- Configure GTM template for Google Consent Mode 2.0
- Add Google product vendors to vendor list
- Configure custom purposes for Google Consent Mode 2.0
Configure GTM template for Google Consent Mode 2.0
Sourcepoint GTM Template
Sourcepoint's GTM template is currently under review with Google so that it is directly available within the template community found in GTM. Please follow the instructions in the link below to manually upload the template into your Google Tag Manager account until it is approved.
Once Sourcepoint's GTM template is available in your account, navigate to a container and click Tags on the left-hand rail.
Click New in the subsequent panel.
Click the Tag Configuration pane and select Sourcepoint CMP - Consent Mode v2 from the modal.
By default, all Google consent checks will default to denied for all regions. If this default is acceptable then you can move onto the trigger configuration.
If you would like to change the default settings for any of the Google consent checks, select Add Row and set the default settings for all regions/per region. Multiple rows can be added to change the default settings of the consent checks for different regions.
Click Triggering and then select Consent Initialization - All Pages from the next page.
Save the tag and when finished click Submit to publish your tag.
Add Google product vendors to vendor list
From the GDPR TCF vendor list associated with your property, add Google vendors that your organization works with (e.g. Google Advertising Products, Google Analytics, etc...).
Configure custom purposes for Google Consent Mode 2.0
Your organization will finally need to create custom purposes for your GDPR TCF vendor list that map to the consent checks used by the Google products running on your property.
Click + Add Custom Purpose from the vendor list builder page. Use the provided modal to input a name for the custom purpose.
Use the Google Consent Mode Category dropdown menu to select a consent type to which this custom purpose will map. Click Create purpose when finished.
As a best practice, Sourcepoint recommends that you describe the Google products that currently rely on the purpose.
Navigate to the newly created custom purpose and click the custom purpose name.
Use the provided description field to note the Google products utilizing the custom purpose as part of the Google Consent Mode integration. Click Apply changes when finished.
Set the legal basis for the custom purpose to User Consent.
Repeat as necessary for other consent checks used by Google products on your property.
Click Save to confirm the updates to your vendor list. Your Sourcepoint and Google Consent Mode 2.0 integration setup is complete.
The preferred method of implementing Google Consent Mode 2.0 on your web property using gtag.js
requires enabling an Advanced Setting flag in your GDPR TCF vendor list associated with your property.
From the GDPR TCF vendor list associated with your property, add the "Google Advertising Products" vendor (GV: ID 755), which is required for this implementation method.
Note: If you leverage any Google Products that require analytics_storage
you may add additional custom vendors to your vendor list that best represent your Google product usage (e.g. Google Analytics). In addition to adding these custom vendors you will need to configure GTM containers, a new custom purpose, etc... see below for more information
Once the Google vendors are added to the vendor list, click Advanced Settings.
Enable the checkbox for Use TCF to Enable Google Consent Mode 2.0.
Click Apply Changes when finished.
Save your vendor list to confirm the changes.
The Use TCF to Enable Google Consent Mode 2.0 setting enables Sourcepoint to set an additional flag when initializing the TCData object. This additional flag allows Google to infer and map consent settings to the following Google Consent Mode 2.0 consent checks based on GDPR TCF purposes:
ad_storage
ad_personalization
ad_user_data
Please see the table below for how Google Consent Mode 2.0 maps GDPR TCF purposes to Google's consent checks:
Purpose | Description | Google tag behavior when Purpose is denied |
1 | Store and/or access information on a device |
ad_storage: denied ad_user_data: denied
|
3 | Create a personalised ads profile | ad_personalization: denied |
4 | Select personalized ads | ad_personalization: denied |
7 | Measure ad performance |
Disables the Google signals feature in Google Analytics. |
9 | Apply market research to generate audience insights | Disables the Google signals feature in Google Analytics. |
10 | Develop and improve products | Disables the Google signals feature in Google Analytics. |
Note: If your organization utilizes any Google products that require the analytics_storage
consent check (e.g. Google Analytics), you will need to perform additional steps. Expand the accordion below for more information.
Sourcepoint's preferred method of implementing Google Consent Mode 2.0 (i.e. the setting of the Use TCF to Enable Google Consent Mode 2.0 flag in Advanced Settings) does not cover the analytics_storage
consent check. In this section, we will use Google Analytics as an example to review the additional steps necessary to support analytics_storage
using gtag.js
.
- Implement default consent state for
analytics_storage
- Add Google products to vendor list
- Configure custom purpose for
analytics_storage
Implement default consent state for analytics_storage
Note: The consent checks and their default consent states implemented in the script is determined by the Google products operating on your property and any specific regionalized opt-in and opt-out jurisdictions you are targeting. You are responsible for making sure that default consent mode is set for each of your measurement products to match your organization's policy.
The default consent states represent the initial value (either denied or granted) for a consent check when a new end-user arrives to your property. These consent states are updated as an end-user makes their consent choices. In this section, we will cover how to implement the default consent state for the analytics_storage
consent check using an on-page script.
Google Consent Mode Documentation
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
//default behavior
gtag('consent', 'default', {
'analytics_storage': 'granted',
'wait_for_update': 500
});
//behavior specific for end-users in the EEA + UK
gtag('consent', 'default', {
'analytics_storage': 'denied',
'region': ['GB', 'BE', 'BG', 'CZ', 'DK', 'CY', 'LV', 'LT', 'LU', 'ES', 'FR', 'HR', 'IT', 'PL', 'PT', 'RO', 'SI', 'HU', 'MT', 'NL', 'AT', 'IS', 'LI', 'NO', 'SK', 'FI', 'SE', 'DE', 'EE', 'IE', 'EL'],
'wait_for_update': 500
});
</script>
Add Google product to vendor list
From the GDPR TCF vendor list associated with your property, add Google vendors that your organization works with (e.g. Google Analytics).
Configure a custom purpose for analytics_storage
Your organization will finally need to create a custom purpose in your GDPR TCF vendor list that maps to the analytics_storage
consent check used by the Google product(s) running on your property.
Google Analytics example
Google Analytics requires the following consent checks:
ad_storage
analytics_storage
You will need to create a custom purpose for analytics_storage
but you do not need to create a custom purpose for ad_storage
since that consent check will be set via the Use TCF to Enable Google Consent Mode 2.0 flag you configured earlier.
Click + Add Custom Purpose from the vendor list builder page. Use the provided modal to input a name for the custom purpose.
Use the Google Consent Mode Category dropdown menu and select analytics_storage
. Click Create purpose when finished.
As a best practice, Sourcepoint recommends that you describe the Google products that currently rely on the purpose.
Navigate to the newly created custom purpose and click the custom purpose name.
Use the provided description field to note the Google products utilizing the custom purpose as part of the Google Consent Mode integration. Click Apply changes when finished.
Set the legal basis for the custom purpose to User Consent.
Click Save to confirm the updates to your vendor list. Your Sourcepoint and Google Consent Mode 2.0 integration setup is complete.
As an alternative to the preferred method of implementing Google Consent Mode 2.0 using gtag.js on your property running a GDPR TCF campaign, your organization can perform the following:
- Implement default consent states on property
- Add Google product vendors to vendor list
- Configure custom purposes for Google Consent Mode 2.0
Implement default consent states on property
Note: The consent checks and their default consent states implemented in the script is determined by the Google products operating on your property and any specific regionalized opt-in and opt-out jurisdictions you are targeting. You are responsible for making sure that default consent mode is set for each of your measurement products to match your organization's policy.
The default consent states represent the initial value (either denied or granted) for a consent check when a new end-user arrives to your property. These consent states are updated as an end-user makes their consent choices. In this section we will cover how to implement the default consent state for various consent checks using an on-page script.
Google Consent Mode Documentation
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
//default behavior
gtag('consent', 'default', {
'ad_storage': 'granted',
'ad_user_data': 'granted',
'ad_personalization': 'granted',
'analytics_storage': 'granted',
'wait_for_update': 500
});
//behavior specific for end-users in the EEA + UK
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'region': ['GB', 'BE', 'BG', 'CZ', 'DK', 'CY', 'LV', 'LT', 'LU', 'ES', 'FR', 'HR', 'IT', 'PL', 'PT', 'RO', 'SI', 'HU', 'MT', 'NL', 'AT', 'IS', 'LI', 'NO', 'SK', 'FI', 'SE', 'DE', 'EE', 'IE', 'EL'],
'wait_for_update': 500
});
</script>
Add Google product vendors to vendor list
From the GDPR TCF vendor list associated with your property, add Google vendors that your organization works with (e.g. Google Advertising Products, Google Analytics, etc...).
Configure custom purposes for Google Consent Mode 2.0
Your organization will finally need to create custom purposes for your GDPR TCF vendor list that map to the consent checks used by the Google products running on your property.
Click + Add Custom Purpose from the vendor list builder page. Use the provided modal to input a name for the custom purpose.
Use the Google Consent Mode Category dropdown menu to select a consent type to which this custom purpose will map. Click Create purpose when finished.
As a best practice, Sourcepoint recommends that you describe the Google products that currently rely on the purpose.
Navigate to the newly created custom purpose and click the custom purpose name.
Use the provided description field to note the Google products utilizing the custom purpose as part of the Google Consent Mode integration. Click Apply changes when finished.
Set the legal basis for the custom purpose to User Consent.
Repeat as necessary for other consent types used by Google products on your property.
Click Save to confirm the updates to your vendor list. Your Sourcepoint and Google Consent Mode 2.0 integration setup is complete.
Debug default consent mode timing
Your organization can add the following code snippet to Sourcepoint's onConsentReady
event callback to check whether the default consent code is set before any other Google product is configured.
If any other Google product is configured before Google Consent Mode code is set then you will receive the following alert in your browser console: GCM not
being configured soon enough
.
onConsentReady: function (consentUUID, euconsent) {
console.log('[event] onConsentReady', arguments);
//Loop through all the dataLayer objects
for(var obj in dataLayer){
//initialize vars
gcm_conset_pos = -1;
gcm_config_pos = -1;
//mark when GCM is first set
if(dataLayer[obj][0]==='consent'){
console.log('GCM configured at position ' + obj + ' in the data layer');
if(dataLayer[obj][1]==='default'||dataLayer[obj][1]==='update'){
var gcm_conset_pos = obj;
}
}
//mark when the first Google product is configured
if(dataLayer[obj][0]==='config'){
console.log(dataLayer[obj][1] + ' configured')
var gcm_config_pos = obj;
console.log("breaking: ", (gcm_conset_pos - gcm_config_pos));
break;
}
}
//check if GCM is happening before any config is happening
if((gcm_conset_pos - gcm_config_pos)0){
console.log("GCM not being configured soon enough")
}
else{
console.log("GCM timing is okay")
}
}
Test integration
Regardless of how your organization has implemented Google Consent Mode 2.0 (either via Google Tag Manager or gtag.js
, using the preferred method or without the flag), you can test the setting of Google's consent checks via Google Tag Assistant.
Google Tag Assistant
Click Add Domain.
Use the provided modal to input your property's URL that is currently integrated with Sourcepoint's CMP and Google Consent Mode 2.0.
From an event, navigate to the output for your container/tag and select the Consent tab. From the subsequent table, you can discern the status of the Google consent checks and compare them to consented/rejected purposes in your privacy manager.
Comments
0 comments