See more about our Premium subscriptions here.
The following guide describes how you can run multiple banner configurations for the same domain without additional costs. We recommend reading this guide carefully for a correct implementation.
Looking for a guide to setup your Cookiebot configuration for CCPA?
Check out our guide: Using Cookiebot CMP for CCPA/CPRA compliance
If you need to display separate banners to support different legislations for visitors from specific countries, states or regions, you can configure multiple domain groups for this purpose.
Please note that configuring geo regions as described in this article will override the geo limitations of the distribution settings of the banner.
Step 1: Configuring your domain groups
To configure support for multiple legislations for the same domain(s), additional domain groups are needed for each alternative banner configuration. These additional domain groups will serve as alternative configurations in terms of banner template, behavior, functionality, styling and content.
No changes to your existing domain groups or their configuration are required.
Do not add any domains to these Domain Groups!
Only the primary Domain Group should contain the domain. This is where the consent log, scans, cookie classifications and reporting are maintained.
If the domain is added to any of the additional Domain Groups, you will be charged for additional scans of the same domain.
Step 2: Implementing the configuration on your website
Copy the Cookiebot script tag from your primary Domain Group. You can find it in the Admin Interface under "Script Embeds".
This will serve as a base for the customized script tag you are about to make.
It should 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:
data-georegions="{'region':'REGION_ID','cbid':'YOUR_DOMAIN_GROUP_ID'}"The configuration consists of two parts:
- The region to which the domain group configuration is to be applied.
- The Domain Group id (cbid) corresponding to the Domain Group that has the configuration which needs to be applied for visitors in this region.
REGION_ID is the ISO 3166-1 alpha-2 code of the country you want the banner to display to. For example "nl" for the Netherlands, "fr" for France, and so on.
You can find a complete list of country codes 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 on the Domain Groups overview, on the line with the Domain Group you want to use in an alternative configuration.
In this example, the script is configured for an alternative banner to be displayed to Californian visitors, using REGION_ID: "US-06".
Your script for multiple banners should end up looking similar to this (using your own Domain Group IDs instead):
<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 edit the script tag for the Cookie Declaration from your primary Domain Group, which you can find just below the Cookiebot (banner) script—again find it on the "Your scripts" tab in the Manager:
<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 way 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>
Adding multiple alternative configurations for different regions:
You can add more than one alternative banner or configuration by listing region and Domain Group ID pairs as comma-separated values inside the 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 by 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 geo regions settings on both the Cookiebot (uc.js) and the CookieDeclaration (cd.js) scripts to ensure they are consistent.
Comments
1 comment
Great Post
Please sign in to leave a comment.