How to connect Finsweet Cookie Consent to Google Consent Mode V2
Legal
Tips & Tricks
by Corbinian Buchberger
Key takeaways
Finsweet Cookie Consent V1 does not block analytics by default, so it is not GDPR compliant without extra setup.
Google Consent Mode V2 requires a deny by default state before any tag loads.
You need the default consent script both in the site head and in a GTM Consent Initialization tag.
Finsweet must run in opt in mode so analytics and marketing are off until the user chooses.
A small bridge script is required to translate Finsweet categories into Google consent signals.
GA4 and Microsoft Clarity must be set to require analytics_storage inside GTM.
GTM will automatically block or allow tags based on the updated consent signals.
The script order in the head matters: default consent script → GTM → Finsweet → bridge script.
You should test the setup in GTM Preview Mode to confirm that GA4 and Clarity fire only after consent.
This setup makes Finsweet Cookie Consent V1 fully compatible with Consent Mode V2 and GDPR expectations.
If your business operates in the EU, or you have EU customers, and you are still using Finsweet’s default cookie consent, your site may not be GDPR compliant. Many setups let analytics and tracking run before a user actually gives consent. That risks fines and it also pollutes your data with non-consenting users.
This guide shows the exact, copy-paste steps to fix that. You will get a small bridge script to add to your site head, the precise GTM changes for GA4 and Microsoft Clarity, and a short testing checklist. Follow these steps, and your site will only run analytics after a user explicitly opts in, keeping you compliant and keeping your analytics accurate.
Ready? Let’s begin
Why this matters
Before we set this up, first let’s understand why you even need this. If your business is in the EU or you have EU customers, getting consent wrong is both a legal and a business risk.
Bad data. When trackers run before users opt in, your GA4 data includes people who never agreed. That skews conversion rates, funnels, and A/B test results, and makes decisions based on that data riskier.
User trust. People expect control over their data. A clear, working consent flow reduces complaints, lowers support overhead, and helps keep customers confident using your product.
Ad vendors and integrations. Some ad and personalization tools require separate consent flags. If those flags are wrong, you either block needed functionality or collect data you should not.
Auditability. Keeping a clean, auditable consent record makes it easier to show regulators and stakeholders who consented, when, and what they accepted. That is often the fastest way to resolve questions and complaints.
What you need before you start
Quick checklist. Make sure you have these in place before you touch code or GTM.
Finsweet Cookie Consent is installed, and the cookie banner works on the site.
Access to edit the site head so you can add the bridge script and FsCC attributes.
A Google Tag Manager container for the site and permission to publish changes.
A GA4 property and measurement ID, or an existing GA4 Configuration tag in GTM.
Microsoft Clarity account or any other analytics tags you plan to gate behind consent.
A test plan: an incognito browser or a way to clear site cookies and storage for testing.
Quick checks to run now (paste into browser console on the live page)
// see if any consent updates already pushed console.log((window.dataLayer||[]).slice(-30).filter(d => Array.isArray(d) && d[0]==='consent'));
If any of the first two return false, pause and fix that before moving on.
How it works
Before we jump into the technical steps, it helps to understand the flow. Consent Mode V2 basically works like a signal chain. A user makes a choice in the cookie banner, Finsweet stores that choice, and a small bridge script translates it into the Google Consent Mode format that GTM understands.
Here’s the flow -
1. The user sees the cookie banner
The Finsweet Cookie Consent banner shows categories like Essential, Analytics, Marketing, and Personalization. The user accepts all cookies or customizes their preferences.
2. Finsweet stores the user’s preferences
FsCC saves the selected choices in its internal store. Whenever a user accepts cookies or updates preferences, FsCC emits events such as:
updateconsents
fscc:consentsUpdated
These events tell the rest of the page that consent has changed.
3. The bridge script listens and updates Google Consent Mode
The small bridge script you add in your site head watches Finsweet’s consent store. Whenever FsCC updates, the script translates those choices into the correct Consent Mode keys and pushes them into the dataLayer like this:
['consent', 'update', { analytics_storage: 'granted' or 'denied', ad_storage: 'granted' or 'denied', ad_user_data: 'granted' or 'denied', ad_personalization: 'granted' or 'denied', personalization_storage: 'granted' or 'denied', functionality_storage: 'granted', security_storage: 'granted' }]
This is what tells GTM exactly what the user allowed.
4. GTM updates its internal consent state
Google Tag Manager listens for the consent update event automatically. After receiving it, GTM updates its internal Consent Mode state.
Tags that depend on consent will only fire when the required signals are granted:
GA4 requires analytics_storage: granted
Microsoft Clarity requires analytics_storage: granted
Ad platforms require ad_storage, ad_user_data, and ad_personalization
This ensures no tracking runs unless the user has clearly opted in.
5. Category mapping at a glance
To make everything predictable, we use this consistent mapping:
Finsweet Category
Consent Mode Key
Analytics
analytics_storage
Marketing
ad_storage, ad_user_data, ad_personalization
Personalization
personalization_storage
Essential
security_storage
(Functionality cookies)
functionality_storage (always set to granted)
This is the mapping that gives you a clean, GDPR friendly setup.
6. Why script order matters
Consent Mode V2 depends heavily on the correct loading order. Use this order for a reliable setup:
Default deny script (must run before GTM)
Google Tag Manager script
Finsweet Cookie Consent script (opt-in mode)
Bridge script (immediately under Finsweet)
This ensures:
Cookies start in “denied” mode
GTM loads in the correct consent state
Finsweet updates get passed instantly
No tag fires before consent is granted
Setting up GA4 in Google Tag Manager
Let’s set up GA4 so it only runs when a user has allowed analytics cookies.
GA4 needs to be gated behind the analytics_storage consent type. Google Consent Mode V2 requires this, and our bridge script will update this consent flag based on the user’s choices in the Finsweet banner.
Steps to set up GA4
In Google Tag Manager, go to Tags > New.
Name your tag GA4 – Configuration.
Choose Google Analytics: GA4 Configuration as the tag type.
Paste your Measurement ID (G-XXXXXXXX).
Open Consent Settings.
Enable “Require additional consent for this tag.”
Select analytics_storage.
Leave ad_storage unchecked unless you actually use Google Ads.
Scroll down to Triggering and add:
Page View (All Pages)
Save the tag.
This setup ensures GA4 runs only when analytics consent is granted.
Setting up Microsoft Clarity in Google Tag Manager
Clarity counts as analytics, so it also needs to respect the analytics_storage consent flag. The setup is almost identical to GA4, whether you use a built-in Clarity template or a Custom HTML tag.
Steps to set up Clarity (template method)
Go to Tags > New.
Choose the Microsoft Clarity tag template (if available).
Open Consent Settings and require analytics_storage.
Add Page View in Triggering.
Save the tag.
This ensures Clarity only loads when analytics consent is granted, and that it starts tracking immediately when a user opts in.
Setting up the Consent Initialization tag in Google Tag Manager
Before connecting Finsweet to Consent Mode, you must set a default consent state inside Google Tag Manager. Google requires this for Consent Mode V2. This ensures GTM blocks all analytics and marketing tags until the user gives permission.
Go to GTM → Tags → New
Name it Consent – Default (Initialization)
Tag Type: Custom HTML
Paste the default consent code:
<script> window.dataLayer = window.dataLayer || []; function gtag(){ dataLayer.push(arguments); }
Under Triggering, choose: Consent Initialization – All Pages
Save.
This tag must fire before everything else inside GTM. Combined with the head script, it ensures analytics is fully blocked until real consent is granted.
Connecting Finsweet Cookie Consent to Google Consent Mode V2
This is where your cookie banner begins controlling your analytics tags. With this setup, GA4, Microsoft Clarity, and any other marketing tools stay disabled until the user explicitly opts in.
Follow these steps in the exact order.
Step 1: Add the “deny by default” Consent Mode script to your site head
This must be the FIRST script in your head, placed above GTM.
<script> window.dataLayer = window.dataLayer || []; function gtag(){ dataLayer.push(arguments); }
This ensures analytics and ads remain completely blocked until consent is granted.
Step 2: Add Google Tag Manager right under the default consent script
Right under the script above, add your GTM container:
<!-- 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-XXXXXXX'); </script> <!-- End Google Tag Manager -->
Then add the noscript version right after your opening <body> tag:
Everything else (GA4, Clarity, marketing tags) must fire on Page View.
Step 6: Publish your site
Once published, the system works automatically:
Default = denied
User accepts cookies
Finsweet updates its store
Bridge sends consent updates to the dataLayer
GTM updates its internal consent state
GA4 + Clarity fire only when allowed
Testing your setup
Before calling your setup complete, run through this quick testing checklist. It confirms that Consent Mode is blocking analytics by default and only allowing them once the user opts in.
Follow these steps in order.
1. Open your site in an incognito window
This ensures you start with no stored cookies and no previous consent state.
2. Open GTM Preview Mode
Go to Tag Manager
Click Preview
Enter your site URL
Click Connect
A debug panel will appear.
3. Check that GA4 and Clarity do NOT fire on page load
In the debug panel:
Look at the Tags Fired list
GA4 Configuration should not fire
Microsoft Clarity should not fire
Only the Consent – Default (Initialization) tag should fire at the start
This confirms the deny-by-default script is working.
4. Accept cookies on the banner
Click Accept All in the Finsweet cookie banner.
Within one second, you should see:
A new consent update event inside the GTM Preview panel
GA4 firing
Clarity firing
Marketing tags firing (if you have any)
If analytics still doesn’t fire after accepting, something is wrong in the mapping or tag settings.
5. Inspect the dataLayer manually (optional but useful)
This confirms the bridge is correctly passing signals to GTM.
6. Reject cookies and reload
Reload the page, clear the cookies from browser settings, and confirm:
Reconnect the preview mode and connect your site.
Reject the cookie this time, and check the tag assistant again.
GA4 does not fire
Clarity does not fire
Marketing tags do not fire
Only the Consent Initialization tag fires
This confirms the system respects opt-out behavior.
Your site is now fully GDPR friendly, cleanly connected, and consistent across all future projects.
Conclusion
Getting a cookie banner to actually control your analytics is one of those things that sounds simple but rarely works out of the box. If your business operates in the EU or serves EU customers, you need to make sure analytics scripts do not fire until users give explicit permission.
With this setup, your Finsweet Cookie Consent banner sends real consent signals into Google Tag Manager. GA4, Microsoft Clarity, and any other tracking tags will stay fully blocked until the correct consent is granted, and will start running the moment a user opts in. Your site becomes GDPR friendly, and your analytics stay clean and trustworthy.
This setup is also reliable across projects. Once you understand the flow, you can reuse the same structure for any site that uses Finsweet’s cookie banner and GTM.
And if you need help building a GDPR compliant website in Webflow, our team can support you with a clean, privacy first setup. Book a call and we will walk you through the best approach for your project.
FAQ
Google Consent Mode V2 is a framework that lets your website adjust how Google tags behave based on user consent. If a user rejects analytics, GA4 will not store cookies. If they accept analytics, GA4 behaves normally. This helps you stay GDPR compliant without breaking your analytics setup.
Not natively. Finsweet collects user preferences, but it does not send them to Google Tag Manager on its own. You need a small bridge script to translate Finsweet choices into Consent Mode updates, which is exactly what we implemented in this guide
GTM expects consent signals in Google’s own format, such as analytics_storage and ad_storage. Finsweet uses different category names. The bridge reads Finsweet’s categories and sends them to GTM in the correct format so GA4 and Clarity only run when allowed.
At the very top of your head tag. It must load before GTM, before Finsweet, and before the bridge. This ensures all tracking is blocked by default, which is required for GDPR.
No. Putting it inside GTM creates a race condition because GTM loads after the page starts rendering. The bridge needs to load in the site head so it can update consent before GTM tries to fire any tags.
Yes. GA4 will only run when analytics_storage is set to granted. Until then, GA4 will not fire any events, store cookies, or collect user data.
Yes. As long as you set Clarity’s GTM tag to require analytics_storage, it will behave just like GA4. Clarity will not track the session until a user accepts analytics cookies.
Finsweet updates its consent internally. The bridge script listens for this and sends a fresh update to GTM. GTM then adjusts which tags are allowed to run. Everything updates in real time.
Keep Finsweet. You only need to add the Consent Mode default script, ensure GTM is placed correctly, and add the bridge script directly under Finsweet. After that, your existing banner becomes GDPR friendly.
Yes. This setup is reusable across any Webflow site that uses Finsweet Cookie Consent and Google Tag Manager. Just update the GTM Container ID, GA4 Measurement ID, and Clarity Project ID.
No. All logic happens behind the scenes. Your banner’s UI stays the same. You are only connecting it to Consent Mode so that analytics tags behave correctly.
You can extend the same setup. Any tag that requires user consent should be configured inside GTM to require the correct consent type, such as ad_storage or ad_personalization. GTM handles the gating once the consent signals are in place.