Squarespace Integration
Add a cookie consent banner to your Squarespace site using Code Injection in the Advanced settings
Squarespace Integration
CookieFrame integrates with Squarespace through the Code Injection feature in Advanced settings. You paste a single script tag into the header injection field — no plugins or custom development required.
Prerequisites
Before you begin, make sure you have:
- A CookieFrame account with your domain added
- A Squarespace site on a Business, Commerce Basic, or Commerce Advanced plan — Code Injection is not available on Personal plans
- Your 8-character Domain ID from the CookieFrame Dashboard
Code Injection is a Squarespace feature available on Business-tier plans and above. If you are on a Personal plan, you will need to upgrade before you can add custom scripts.
Finding Your Domain ID
- Log in to your CookieFrame Dashboard
- Select your domain from the list
- Go to Settings → Integration
- Your Domain ID is shown at the top (8 uppercase characters, e.g.,
A1B2C3D4)
Installation
Step 1 — Open Advanced Settings
In your Squarespace admin panel, go to Settings → Advanced → Code Injection.
Step 2 — Add the Script to the Header
In the Header field, paste the CookieFrame script tag:
<script src="https://cookieframe.com/api/widget/YOUR_DOMAIN_ID/script.js" async></script>Replace YOUR_DOMAIN_ID with your 8-character Domain ID from the CookieFrame Dashboard.
Place this script before any other tracking scripts in the Header field. This ensures CookieFrame establishes consent before analytics or marketing scripts run.
The script is lightweight (~23KB gzipped) and is served through Cloudflare's CDN, so the async attribute is recommended.
Step 3 — Save
Click Save at the top of the Code Injection page. The script is now injected into every page of your site.
Verification
- Open your Squarespace site in an incognito / private window (to start without existing consent)
- The CookieFrame consent banner should appear on the first visit
- Open browser DevTools → Console and look for
[CookieFrame]log messages to confirm the widget loaded - Accept or reject cookies and verify that your choice is respected on subsequent visits
Cookie Preferences Link
GDPR requires you to let visitors change their cookie preferences at any time. Add a Cookie Preferences link to your Squarespace footer or privacy page.
In Squarespace, add a Code Block to your footer or page and paste:
<a href="#" data-cookieframe="preferences">Cookie Preferences</a>CookieFrame automatically attaches the click handler — no JavaScript needed. You can also add this inline in the Footer Code Injection field if you prefer to keep all custom code in one place.
Troubleshooting
Banner does not appear
- Confirm you clicked Save after adding the script in Code Injection
- Verify the Domain ID is exactly 8 characters and uppercase
- Check that the domain in CookieFrame matches your Squarespace site URL
- Open browser DevTools → Console and check for errors starting with
[CookieFrame] - Clear your browser cache and test in a fresh incognito window
"Code Injection not available" message
Code Injection requires a Business plan or higher. Check your Squarespace plan under Account → Billing.
Scripts still fire before consent
Place the CookieFrame <script> tag at the top of the Header Code Injection field, before any other scripts. If you use Squarespace's built-in analytics or third-party integrations, enable Auto Block Scripts in your CookieFrame Dashboard under Settings → Behavior.
Another CMP is conflicting
Squarespace has a built-in cookie banner on some plans. Disable it under Settings → Cookies & Visitor Data before activating CookieFrame to avoid two banners appearing simultaneously.
Changes not reflected on the live site
After saving Code Injection changes, hard-refresh your browser (Cmd+Shift+R / Ctrl+Shift+R) or test in a fresh incognito window to bypass any cached page state.
Need Help?
- Email us at [email protected]
- See the manual installation guide for advanced options (JavaScript API, event handling, script blocking configuration)
Manual Installation
Complete guide to installing CookieFrame directly on your website via HTML script tag, with advanced configuration options and JavaScript API reference
Webflow Integration
Add a cookie consent banner to your Webflow site by pasting the CookieFrame script into Site Settings Custom Code