Webflow integration

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

  1. 1Design your bannerPick a layout, set colours, radius and font in the customizer. 'Inherit from your site' uses your Webflow typography.
  2. 2Save to your domainUse your custom domain (not the .webflow.io staging domain) when you create the site.
  3. 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.
  4. 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.
  5. 5Publish and testCustom code doesn't run in the Designer. Publish, then open the live site in a private window.
html · Webflow
<!-- 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

Try it on your own site

Design your banner, preview it live, and paste one line. Free for one domain.