Cookie consent for Webflow, designed like the rest of your site
Webflow sites are built by people who care about design. Generic cookie banners stick out. With PrivacyPill you style the banner in a visual editor, paste one line into Site settings → Custom code, and publish — Consent Mode v2 and script blocking included.
Updated 1 October 2026
Set it up in 5 steps
- 1Design your bannerPick a layout, set colours, radius and font in the customizer. 'Inherit from your site' uses your Webflow typography.
- 2Save to your domainUse your custom domain (not the .webflow.io staging domain) when you create the site.
- 3Paste into Head codeSite settings → Custom code → Head code. Put the PrivacyPill snippet at the very top. Custom code needs a paid Webflow site plan.
- 4Move integrations into custom codeGoogle Analytics added in Webflow's Integrations tab loads outside your control. Add it via custom code instead, or rely on Consent Mode for Google tags.
- 5Publish and testCustom code doesn't run in the Designer. Publish, then open the live site in a private window.
<!-- PrivacyPill: keep this first in <head>, before Google Tag Manager or analytics -->
<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}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',wait_for_update:500});</script>
<script src="https://privacy-pill-consent-studio.lovable.app/api/public/v1/pp.js?site=pp_your_site_key"></script>Replace pp_your_site_key with your site key — you'll get it when you save your banner.
Add a 'Cookie settings' link to your footer
Withdrawing consent must be as easy as giving it. Besides the floating settings button, you can add a link in your Webflow footer: give a link element the custom attribute onclick with the value PrivacyPill.open(); return false; — or use a small embed element with a button that calls PrivacyPill.open().
Blocking embeds like YouTube or Vimeo
Use an Embed element instead of Webflow's video component when you need prior blocking: write the iframe with data-pp-category="functional" and data-pp-src instead of src. PrivacyPill loads it as soon as the visitor allows functional cookies.
Staging vs. production
Your site key is tied to a domain and its subdomains. If you want the banner on yourproject.webflow.io for testing, add that domain as a separate site on a free or Pro plan.
Frequently asked questions
Set up PrivacyPill on other platforms
See all- Shopify cookie bannertheme.liquid install + Customer Privacy API.
- WordPress cookie bannerWPCode or functions.php, classic and block themes.
- Wix cookie bannerSettings → Custom Code → Head, all pages.
- Squarespace cookie bannerCode Injection → Header on Core plans and up.
- Framer cookie bannerProject Settings → Custom Code, start of head.
- Lovable cookie bannerOne prompt to the Lovable agent, or one tag.
- Bolt cookie bannerOne prompt to the Bolt agent, then publish.
- v0 cookie bannernext/script in the root layout, publish to Vercel.
- Next.js cookie bannernext/script beforeInteractive in the root layout.
- Ghost cookie bannerSettings → Code Injection → Site header.
- HubSpot cookie bannerSite header HTML + setHubSpotConsent sync.
Try it on your own site
Design your banner, preview it live, and paste one line. Free for one domain.