What is Google Consent Mode?
With Google Consent mode, you can change how Google tags behave based on the user's consent. This means all Google services on your site can run in a way that is compliant with the user's consent without the need to be fully disabled as before. Read more about it in Google's documentation.
Before:
1. All page view/statistics data would be disabled until statistics is opted in to
2. Adverts would be hidden until marketing is opted in to
This means that site owners miss out on a proportion of tracking data and advertising revenue.
With Google consent mode:
1. Aggregated/non-identifying statistics data is always collected
2. Adverts are always shown, but without user targeting
Previously, sites would miss out on page view tracking or advertising revenue for users who don’t opt into the statistics category. With Google consent mode, you will still get aggregated/non-identifying statistics for your site, meaning you won’t miss out on page view data while maintaining compliance.
1. Services adapt their work to comply with a user’s consent so they don’t have to be blocked completely.
“Consent mode allows you to adjust how your Google tags behave based on your users' consent status. You can indicate whether consent has been granted for analytics and marketing cookies. Google's tags will dynamically adapt, only utilizing cookies for the specified purposes when the user has given consent.”
1. User picks categories to opt into using our consent banner
2. We automatically pass these preferences to Google
3. Google uses this to determine how its tags are implemented
First, ensure you are using either Google Tag Manager or gtag.js to implement the Consent mode-compatible services you wish to control. Older tags, such as ga.js or analytics.js, must be updated to gtag.js or GTM first.
How to enable Google Consent Mode in CookieScan
- Login to the CookieScan portal.
- Find your subscription, click 'Manage Domains' for the appropriate subscription, and click 'Manage Domain' for the appropriate domain. Scroll down to the 'Banner Settings' to find the Google Consent Mode options.
- Ensure that the 'Enable Google Consent Mode' switch is turned on.
-
Optional
You can also show the Google Privacy Policy on your banner by selecting the checkbox labelled 'Show Google Privacy Policy'.
Integrating Google Consent Mode with CookieScan
Method 1: Implement using the CookieScan template for Google Tag Manager
Setting up the tag
- Add a new tag from the 'Tags' page in Google Tag Manager
-
Click on the below banner
-
Search for 'CookieScan'
-
Select the CookieScan template from the results and click 'Choose template'
-
You will be presented with the following screen to configure the template.
-
Find your CookieScan ID by going to the CookieScan portal, choosing 'Manage Domains' for the appropriate subscription, and choosing 'Manage Domain' for the appropriate domain. Scroll down to the 'Banner Settings' to find the 'CookieScan Id' field.
- Copy and Paste the Id into the CookieScan ID field in the CookieScan tag configuration.
Setting consent defaults
Leaving these settings blank will set the default consents as per the Google Consent Type mapping specified here.
-
To define your own consent defaults by choosing 'Add Region'
-
Set the region you intend to geo-target by entering the ISO-standardised ISO 3166-2 code for the consent settings you want to define. Leave this blank if you want the consent settings to apply to all regions.
-
Define the Consent Types you want to be granted or denied from the below list and entering them comma separated. You can find more information about the consent types at the bottom of this article.
- ad_storage
- ad_user_data
- ad_personalization
- analytics_storage
- functionality_storage
- personalization_storage
-
security_storage
e.g. ad_storage, ad_user_data, ad_personalization, analytics_storage, functionality_storage, personalization_storage, security_storage
-
The below configuration will set all consent types to Granted for Jersey. In all other regions, only security_storage will be set to Granted, with all other consent types being set to Denied. The consent settings with the most specific region will take effect as per the GTM docs.
Other Settings
-
Pass ad click information through URLs: URL passthrough enables the transmission of event and session-based analytics, including conversions, without using cookies, ensuring that important ad click data is maintained as users navigate your site. Read the Google documentation.
- Redact ads data: When enabled with Advertisement Cookies consent disabled, this feature removes advertising identifiers from outgoing requests and routes ad traffic through cookie-less domains. Read the Google documentation.
Configure the trigger
-
Click on the below section to choose a trigger
-
Choose 'Consent Initialization - All Pages'
- Click Save to add the CookieScan tag to your workspace.
Your banner has been configured! Don't forget to publish the changes from Tag Manager.
We recommend reading the section on configuring Tag Manager with additional consent checks.
Method 2: Configuring manually
Pre-requisites:
• Ensure you are using gtag.js to implement the Consent mode-compatible services you wish to control (at the time of writing, it supports Google Ads, Floodlight and Google Analytics). Older tags, such as ga.js or analytics.js, must be updated to gtag.js first.
• If you are using our GTM template, you do not need to follow the below steps. Our template will automatically set up consent mode for you.
Step 1: Add the consent mode script to your site's source
Paste the following code at the top of the Head section of your site, above the main Google Tag Manager or gtag.js implementation code and CookieScan script. Make sure that it is added to a layout-type page so that the script appears on every page of your site
Note: If you are using our GTM implementation of the banner, you do not need to do this step. Our GTM template will add it.
<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': 500
});
</script>
Step 2: Update GTM triggers
If you are already using CookieScan’s GTM Event Triggers to control your tags, you must change these to have a trigger of “All Pages”. This should only be done for tags compatible with Google Consent Mode.
Basic vs Advanced Consent Mode
Advanced Consent Mode
Specific tags (such as Google Ads, Analytics, Floodlight and Conversion Linker) have built-in consent checks. This means that these tags include logic that automatically changes the tag's behavior based on the user's consent state. No consent configuration is needed for this type of tags*.
Basic Consent Mode
Tags which do not have built-in consent checks, which do utilize tracking, must be configured with additional consent checks. Opposed to tags with built-in consent checks, which load regardless of consent, tags configured with additional consent checks will not fire unless consent has been given for the corresponding storage category.
Setting up additional consent checks with Google Tag Manager
By default, CookieScan will try to block cookies on your site automatically. However, not all cookies can always be blocked, depending on where and how they are generated. In order to ensure all Cookies are blocked, you can use Google Tag Manager to configure additional consent checks.
- In your GTM container, create the following Custom Event trigger, to be used in your GTM configuration:
Event Name: cookie_consent_update
Event Type: Custom Event
Fires On: All Custom Events
- Edit the consent settings for all tags that need to be configured with additional consent.
You can find these settings in the Tag Editor ❯ Advanced Settings ❯ Consent Settings.
Add all storage categories which the tag requires (see the scan report from Cookiebot if you are in doubt).
- To ensure the tag fires as soon as consent choices have been determined, either from a previous visit or from interaction with the banner the normal "All Pages" trigger will need to be replaced with the trigger which we created in the first step*.
See the Google Documentation for more information on configuring consent.
Google Consent Types
CookieScan maps all seven Google Consent Type's into 4 categories:
Google Consent Type | CookieScan Categories | Purpose |
ad_storage | marketing | To enable advertisement cookies. |
analytics_storage | statistics | To enable analytics cookies. |
functionality_storage | preference | To enable functional cookies for website functionality and settings. |
personalization_storage | preference | To enable functional cookies for user personalization. |
security_storage | necessary | To enable necessary cookies for website security and protection, user UI preferences, etc. Such cookies do not require consent. |
ad_user_data | marketing | To enable advertisement cookies to set consent for sending personal data to Google core platform service. |
ad_personalization | marketing | To enable advertisement cookies to use data for ad personalisation such as remarketing. |
Support
For any queries about configuring GCM or for help troubleshooting missing consent, please contact us at helpdesk@cookiescan.com in the first instance. Google support will not answer questions without you first contacting us.
Comments
0 comments
Please sign in to leave a comment.