# 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.

Source: https://cookiequiet.com/platforms/squarespace
Published: 2026-10-20
Publisher: Cookiequiet

## Steps

1. **Open Code Injection** In 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.
2. **Paste the snippet in Header** Paste the Cookiequiet snippet at the top of the Header field and click Save. Squarespace injects it into the head of every page.
3. **Turn off Squarespace's banner** Open the Cookies & Data Privacy panel (under Settings, then Website; older sites call it Cookies & Visitor Data) and switch the Cookie banner toggle off.
4. **Restrict Squarespace's analytics cookies** In 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.
5. **Move Google Analytics to code injection** Remove 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.
6. **Mark the other tags** Give 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.
7. **Add the Cookie preferences link** Edit the footer and add a text link to #cq-preferences, or a Code block containing the link with data-cq-show-preferences. Save.
8. **Test with Reject all** Open 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](/platforms/google-analytics-4).
- **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](/platforms/meta-pixel).
- **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.

## How to add the Cookie preferences link

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](/guides/how-long-to-keep-consent-records) 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

### Can I add Cookiequiet on a Squarespace Basic plan?

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.

### Why is ss_cvr still set after Reject all?

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.

### Should I keep Squarespace's cookie banner on as well?

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.

### Can Google Analytics stay in Developer tools, then External API keys?

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.

## Sources

- [Squarespace Help: Customize parts of your site with code injection](https://support.squarespace.com/hc/en-us/articles/205815908-Using-code-injection)
- [Squarespace Help: The cookies Squarespace uses](https://support.squarespace.com/hc/en-us/articles/360001264507-The-cookies-Squarespace-uses)
- [Squarespace Help: Providing cookie consent options with a banner](https://support.squarespace.com/hc/en-us/articles/206545727-Providing-cookie-consent-options-with-a-banner)
- [Squarespace Help: Connect Google Analytics to your site](https://support.squarespace.com/hc/en-us/articles/205815608-Connect-Google-Analytics-to-your-site)
