Install PrivacyQuick on Squarespace
Paste one tag into Code Injection, switch off Squarespace's built-in cookie banner, tag the tracking code you added yourself, and test in a private window.
Squarespace's Code Injection adds code to the head of every page, which is all PrivacyQuick needs. Squarespace renames its settings menus now and then. If a name below doesn't match, search Squarespace's help for "code injection".
What you need: a PrivacyQuick account (the Free plan works) and a Squarespace plan that includes Code Injection. Squarespace treats it as a premium feature, so check that your plan has it before you start.
1. Add your site and copy the snippet
In the PrivacyQuick dashboard, add your domain and copy the snippet from the site's Overview tab:
<script src="https://cdn.privacyquick.com/v1/privacy.js" data-site-id="pq_xxxxxxxxxx" async></script>
2. Paste it into Code Injection
- In Squarespace, open Settings, then the developer or advanced section, and choose Code Injection.
- Paste the snippet at the top of the Header box, above any other code that's already there.
- Save.
Header code runs on every page of the site. Squarespace doesn't run injected code while you're logged in and editing, so always test in a private window.
3. Turn off Squarespace's cookie banner
Squarespace has its own banner under Settings → Cookies & Visitor Data. Turn it off once PrivacyQuick is live, or visitors will see two banners.
What changes when you switch it off. Squarespace's banner controls Squarespace's own analytics cookies and the tracking it adds for you through built-in integrations. With its banner off, those follow Squarespace's defaults and don't wait for PrivacyQuick. In the same settings page you can switch off Squarespace's analytics cookies if you don't want them set at all. Step 4 covers the integrations.
4. Tag the tracking code
Rather not tag each script? Put the automatic blocker line directly above the snippet. It holds scripts from known analytics and advertising services, so you only tag what it doesn't cover. It has to load before those scripts, so it only helps if it comes first in the header Code Injection, ahead of all tracking code.
PrivacyQuick holds back a script only when its tag has type="text/plain" and a data-category.
Code you pasted into Code Injection or a Code Block
Edit it in place:
<!-- before -->
<script src="https://example-analytics.com/tag.js" async></script>
<!-- after -->
<script type="text/plain" data-category="analytics" src="https://example-analytics.com/tag.js" async></script>
Tracking added through Squarespace's built-in integrations
If you entered a Google Analytics ID or a pixel ID in Squarespace's marketing or external-services settings, Squarespace writes the tag for you and you can't edit it. You have two choices:
- Google tags: leave the integration on. Google Analytics and Google Ads read the Consent Mode signals PrivacyQuick sends and don't set cookies until the visitor agrees. Before consent they still send Google's cookieless pings.
- Everything else, or Google tags you want fully blocked: remove the ID from Squarespace's settings and paste the vendor's code into Code Injection yourself, tagged as above.
Embedded videos and maps
Squarespace's own Video and Map blocks can't be tagged. If you need an embed to wait for consent, use a Code Block with a tagged iframe:
<iframe data-src="https://www.youtube-nocookie.com/embed/VIDEO_ID" data-category="functional" width="560" height="315" title="Video"></iframe>
See Blocking scripts for every pattern and Cookie categories for which category to use.
5. Test it
- Open your site in a private window, logged out of Squarespace. One banner should appear.
- In the browser's developer tools, open the Network tab and reload. Tagged scripts shouldn't load before you choose.
- Click Accept all. The tagged scripts load straight away.
- Click through to another page. Squarespace loads some pages without a full reload, so check that the banner stays closed and your tags still behave.
- In the PrivacyQuick dashboard, the site shows Installed within a minute or two.
Finish the setup
- Add a "Cookie settings" link. In a footer Code Block, paste:
<a href="#" onclick="window.PrivacyQuick && PrivacyQuick.open(); return false;">Cookie settings</a>. - Create your policies with the policy generator and link to them from the footer.
- For background, read the guide to cookie banners on Squarespace.
Stuck? See Troubleshooting or email [email protected].