Framer cookie banner
Add a GDPR cookie banner to your Framer site
Framer sites navigate without full page reloads, so your consent script should load once in the <head> and stay alive. PrivacyPill is built for exactly that — one script, one banner, Consent Mode v2 included.
Updated 28 October 2026
Set it up in 5 steps
- 1Open Custom CodeIn your Framer project open Project Settings → Custom Code.
- 2Add a scriptClick Add Script (or +), name it 'PrivacyPill' and paste the snippet.
- 3Place it at the start of the head, on all pagesChoose the start of <head> and apply it to the whole site, not to selected pages.
- 4Run it onceSet it to run once rather than on every page visit, so client-side navigation doesn't create a second banner.
- 5Publish and test the live siteCustom code doesn't run in the canvas preview. Publish, then test the live URL — and remove any Framer Cookie Banner component so visitors see only one banner.
HTML · Framer custom code
<!-- 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.
Framer's analytics vs. your trackers
Framer says its built-in analytics don't collect personal data. Anything you add — Google Analytics, HubSpot, ads pixels, video embeds — needs consent. Google tags follow PrivacyPill's Consent Mode signals; for other scripts, add them with type="text/plain" and data-pp-category.
Frequently asked questions
Set up PrivacyPill on other platforms
See all- Shopify cookie bannertheme.liquid install + Customer Privacy API.
- Webflow cookie bannerPaste one line into Head code and publish.
- 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.
- 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.