Learn more about how to Set up your consent banner with a consent management platform or a content management system.
Step 1 of 2: Set up a consent banner
- Sign up for an UniConsent account and configure your banner using the getting started wizard.
- This process helps ensure that your banner complies with the requirements in the Google EU User Consent Policy (EUUCP).
Learn more about UniConsent banner setup.
Step 2 of 2: Set up consent mode
Set up using Google Tag Manager
- Open Google Tag Manager and navigate to your container.
- In “Tags”, select New and name the tag.
- Select Tag Configuration > Discover more tag types in the Community Template Gallery.
- Search for “UniConsent CMP” in the gallery and install “UniConsent CMP” by Transfon.
- Enter the “UniConsent License ID” for the website in your UniConsent account.
- Under “Default Consent Mode settings”, configure the default settings you would like to use .
- Add a row for global settings and leave the “Region” field blank.
- You can add additional rows for region-specific settings by using comma-separated ISO 3166-2 country codes in the “Region” field.
- Select Add > Triggering.
- Select Consent Initialization - All Pages.
- Select Save.
- Test your container by selecting Preview in the top right corner.
- Publish your container.
Set up using another platform or directly from your website’s code
- Open UniConsent and log in,
- Go to the projects list, and click Install.
- Next, navigate to the “Install & Setup” tab and locate the “Install the tag on your website” section to find the CMP code snippet.
- If you use a website builder, review their documentation to find out how to implement code in the
<head>
tag of each page. Otherwise, skip to step three.
- If you use a website builder, review their documentation to find out how to implement code in the
- In the
<head>
tag of each page, paste the following code followed by the CMP script you copied in step 1 at the very top of the<head>
tag. If you're using a website builder, refer to step 2.
<script>
// Define dataLayer and the gtag function.
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// 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>
<!-- PASTE YOUR UniConsent CMP CODE SNIPPET HERE -- >
How to test using Tag Assistant
Learn more about how to Troubleshoot consent mode with Tag Assistant.