Learn how to Set up your consent banner with a consent management platform or a content management system.
Step 1: Set up a consent banner
- Log into your CookieScript account to configure your banner. If you donât have a CookieScript account, youâll need to sign up before you can proceed.
- Be sure your banner complies with the requirements in the Google EU User Consent Policy (EUUCP).
For additional information on banner setup, review the CookieScript Cookie Banner Set-Up Guide.
Step 2: Set up consent mode
Set up using Google Tag Manager
- Open Google Google Tag Manager and navigate to your container.
- In âTagsâ, click New and name your tag.
- Click Tag Configuration, then click Discover more tag types in the Community Template Gallery. From the gallery, search for âCookieScriptâ, then install âCookieScript CMP (Consent Mode)â by CookieScript.
- In CookieScript, go to the CookieScript banner.
- Click Settings, then go to the âInstallationâ tab.
- Choose whether you want to show the banner to all users globally or only to users from specific countries.
- Select the âGoogle Tag Managerâ tab under âYour Codeâ, then click Copy script code.
- Paste the code into the âBanner code URLâ field in Tag Manager.
- Configure the default settings you would like to use under âDefault Consent Mode settingsâ.
- Add a row for global settings, and leave âRegionsâ blank. You can add additional rows for region-specific settings by using comma-separated ISO 3166-2 country codes in the âRegionâ box.
- Click Add, then click Triggering.
- Select âConsent Initialization - All Pagesâ, then click Save.
- Click Preview in the top right corner to test your container. View instructions for testing below.
- Publish your container.
Set up using another platform or directly from your websiteâs code
- Open CookieScript, then go to the CookieScript Banner.
- Click Settings, then go to the âInstallationâ tab.
- Choose whether you want to show the banner to all users globally or only to users from specific countries.
- Select the âScript Tagâ tab under âYour Codeâ, then click Copy script code.
- If you use a website builder, review their documentation to learn how to implement code in the
<head>tag of each page. Otherwise, continue to step 6. - In the
<head>tag of each page (review the instructions above if you use a website builder), paste the following code, followed by the CMP script you copied earlier at the very top of the<head>tag. Note that this step is critical in order to ensure the CMP functions properly.
<script>
// Define dataLayer and the gtag function.
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// IMPORTANT - DO NOT COPY/PASTE WITHOUT MODIFYING REGION LIST
// Set default consent for specific regions according to your requirements
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'regions':[<list of ISO 3166-2 region codes>]
});
// Set default consent for all other regions according to your requirements
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied'
});
</script>
<!--Banner script here!-->
How to test using Tag Assistant
Learn more about how to Troubleshoot consent mode with Tag Assistant.