Integrations
Squarespace setup
Add the consent banner to your Squarespace site via code injection
A complete guide to adding the GetCookies consent banner to your Squarespace site, covering code injection, template considerations, and troubleshooting.
Prerequisites
Before you begin, make sure you have:
- A GetCookies account with a domain configured for your Squarespace site URL.
- Your Domain ID from the GetCookies dashboard (Domains > Widget Configuration).
- A Squarespace Business plan or higher (code injection requires Business plan or above).
Note: Squarespace's free and Personal plans do not support code injection. You need at least the Business plan to add custom scripts.
Installation via Code Injection
Step 1: Open Code Injection Settings
- In your Squarespace dashboard, go to Settings > Advanced > Code Injection.
- You will see fields for Header, Footer, and other injection points.
Step 2: Add the GetCookies Script
In the Header code injection field, paste:
<!-- GetCookies - Cookie Banner -->
<script src="https://app.getcookies.co/api/v1/widget/loader.js"
data-domain-id="YOUR_DOMAIN_ID"
async></script>Replace YOUR_DOMAIN_ID with your actual Domain ID from the GetCookies dashboard.
Step 3: Save
Click Save at the top of the page. The banner will now appear on all pages of your Squarespace site.
Handling Squarespace Built-in Analytics
Squarespace includes built-in analytics that use first-party cookies. These are generally considered Strictly Necessary for site operation and are not blocked by GetCookies by default.
If you have connected external analytics (Google Analytics, Facebook Pixel, Pinterest Tag) through Squarespace's built-in integrations, you need to manage them:
Google Analytics (Connected via Squarespace)
If you connected Google Analytics through Settings > External API Keys > Google Analytics:
- Squarespace injects the GA script automatically.
- GetCookies will detect and block this script until the user consents to the Analytics category.
- No additional configuration is needed.
Facebook Pixel (Connected via Squarespace)
If you added the Meta/Facebook Pixel through Marketing > Facebook Pixel & Conversions API:
- Squarespace injects the pixel script automatically.
- GetCookies will detect and block this script until the user consents to the Marketing category.
- No additional configuration is needed.
Pinterest, Google Ads, and Other Integrations
For other marketing integrations connected through Squarespace:
- GetCookies automatically detects most known tracking scripts.
- Run a scan after installing to verify all scripts are correctly categorized.
- If any scripts are not detected, add them manually in your GetCookies dashboard under cookie classification.
Custom Scripts in Squarespace
If you have added custom tracking scripts via Code Injection (Header or Footer), you should wrap them for consent:
<!-- Before: fires immediately -->
<script src="https://some-tracker.com/pixel.js"></script>
<!-- After: blocked until marketing consent -->
<script src="https://some-tracker.com/pixel.js"
type="text/plain"
data-cookieconsent="marketing"></script>For inline scripts:
<!-- Before -->
<script>
(function() { /* tracking code */ })();
</script>
<!-- After -->
<script type="text/plain" data-cookieconsent="marketing">
(function() { /* tracking code */ })();
</script>Per-Page Code Injection
Squarespace allows code injection on individual pages (Business plan and above):
- Edit the page in Squarespace.
- Go to Page Settings > Advanced.
- Add scripts in the Page Header Code Injection field.
If you add tracking scripts to specific pages, apply the same data-cookieconsent wrapping described above.
Squarespace Cookie Banner (Disable It)
Squarespace has its own basic cookie banner. You should disable it to avoid conflicts:
- Go to Settings > Cookies & Visitor Data (or Settings > Privacy).
- Set the cookie banner to Off or None.
- Save.
Running two cookie banners simultaneously will confuse visitors and may cause compliance issues.
Custom Domain Configuration
If you use a custom domain with Squarespace (e.g., www.yourbrand.com):
- Make sure the domain configured in GetCookies matches your custom domain exactly.
- If you use both
yourbrand.comandwww.yourbrand.com, configure the primary one (check which Squarespace redirects to). - The Squarespace-provided
.squarespace.comsubdomain does not need a separate configuration if you redirect it to your custom domain.
Verify the Installation
- Open your site in an incognito/private window.
- Confirm the GetCookies banner appears on the first page load.
- Open DevTools > Network and verify tracking scripts wait for consent.
- Accept consent and confirm trackers load.
- Navigate between pages and verify the banner state persists.
- Check your GetCookies dashboard under Consent Logs to see the test consent recorded.
Troubleshooting
Banner not appearing
- Plan level: Verify you are on the Business plan or higher. Code injection is not available on lower plans.
- Correct field: Make sure the script is in the Header injection field, not the Footer.
- Domain ID: Double-check the Domain ID matches your site's domain in the GetCookies dashboard.
- Other cookie banners: Disable Squarespace's built-in cookie banner to prevent conflicts.
Scripts still firing before consent
- Squarespace integrations: Scripts added through Squarespace's built-in integrations (Settings > External API Keys) are injected by Squarespace itself. GetCookies detects and blocks most of them automatically. If one is missed, report it via support.
- Custom scripts: Ensure all custom tracking scripts in Code Injection are wrapped with
data-cookieconsentattributes.
Banner overlaps with Squarespace elements
- If the banner overlaps with Squarespace's announcement bar or sticky navigation, adjust the banner position in your GetCookies dashboard (try bottom-left or bottom-right popup instead of a full-width bar).
- Use Custom CSS in GetCookies:
.gc-banner { z-index: 999999 !important; }
Changes not showing
- Squarespace does not have a traditional cache, but browsers may cache aggressively. Try a hard refresh (Ctrl+Shift+R / Cmd+Shift+R).
- If using Cloudflare or another CDN in front of Squarespace, purge the CDN cache.
Still stuck?
Email [email protected] with your domain and what you tried. Signed-in customers can also open a ticket from the dashboard.