To implement a GDPR-compliant Cookie Consent in Webflow using Finsweet's Cookie Consent tool (by Joe Krug), here’s a step-by-step process based on the official tutorial and UK GDPR requirements.
1. Understand the Requirements
- UK GDPR still requires prior consent before setting non-essential cookies (e.g., tracking scripts, analytics).
- Only essential cookies (like cookie banner functionality) can be loaded by default.
- User must be able to accept, reject, or manage cookie types.
- Cookie preferences must be recorded and honored until changed.
2. Prepare Your Webflow Project
- Ensure all third-party scripts (e.g., Google Analytics, Facebook Pixel) are added via Embed elements or Script tags under Project Settings → Custom Code, but do not activate them immediately.
- You will wrap or conditionally load these scripts using Finsweet’s attributes.
3. Add Finsweet Attributes via CDN
Go to https://finsweet.com/cookie-consent/ and scroll to the Quick Start section.
Copy the provided script URL (CDN) and paste it into your Webflow project settings under Site Settings → Custom Code → Footer.
Example:
<script src="https://cdn.finsweet.com/cookieconsent/v2/cookieconsent.js"></script>
4. Design Your Cookie Consent UI
- You can build your own banner, modal, or pop-up in Webflow.
- Add buttons like Accept All, Reject All, and possibly a Preferences option.
- Assign Finsweet-specific attributes to these buttons:
- fs-cc="accept" activates all consented cookies
- fs-cc="deny" declines non-essential cookies
- fs-cc="open-preferences" opens a full preferences panel (optional)
5. Assign Categories and Manage Scripts
Group your cookies/scripts into categories like:
Essential
Analytics
Marketing
When embedding third-party scripts, wrap them with attributes:
Add a <div>
with fs-cc-category="analytics" or fs-cc-category="marketing"
Nest your analytics script inside that div
This ensures scripts load only after consent is given.
6. Adjust Behavior for UK GDPR Compliance
- Change default behavior to do not activate cookies until consent is given.
- In your initialization script (can go in Footer code):
- Use the configuration option:
waitForConsent: true
→ Ensures nothing loads until the user consents.
- Example config snippet (already included in Finsweet setup, just ensure this option is set):
fsCookieConsent.init({ waitForConsent: true })
7. Test the Setup
- Publish your Webflow site to staging or custom domain.
- Access the site in a private/incognito window.
- Ensure:
- Cookie banner appears on first load.
- No non-essential cookies/scripts load before consent.
- Accepting or rejecting updates cookie behavior accordingly.
- User can revisit and update preferences.
8. Optional: Add Consent Logging (for Audits)
- Finsweet does not natively store user consent logs.
- If required for compliance, consider adding a third-party integration like Cookiebot or CookieYes, or build a custom solution using Webflow Forms + Make/Zapier.
Summary
To ensure your cookie consent is UK GDPR-compliant using Finsweet, implement their script with waitForConsent enabled, group all optional cookies with the correct fs-cc-category attributes, and build a UI that clearly allows users to accept, reject, or manage their cookie preferences. Always disable non-essential cookies by default and test functionality before publishing.