Add Hazelchat to your Squarespace site
What you need
- A Squarespace site on the Core, Plus or Advanced plan, or a legacy plan that includes code injection. On Basic, Squarespace switches code injection off: the code stays in the field but does nothing.
- A Hazelchat account with an agent you have tried in the workspace. You can start free.
Add the code
- In Hazelchat, open the install step (Install in setup, or Website → Install on your website), choose Something else and click Copy the code. It is one line with your own widget key:
<script src="https://app.hazelchat.co/widget.js" data-agent="YOUR-WIDGET-KEY" defer></script> - In Squarespace, open the Pages panel, click Custom Code at the bottom of the panel, then Code Injection. On a version 7.0 site, look under Website Tools.
- Paste the line into the Footer field, not Header, and click Save. Squarespace adds Footer code just before the end of every page.
- Back in Hazelchat, enter your website’s address and click I’ve added the code.
- Click Publish and switch on (or Switch on if your agent is already published). Hazelchat first looks for the code on your website and only then makes the chat visible.
- Open your website, refresh it, ask the chat a question a visitor would ask, then return to Hazelchat and click Yes, I saw this answer.
These steps follow Squarespace’s own help (Customize parts of your site with code injection, The Pages panel and Premium features), read on 14 October 2026. We have not yet tested Hazelchat on Squarespace ourselves. If a menu looks different, Squarespace’s page is the up-to-date one.
Check it works
- Open your site in a private or incognito window, so you see it as a visitor and not logged in to Squarespace.
- Once Hazelchat is switched on, the chat button appears in the corner of every page except checkout.
Squarespace’s help says this code goes into the page itself, so Hazelchat’s check can find it when you switch the chat on. If your home page does not carry the code, enter the page that does under Installation troubleshooting → Page the script is on.
Common problems
- Basic plan. Code injection works only on Core, Plus and Advanced. On Basic the line never reaches your pages, so Hazelchat cannot find it.
- Old instructions. Guides that say Settings → Advanced → Code Injection describe Squarespace’s older menus. The field is now under Custom Code in the Pages panel.
- Checkout and version 7.0 index pages. Squarespace runs no custom code on checkout pages, nor on index pages of version 7.0 sites, so the chat does not appear there.
- The editor misbehaves after pasting code. Squarespace’s help explains how to turn scripts off in the editor preview while you fix it.
- “The install script was not found on the page.” Check that you published the change in Squarespace and that the line is complete, with your own key, then try again in Hazelchat.
Visitor consent
Squarespace’s own cookie banner (in the Cookies & Data Privacy panel) does not hold back code you add yourself. Squarespace’s help says you may need to make your banner and such code work together.
To keep the chat closed until a visitor agrees, add data-require-consent="true" to the line, before defer. The chat then waits until your consent tool sends:
window.dispatchEvent(new CustomEvent('hazelchat-consent', { detail: true }));
Send detail: false when a visitor withdraws consent. With this option and no event, no chat appears, so test it on your published site.
Remove Hazelchat
- Open Custom Code → Code Injection, delete the Hazelchat line from Footer and click Save.
- To hide the chat everywhere at once without touching your site, switch Hazelchat off on its Website page. The line then stays on your pages but shows nothing.
Help
For Squarespace itself, use Squarespace Help. For anything in Hazelchat, email hello@hazelchat.co. We answer within one business day. Other ways to install Hazelchat.