Squarespace cookie consent, added through Code Injection.
Add the CookieHub implementation code to the Header field in your Squarespace site’s Code Injection to block supported non-essential tracking before consent, show a customizable cookie banner and keep records of visitor consent where consent records are enabled on your plan. No Squarespace Extension required.
- Custom code — no Squarespace Extension
- Added once in Code Injection › Header
- No template changes or code refactoring
Why use CookieHub with Squarespace.
Squarespace sites load analytics, marketing pixels, embedded content and external integrations from Code Injection, page settings and Code or Embed blocks. Those scripts can set cookies as soon as a page loads, before a visitor has made a choice.
CookieHub adds a consent layer across your Squarespace site. It controls when supported scripts are allowed to run, records visitor choices where consent records are enabled, and helps you keep your cookie declaration current — without changes to your Squarespace template.
Consent before tracking
Supported non-essential tracking scripts are held back until the relevant consent category is allowed.
Site-wide implementation
CookieHub is added once in the Header field of your site’s Code Injection. There is no Squarespace Extension to install and no template to rewrite.
A banner that fits your site
Match the consent banner’s layout, colors, text and buttons to your Squarespace design from the CookieHub dashboard, without touching your template.
Added through Code Injection. No Squarespace Extension required.
CookieHub doesn’t use a Squarespace Extension. You paste the CookieHub implementation code into the Header field of your site’s Code Injection, and Squarespace adds it to the <head> of every page. Once it is in place, CookieHub:
- holds supported non-essential tracking until the relevant consent category is allowed
- shows your cookie consent banner to visitors
- manages visitor consent preferences
- records consent decisions in a consent log, where consent records are enabled on your plan
- scans your site for cookies introduced by embeds and external scripts
Squarespace Code Injection must be available on your site plan. Make sure the domain in your CookieHub dashboard matches the domain your Squarespace site uses.
Squarespace installation guideCookie consent tools for your Squarespace site.
Automatic cookie blocking
Commonly used analytics and marketing services are held until the visitor opts in — including scripts added through Code Injection or Code blocks.
Cookie scanner
Automated scans detect the cookies your site sets, including new ones introduced by embedded content, integrations and external scripts.
Customizable consent banner
Adjust the banner’s theme, colors, text and layout so the consent experience fits your Squarespace design.
Multilingual banners
Show the banner in the visitor’s preferred language when translations are enabled — useful for Squarespace sites with an international audience.
Consent logging
Keep a record of visitor consent choices in CookieHub’s consent log, where consent records are enabled on your plan.
Dynamic cookie declaration
A cookie declaration ready to embed on a page of your Squarespace site. Cookie scan results help you review it and keep it in line with the cookies your site uses.
Add CookieHub to Squarespace in a few steps.
Everything happens in your site’s Code Injection settings: no Squarespace Extension to install and no template changes.
- 01
Get your implementation code
In the CookieHub dashboard, open your domain (or add it), go to the Implementation tab, choose Manually insert the code and copy the CookieHub implementation code.
- 02
Open your Squarespace site
Log in to Squarespace and open the site you want to add CookieHub to.
- 03
Open Code Injection
Open your site’s Code Injection settings. If you can’t find them, use the Squarespace help link below.
Code Injection - 04
Find the Header field
Use the Header field. Squarespace adds code from this field to the <head> of every page on your site.
Header - 05
Paste the code
Paste the CookieHub implementation code as provided, near the top of the Header field and before any tracking scripts. Don’t add async or defer.
- 06
Save your changes
Click Save to store the code.
Save - 07
Check your live site
Open your published site in a private browser window and confirm the CookieHub banner appears before any tracking scripts run.
Consent control wherever Squarespace loads a script.
CookieHub’s automatic cookie blocker handles the most commonly used services. For other services, change the script tag to type="text/plain" and add a data-consent category, so the script only runs once the visitor consents to that category. Embedded iframes can be held the same way by moving src to data-src.
How to tag scripts for consentSite-wide Code Injection
Scripts in the Header and Footer fields of Code Injection, which load on every page.
Page-level code injection
Scripts added in a single page’s Advanced settings, which load only on that page.
Code and Embed blocks
Scripts and iframes placed on a page with Squarespace’s Code or Embed blocks, such as video players, maps and third-party widgets. These may need consent tagging if the blocker doesn’t recognize the service.
Squarespace site features
Only non-essential cookies are controlled. Essential cookies that support basic site operation are not blocked.
Already using Google Tag Manager?
If your Squarespace site manages tags through Google Tag Manager, install CookieHub through GTM rather than adding a second implementation in Code Injection.
View Google Tag Manager setupAdd a cookie declaration page
CookieHub generates a dynamic cookie declaration you can embed on a page of your Squarespace site, so visitors can see which cookies your site uses.
Learn about the cookie declaration
Squarespace questions, answered.
Open your site’s Code Injection settings and paste the CookieHub implementation code into the Header field, near the top and before any tracking scripts. Click Save. Squarespace adds code from the Header field to the <head> of every page.
No. CookieHub is a custom code integration: you add the implementation code through Squarespace Code Injection, and there is no Squarespace Extension, app or plugin to install.
Squarespace Code Injection must be available on your site plan. Squarespace decides which plans include it, so check Squarespace’s help center for the current requirements.
No. CookieHub’s automatic cookie blocker needs to load before the tracking scripts it controls. Paste the implementation code as provided, near the top of the Header field, before tracking scripts.
CookieHub’s automatic cookie blocker holds commonly used analytics and marketing services until the visitor consents. For other scripts, change the script tag to type="text/plain" and add a data-consent category. For embedded iframes, such as videos or maps, move src to data-src and add a data-consent category. A cookie scan shows which cookies your site sets.
CookieHub only controls non-essential cookies. Essential cookies that support basic site operation are not blocked.
Yes. You can adjust the banner’s theme, colors, text and layout in the CookieHub dashboard, without editing your Squarespace template.
Yes. CookieHub can show the banner in the visitor’s preferred language when translations are enabled.
Yes. CookieHub generates a dynamic cookie declaration you can embed on a page of your Squarespace site. Cookie scan results help you review and maintain it as the cookies your site uses change.
Avoid running multiple consent-management systems at the same time. If CookieHub manages consent on your site, disable any overlapping Squarespace cookie banner or consent tool, so visitors don’t see duplicate consent interfaces and consent is handled consistently.
Install CookieHub through Google Tag Manager instead of also adding it to Code Injection. Use one implementation, not both.
CookieHub provides consent-management features that can support compliance with privacy laws such as GDPR and CCPA, including blocking supported non-essential tracking before consent, recording consent decisions where consent records are enabled, and helping you keep a cookie declaration up to date. What your site needs depends on how it uses cookies and which laws apply to it.
Bring cookie consent management to your Squarespace site.
CookieHub gives Squarespace site owners a clear, reliable way to manage cookie consent — without template changes or complicated configuration.