PrivacyQuick

Platform guides

Cookie banner for Squarespace: options and setup

Squarespace has a built-in cookie banner that can hold back its own analytics cookies and some integrations until visitors accept. It doesn't block scripts you add through code injection, so those need a consent tool that does.

  • Plain English
  • Written for website owners
  • Free to read

To add a cookie banner to Squarespace, go to Website → Website Tools → Cookies & Visitor Data, turn on Cookie Banner and choose the banner type that lets visitors accept or decline. That built-in banner holds back Squarespace's own analytics cookies and some integrations until visitors accept. It doesn't control scripts you've added through code injection or code blocks, such as a Meta Pixel, a chat widget or a heatmap tool. For those, use a consent platform that blocks scripts, added through code injection.

Squarespace has moved these settings between versions, so the menu paths below may differ slightly on your site. Older sites often show them under Settings.

What Squarespace's built-in banner covers

Understanding the banner's reach is the key decision on Squarespace. Based on Squarespace's help center and Google's guide to setting up Squarespace for consent:

Source of cookiesControlled by the built-in banner?
Squarespace's necessary cookies (sessions, security, cart)No, and they don't need consent
Squarespace Analytics cookiesYes, with the accept/decline banner type
Google Analytics connected through Squarespace's built-in integrationYes, with the accept/decline banner type
Some third-party content, such as YouTube video blocksSome services are covered; check Squarespace's current list
Scripts added through code injection or code blocksNo
Tracking inside some blocks, such as audio blocksNot always; Squarespace lists exceptions

If your site only uses Squarespace's own tools and built-in integrations, the native banner may be all you need. If you've added third-party scripts, read on.

Option 1: set up the built-in banner

  1. Open Website → Website Tools → Cookies & Visitor Data.
  2. Switch on Cookie Banner.
  3. Under the banner type, choose Opt in and out. Labels may differ slightly in your version.
  4. Check the setting that disables analytics cookies until consent. Google's help article on Squarespace says that, with the opt in and out type, this toggle is locked on, so Squarespace Analytics and Google Analytics cookies wait for acceptance.
  5. Edit the banner text so it explains what you use cookies for and links to your cookie or privacy policy.
  6. Style the banner. Keep the decline button as visible as the accept button.
  7. Save, then test in a private window.

Which banner type to choose

Squarespace offers two banner types. The plain "opt in" type is essentially a notice: visitors can accept, but there's no real way to refuse. That doesn't meet the EU and UK standard of consent under GDPR Art. 4(11) and ePrivacy Directive Art. 5(3), which requires a free, specific and informed choice. Regulators also expect rejecting to be as easy as accepting. Our article on cookie banner dark patterns covers what regulators reject. If you have EU or UK visitors, use the accept-and-decline type.

The built-in banner only blocks what Squarespace knows about. Every script you paste into code injection, a code block or a page header runs immediately, whatever the visitor chooses.

Where custom code goes in Squarespace

Squarespace has three places for custom code. Each matters for consent:

  • Site-wide code injection: Website → Website Tools → Code Injection (older sites: Settings → Advanced → Code Injection). It has Header and Footer fields that apply to every page. Use the Header field for a consent banner.
  • Page header code injection: in a page's settings, under its Advanced tab. Code here applies only to that page.
  • Code blocks: blocks you add to page content, which can contain HTML and scripts.

Code injection isn't included in every Squarespace plan, and Squarespace has renamed its plans more than once. Check your plan's feature list before you start.

Find every script you've already added in these places. A cookie scan of your live site shows which third-party hosts load, which helps you trace scripts back to where they were pasted.

If your site has third-party scripts that must wait for consent, use a consent platform that blocks them. The setup on Squarespace:

Step 1: decide what to do with the built-in banner

Running two banners asks visitors twice and creates conflicting choices. Turn off Squarespace's Cookie Banner toggle when your external banner goes live. Then review the analytics cookie setting in the same panel. Squarespace's own analytics cookies are governed there, not by an external banner, so decide whether to disable them or accept that they follow Squarespace's setting.

If you use Google Analytics through Squarespace's built-in integration, consider removing it and adding GA through code injection instead, where your banner can control it.

Step 2: add the banner script

Open Code Injection and paste the snippet at the very top of the Header field, above any other scripts:

<script src="https://cdn.privacyquick.com/v1/privacy.js" data-site-id="pq_xxxxxxxxxx" async></script>

Save. Code injection runs on your live site, so test on the published URL rather than only in the editor.

Step 3: tag your other scripts

