Learn 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
Configure the Google Consent Mode settings within the Mandatly system to align with consent preferences and ensure proper data handling.
- Create your Mandatly account.
- Configure your banner using the “Add Website” wizard.
- Make sure your banner complies with the requirements in the Google EU User Consent Policy (EUUCP).
Learn more about Mandatly 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.
- From the gallery, search for “Mandatly”, then install “Mandatly CMP” by mandatly-inc.
- Make sure the “Enable Google Consent Mode” toggle is ON. Learn more About Google Consent Mode.
- Copy your website GUID from Mandatly CMP account and paste it in website guid field. Learn more about How to get website guid from Mandatly account.
- Depending on your specific requirements, set the Default Consent Settings regionally or globally.
- Configure the Other Settings such as Wait for update (milliseconds), Pass ad click information through URLs (url_passthrough), and Redact ads data (ads_data_redaction).
- 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 other platforms or directly editing website code
- Login to your Mandatly account, then go to Cookie Compliance > Websites.
- Select Domain URL from the list.
- Navigate to the “Integration” tab, copy the code snippet.
- Paste the code snippet into the
tag of each page.- If you use a website builder, review the integration documentation to find out how to implement code in the
tag of each page.
- If you use a website builder, review the integration documentation to find out how to implement code in the
- In the
tag of each page, paste the following code before your CMP code snippet.
// 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',
'functionality_storage': 'denied',
'personalization_storage': 'denied',
'security_storage': 'granted',
'regions':[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',
'functionality_storage': 'denied',
'personalization_storage': 'denied',
'security_storage': 'granted',
});