Add a GDPR cookie banner to Squarespace
Squarespace's built-in banner is a notice; PrivacyPill adds real choices — accept, reject or customise by category — and sets Google Consent Mode v2 for your Google tags. It takes one paste into Code Injection.
Updated 28 October 2026
Set it up in 5 steps
- 1Check your planCode Injection is available on Core, Plus and Advanced plans (and legacy Business and Commerce plans) — not on Basic or legacy Personal.
- 2Open Code InjectionOpen your site's Code Injection panel (search 'Code Injection' in the Squarespace panel search).
- 3Paste the embed in HeaderPaste the snippet at the very beginning of the Header field, above any analytics or ads code, and click Save. Don't use page-level injection or a Code block.
- 4Turn off the built-in bannerOpen Cookies & Data Privacy, switch Cookie banner off and save, so visitors only see one banner.
- 5Test the live siteOpen the published site in a private window, check the banner, and try reject and accept.
<!-- 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.
Squarespace's own analytics
Squarespace's own analytics and native integrations are separate from the code you inject — PrivacyPill can't switch them on or off. Keep Squarespace's cookie restrictions for its non-essential cookies, or turn off native tracking integrations you don't need and add those tools via Code Injection with data-pp-category instead.
Checkout pages
Squarespace doesn't allow custom code on checkout pages, so the banner won't show there. Visitors normally reach checkout after seeing it on your site, and their choice is remembered.
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.
- 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.