Squarespace cookie banner

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

  1. 1Check your planCode Injection is available on Core, Plus and Advanced plans (and legacy Business and Commerce plans) — not on Basic or legacy Personal.
  2. 2Open Code InjectionOpen your site's Code Injection panel (search 'Code Injection' in the Squarespace panel search).
  3. 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.
  4. 4Turn off the built-in bannerOpen Cookies & Data Privacy, switch Cookie banner off and save, so visitors only see one banner.
  5. 5Test the live siteOpen the published site in a private window, check the banner, and try reject and accept.
HTML · Squarespace code injection
<!-- 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

Try it on your own site

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