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).
1. Turn off Squarespace's own cookie banner
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
- In the Squarespace menu open Settings → Developer Tools → Code Injection (older versions: Settings → Advanced → Code Injection).
- 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>
- Put it at the top of the Header box, above any other code that is already there (analytics, pixels).
- 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:
- View the published page's source and find the CookieAsk tag in
<head>. - Make sure no tracking code (Google Analytics, a pixel) sits above it in the Header box.
- Squarespace's built-in analytics and its Marketing → Connected accounts integrations are added by Squarespace itself. Run the verification scan after you enable any of them and read what it lists.
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
- Open the live site in a private window: the banner appears.
- Answer it, and look at the Installation status card on the CookieAsk install page for the last consent event.