Please note this feature is available for premium subscriptions only as multiple domain groups is a requirement for this to work. See more about our premium subscription here.
This feature allows you to run multiple configurations for the same domain without any extra costs if implemented correctly. Read carefully below!
Looking for a guide on how to setup your Cookiebot configurations for CCPA? You can find it here.
If you wish to display different banners, with different configurations to visitors from specific countries or regions, this guide will provide instructions to do so.
Please note that configuring geo regions in the script, as described in this article, will overwrite settings made for geo limitations in the distribution section of the platform.
Step 1: Configuring your domain groups
To configure support for multiple legislations for the same domain(s), additional domain groups are needed. These additional domain groups will serve as separate configurations in terms of banner template, behavior, functionality, styling and content.
No changes to your existing domain groups, or their configuration are required.
For each new country specific implementation of the banner you will create an additional domain group is required.
Important: No domains should be added to these domain groups!
Only the primary domain group should contain the domain. This is will be where scans, cookie classifications and reporting is maintained.
The subsequent domain groups you create should NOT have any domains added to them. If they are, you may be charged for additional scans.
Step 2: Implementing the configuration on your website
Copy the Cookiebot script tag from your primary domain group. You can find it in the Manager under "Your scripts". This will serve as a base for the custom script you are about to make.
It will look similar to this:
<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js"
data-cbid="00000000-0000-0000-0000-000000000000" data-blockingmode="auto"
type="text/javascript">
</script>
Copy this to a text editor, for instance Notepad on Windows or Notes on Mac. Edit the script to add a new attribute named "data-georegions" with the following value:
{'region':'REGION_ID','cbid':'YOUR_DOMAIN_GROUP_ID'}
The configuration consists of a region for the domain group configuration to be activated in and the domain group ID of the configuration you would like to use.
REGION_ID is the country code of the country you want the banner to display to, eg NL for The Netherlands, FR for France and so on - Please find a complete list of REGION_IDs in this article.
YOUR_DOMAIN_GROUP_ID is specific to the domain group with the banner you would want to display. Find the domain group ID under Your scripts, in the domain group you want to use in an alternative configuration.
EXAMPLE: Your script for multiple banners should end up looking similar to this (With your own domain group IDs inserted as cbid instead):
In this example the script is configured for an alternative banner to be displayed Californian visitors, using REGION_ID: US-06
<script
id="Cookiebot"
src="https://consent.cookiebot.com/uc.js"
data-cbid="00000000-0000-0000-0000-000000000000"
data-blockingmode="auto"
type="text/javascript"
data-georegions="{'region':'US-06','cbid':'11111111-1111-1111-1111-111111111111'}"
></script>
Notice the new addition to the script highlighted in bold.
Step 3: Adding the cookie declaration to your website
You will now take the script for the cookie declaration from your main domain group, just below the script for the banner - again find it under "Your scripts":
<script id="CookieDeclaration"
src="https://consent.cookiebot.com/00000000-0000-0000-0000-000000000000/cd.js"
type="text/javascript" async></script>
Edit this in the same manner as above by adding the data-georegions attribute with the regions and domain group IDs.
Your end result should be similar to this:
<script
id="CookieDeclaration"
src="https://consent.cookiebot.com/00000000-0000-0000-0000-000000000000/cd.js"
type="text/javascript" async
data-georegions="{'region':'US-06','cbid':'11111111-1111-1111-1111-111111111111'}"
></script>
Add multiple alternative configurations for different regions:
You can add more than one alternative banner or configuration by listing region and cbid pairs as comma-separated values inside a "data-georegions" attribute as shown here:
<script
id="Cookiebot"
src="https://consent.cookiebot.com/uc.js"
data-cbid="00000000-0000-0000-0000-000000000000"
data-blockingmode="auto"
type="text/javascript"
data-georegions="{'region':'US-06','cbid':'11111111-1111-1111-1111-111111111111'},{'region':'NL','cbid':'22222222-2222-2222-2222-222222222222'}"
></script>
You can also define groups of countries that use a specific banner, by specifying multiple country ISO codes, separated with commas:
<script
id="Cookiebot"
src="https://consent.cookiebot.com/uc.js"
data-cbid="00000000-0000-0000-0000-000000000000"
data-blockingmode="auto"
type="text/javascript"
data-georegions="{'region':'DE, DK, AT','cbid':'33333333-3333-3333-3333-333333333333'}">
</script>
You should use the same data-georegions settings on both the Cookiebot (uc.js) and the CookieDeclaration (cd.js) scripts to ensure they are consistent.
Comments
0 comments
Please sign in to leave a comment.