Consent behaviour
Code in the Header field goes into the head of every page on the site.
You control the order in the field: CookiePilot at the top, GA4, GTM and other tags below it.
According to Squarespace's help, its banner does not block Code Injection code by itself. After switching to CookiePilot you turn it off, so there are not two banners.
Setup steps
In the CookiePilot panel, add the site's domain and copy the install code.
In Squarespace, open Pages → Website Tools → Code Injection and paste the code at the very top of the Header field. Code Injection is available on the Core plan and above.
If Google Analytics is connected through Developer tools → External API keys, remove the ID there and paste the GA4 or GTM tag into the Header field below the CookiePilot code.
In Cookies & Data Privacy, turn off the Squarespace Cookie banner. Squarespace warns that turning the banner off while cookie restriction is on can break some content, so review the site after the change.
Save and open the site in a private window. Check it using the checklist.
Platform limitations
Squarespace checkout pages do not support custom code, so the CookiePilot banner does not show at checkout. The code only runs again on the order confirmation and order status pages.
Squarespace's own cookies, including analytics ones, are set by the platform. CookiePilot does not block them.
Code Injection scripts also run in the editor preview. Test on the published site in a private window.
Example snippet
<script src="https://cdn.cookiepilot.io/stub.js"></script>
<script async src="https://cdn.cookiepilot.io/cookiepilot.js" data-cpkey="YOUR_SITE_KEY"></script>Test checklist
In the page source, stub.js is the first Code Injection script in head.
The first dataLayer entry is consent default with denied values.
Only the CookiePilot banner shows on the page.
Before the visitor clicks there are no _ga, _gcl or _fbp cookies, and after Accept dataLayer contains consent update granted.
Related integrations
See the setups that most often appear together with this integration.
Webflow
Add the CookiePilot banner to a Webflow site with Custom code in Site settings. You paste the CookiePilot code at the top of the Head code field and Google Analytics and GTM below it, so Consent Mode v2 sets denied before the tags you paste below it run.
Wix
Add the CookiePilot banner to a Wix site with Custom Code in the Head section. CookiePilot collects consent and controls the scripts you paste below it. It does not control Wix's marketing integrations, such as Google Analytics, GTM and pixels. Read the limitations before you install.
Framer
Add the CookiePilot banner to a Framer site with custom code in Site Settings. Consent Mode v2 starts at the beginning of head, before Google tags, and the banner runs on the whole site after you publish.
Google Analytics 4
Analytics consent, _ga and cookieless pings.
Ready to configure it?
Start CookiePilot, choose the right integration and verify that tags wait for user consent before they run.