CookieAskInstall guides

Install CookieAsk on Squarespace

Templates and presets are not legal advice.

Squarespace lets you inject code into every page under Code Injection. This needs a Business plan or higher (a Squarespace requirement, not ours).

If you use Squarespace's built-in cookie banner, switch it off so visitors see one banner only. It is in the site's settings under Cookies & Visitor Data (the exact path differs between Squarespace versions and the banner can be on its own page).

2. Add the snippet

  1. In the Squarespace menu open Settings → Developer Tools → Code Injection (older versions: Settings → Advanced → Code Injection).
  2. Paste your snippet from the CookieAsk install page into the Header box. It is shown here with placeholders; use the one from your dashboard:
<script src="https://YOUR-LOADER-ORIGIN/l/YOUR-SITE-KEY.js" referrerpolicy="origin"
        data-cfasync="false" data-skip-moving="true" data-no-optimize="1" nowprocket></script>
  1. Put it at the top of the Header box, above any other code that is already there (analytics, pixels).
  2. Save. Squarespace shows the result on the live site only, not in the editor's preview.

Do not use the Footer box: scripts there run after the page's content and the tracking scripts in the header.

3. Check the order

Squarespace adds its own scripts to the page, and its injection point may put your header code after some of them. That is fine for Squarespace's own scripts, but not for tracking tags:

4. Per-page injection

Code Injection on a single page (Page settings → Advanced → Page Header Code Injection) runs only on that page. Use the site-wide Header box for CookieAsk, so every page, including blog posts and product pages, has the loader.

5. If you use a Content-Security-Policy

Squarespace does not let you set response headers, so no policy entries are needed.

Check it works