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 at Lawwwing and configure your banner using their getting started wizard.
- Make sure your banner complies with the requirements in the Google EU User Consent Policy (EUUCP).
Learn more about Lawwwing 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 and install "Lawwwing CMP" by Lawwwing.
- In Lawwwing, navigate to "Installation", select the Google Tag Manager, and copy the ID generated for your site.
- Check the box labeled "Embed the Lawwwing SDK on your website from GTM" in Google Tag Manager and paste the ID from step 7 in the box labeled "Lawwwing ID".
- Set your preferred default settings under the "Set Google Consent Mode default status" section. Add a row for "Global settings" with the region field left blank, and include additional rows for region-specific settings by entering comma-separated ISO 3166-2 country codes in the "Region" box. For more information refer to this article.
- 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
- From your Lawwwing account, go to Installation.
- Choose the installation option most appropriate for you, and copy the required code.
- 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 3.
- 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 Lawwwing CMP CODE SNIPPET HERE -- >
<!-- It would look something like the snippet below -- >
<!--
<script src="https://cdn.lawwwing.com/widgets/current/<your-site-id>/cookie-widget.min.js" type="text/javascript" data-lwid="<your-site-id>"></script>
</script>
-->
How to test using Tag Assistant
Learn more about how to Troubleshoot consent mode with Tag Assistant.