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

  1. 1Open Custom CodeIn your Framer project open Project Settings → Custom Code.
  2. 2Add a scriptClick Add Script (or +), name it 'PrivacyPill' and paste the snippet.
  3. 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.
  4. 4Run it onceSet it to run once rather than on every page visit, so client-side navigation doesn't create a second banner.
  5. 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

Try it on your own site

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