For each non-essential script in code injection, page headers or code blocks, change its type and add a category:

<!-- before -->
<script async src="https://static.example-heatmaps.com/tag.js"></script>

<!-- after -->
<script type="text/plain" data-category="analytics" async src="https://static.example-heatmaps.com/tag.js"></script>

For iframes in code blocks, such as a booking widget or a map, move the URL to data-src and add a data-category. The script blocking docs include ready-made examples for Google Analytics, the Meta Pixel and Hotjar. Our guide on blocking cookies before consent explains why prior blocking matters.

If you use Google Ads, or Google Analytics through code injection, Google expects Consent Mode signals from EEA and UK visitors. Consent Mode tells Google tags whether they may use storage, through the ad_storage, analytics_storage, ad_user_data and ad_personalization signals.

  • With Squarespace's built-in banner: Google's help article for Squarespace describes adding a consent default snippet in the code injection header, before the Google Ads tag. Follow Google's current version of those steps.
  • With an external banner: the banner should set the default and update the signals for you. PrivacyQuick sets all signals to denied before anything else runs and updates them when the visitor chooses. See the Google Consent Mode docs.

Our explainer on Google Consent Mode v2 covers the four signals in detail.

Let visitors change their mind

Consent must be as easy to withdraw as to give (GDPR Art. 7(3)). Squarespace's built-in banner and most external banners provide a way back in. With PrivacyQuick, a floating cookie button appears after the first choice. You can also add a link to your footer with a code block:

<a href="#" onclick="window.PrivacyQuick && PrivacyQuick.open(); return false;">Cookie settings</a>

Testing your setup

  1. Log out of Squarespace, or use a private window, and open your live site.
  2. Open DevTools before clicking anything. Check the Network tab for requests to analytics, ad and widget domains.
  3. Decline, then reload and browse. Only necessary requests should appear.
  4. Open the cookie settings and accept. The tagged scripts should load now.
  5. Check pages with their own header code or code blocks, not just the home page.

These are the issues that come up most often on Squarespace sites, and where to look first:

  • Two banners appear. Squarespace's Cookie Banner toggle is still on alongside your external banner. Switch one off.
  • The external banner doesn't appear at all. Check that your plan includes code injection, that the snippet is in the Header field rather than a code block on one page, and that you're testing the live site, not the editor.
  • A tracker still fires before consent. Look beyond site-wide code injection: page header code on individual pages, code blocks inside page content, blog post footers and product page extras are easy to forget. Built-in integrations configured in Squarespace's settings can also add tags you can't tag yourself.
  • Google tags receive conflicting consent signals. If you added a consent default snippet for Squarespace's built-in banner and later switched to an external banner that sets its own defaults, remove the old snippet so only one tool manages Consent Mode.
  • Embedded content stays blank after consent. Make sure each data-category matches a category your banner actually offers.

After any fix, run a fresh scan to confirm the result rather than relying on a single manual check.

  • You've chosen one banner: Squarespace's accept/decline banner, or an external one with the built-in banner off.
  • Every script in site-wide code injection, page headers and code blocks is accounted for and tagged if non-essential.
  • Google tags send Consent Mode signals for EEA and UK visitors.
  • Rejecting is as easy as accepting, and visitors can reopen their settings.
  • Your cookie policy lists what you found. PrivacyQuick's policy generator can embed a cookie table that updates from scans.
  • You've worked through the full GDPR cookie consent checklist.

Frequently asked questions

Where is the cookie banner setting in Squarespace?

In current versions it's under Website → Website Tools → Cookies & Visitor Data; older sites may show it under Settings → Cookies & Visitor Data. Turn on the Cookie Banner toggle and choose a banner type.

Which Squarespace banner type should I use for GDPR?

Use the type that lets visitors both accept and decline, labelled Opt in and out in recent versions. The other type is essentially a notice with an accept button, which doesn't give EU or UK visitors a real choice.

Does Squarespace's cookie banner block code injection scripts?

No. Squarespace's banner covers its own cookies and some built-in integrations, but scripts you add through code injection or code blocks run regardless unless you use a consent tool that blocks them.

Which Squarespace plans include code injection?

Code injection isn't available on every plan, and Squarespace has renamed its plans over time. Check the feature list for your current plan in Squarespace's pricing or billing pages before relying on it.

Check your own website in 30 seconds

Our free scanner lists every cookie and tracker your site sets, sorted into categories, before you add a banner.

Run a free cookie scan Start free

This guide is general information, not legal advice. Laws and regulator guidance change; check the current rules for your situation or ask a lawyer.