The best and easiest way to control cookies on your Webflow website is to make use of Google Tag Manager to conditionally load your scripts.
To do this, you'll need a Google Tag Manager account, which you can create for free at https://tagmanager.google.com/ if you don't have one already.
Once you have your Google Tag Manager account, you can use it to both implement Cookiebot CMP and to configure tags to require consent.
You can read how to implement Cookiebot CMP and how to make tags consent aware in our Google Tag Manager implementation guide.
When you're done you need to add the Google Tag Manager snippet to your Webflow website.
To do this, scroll down to the "Advanced" section of the left-hand menu and click the "Embed" button:
Add the Google Tag Manager snippet:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');</script>
<!-- End Google Tag Manager -->
Keep in mind that you must replace "GTM-XXXXXX" with your own Google Tag Manager Container ID.
If you exclusively use Google Tag Manager to load 3rd party scripts and remember to configure them to require "additional consent" not cookies should be set without prior consent.
Comments
0 comments
Please sign in to leave a comment.