Platforms

How to add a cookie consent banner to a Squarespace site

On Squarespace, paste the snippet in the Header field of Code Injection (open the Pages panel, click Custom Code at the bottom, then Code Injection), available on the Core, Plus and Advanced plans. Turn off Squarespace's own cookie banner under Cookies & Data Privacy and set Non-essential cookies to Restrict so Squarespace's analytics cookies stop; add your Google tag through code injection rather than the External API keys field.
Published 20 October 2026 · By the Cookiequiet team · Markdown

Steps

Open Code InjectionIn the site editor, open the Pages panel, click Custom Code at the bottom of the panel, then Code Injection. Code injection is available on the Core, Plus, Advanced and some legacy plans.
Paste the snippet in HeaderPaste the Cookiequiet snippet at the top of the Header field and click Save. Squarespace injects it into the head of every page.
Turn off Squarespace's bannerOpen the Cookies & Data Privacy panel (under Settings, then Website; older sites call it Cookies & Visitor Data) and switch the Cookie banner toggle off.
Restrict Squarespace's analytics cookiesIn the same panel, under Advanced Privacy settings, set Non-essential Cookies to Restrict and save. Squarespace then stops setting its ss_cvr, ss_cvt and related analytics cookies.
Move Google Analytics to code injectionRemove the Measurement ID from Developer tools, then External API keys, and paste the Google tag in the Header field below the snippet, marked with type="text/plain" and data-cq-category="analytics", or preceded by Google's default consent block.
Mark the other tagsGive the Meta Pixel and any chat or heat-map script pasted in the Header or Footer field the same marking with the right category. Replace src with data-cq-src on iframes in Code blocks.
Add the Cookie preferences linkEdit the footer and add a text link to #cq-preferences, or a Code block containing the link with data-cq-show-preferences. Save.
Test with Reject allOpen the site in a private window, click Reject all and check that no _ga, _fbp or ss_cvr cookie is set. Accept all, reload, and check the consent log.

Where to paste the snippet in Squarespace

Squarespace's code injection prints custom HTML on every page. In the site editor, open the Pages panel, click Custom Code at the bottom of the panel, then Code Injection. Paste the snippet at the top of the Header field and click Save:

html
<script src="https://cookiequiet.com/cq.js" data-site="YOUR_SITE_KEY" data-consent-mode="1" data-auto-block="1" defer></script>

Squarespace documents that the Header field is injected into the head of every page, and that code injection is available on the Core, Plus, Advanced and some legacy (Business and Commerce) plans. The Basic and Personal plans do not include it. Checkout pages do not run custom code.

Squarespace's own banner and analytics cookies

Squarespace ships its own cookie banner and its own analytics. Both need a setting change:

  1. Open the Cookies & Data Privacy panel (under Settings, then Website; older help articles call it Cookies & Visitor Data) and switch the Cookie banner toggle off, so visitors see one banner.
  2. Under Advanced Privacy settings, set Non-essential Cookies to Restrict and save.

The second step matters. Squarespace Analytics identifies visitors with its own cookies (ss_cid, ss_cpvisit, ss_cvr for two years; ss_cvisit, ss_cvt for 30 minutes). They are set by Squarespace's code, not by a tag you can mark, and Squarespace does not document any way for a third-party banner to switch them on after consent. With Restrict, Squarespace stops setting them for everyone; Squarespace Analytics then counts fewer visitors, which is the price of using an external banner on this platform. The necessary cookies (crumb, CART, Locked, _ssid, _dd_s) stay and belong under Necessary in your cookie table.

How to handle the tags Squarespace loads for you

  • Google Analytics. The Measurement ID entered under Developer tools, then External API keys is printed by Squarespace, and Squarespace ties its consent handling to its own banner only (its help article says to work with your provider if you use a third-party consent platform). Remove the ID there and paste the Google tag in the Header field below the snippet, marked with type="text/plain" data-cq-category="analytics", or preceded by Google's default consent block, as explained in the Google Analytics 4 guide.
  • Meta Pixel. Squarespace itself notes that its banner does not disable the Meta Pixel integration. Paste the pixel's base code in the Header field instead, marked data-cq-category="marketing", as in the Meta Pixel guide.
  • Footer field. Code in the Footer field is injected before the closing body tag, after the snippet: marking works there too.
  • Embeds. In a Code block or Embed block, write iframes with data-cq-src instead of src so the player waits for consent.

Edit the footer, add a text link labelled "Cookie preferences" and set its link to #cq-preferences; Squarespace keeps anchor links as they are. If your layout makes that awkward, add a Code block containing <a href="#cq-preferences" data-cq-show-preferences>Cookie preferences</a>, or turn on the floating preferences button in the banner settings.

How to test

  1. Open the site in a private window and click Reject all.
  2. Check the cookies in the developer tools: cq_consent, crumb and other necessary cookies; no _ga, no _fbp, and no ss_cvr if Restrict is on.
  3. Clear the cookies, click Accept all, reload: the marked tags run.
  4. Open the consent log in the Cookiequiet dashboard.

If the site editor becomes hard to use after adding code, Squarespace lets you disable custom code while editing; that does not affect visitors.

What is specific to Squarespace

  • Plan. Code injection needs Core or above (or a legacy Business or Commerce plan); on Basic or Personal, the snippet cannot be added.
  • Checkout. Custom code does not run on checkout pages, so the banner is not shown there; commerce cookies are necessary.
  • Squarespace Analytics. Expect fewer visitors in Squarespace's own reports once Non-essential cookies are restricted; the consent log and an analytics tag loaded after consent give you the real numbers.
  • Version 7.0 and 7.1 both use the same Code Injection panel.

Questions

No. Code injection is available on the Core, Plus, Advanced and some legacy Business and Commerce plans, as Squarespace documents. Basic and Personal plans cannot add scripts.
Squarespace sets its analytics cookies itself. Set Non-essential Cookies to Restrict under Advanced Privacy settings in the Cookies & Data Privacy panel; otherwise they are set regardless of the banner.
No. Turn its toggle off so visitors see one banner and one consent log. Squarespace's banner also cannot block the trackers you add through code injection, as its documentation states.
Not if it must wait for consent. Squarespace prints that tag itself and only its own banner controls it. Paste the Google tag in the Header code injection below Cookiequiet, marked or with Google's default consent block.

Put a quiet banner on your website today

Free for one website with every core feature, no card and no trial clock. Upgrade a website to Pro for $3 a month when you want the AI designer, no branding and the five-year consent log.