Add the chat to a Squarespace site
Squarespace Code Injection takes the snippet in one paste. Here is the exact field, the plans that have it, and how to test properly.
Browse topics
What it is
Squarespace calls its paste-your-own-code feature Code Injection. Anything you put in the Header field is added to every page of your site, which is exactly what a chat widget needs. You copy one <script> tag from Agentency, paste it into that field, and save. No template editing, no plugin, no developer.
The tag contains a widget token that identifies your chatbot and the address of the Agentency API. Both are filled in for you when you copy from the dashboard.
When you would use it
Use this for any Squarespace 7.0 or 7.1 site — a portfolio, a service business, or a Squarespace Commerce store — where you want customers to be able to ask a question without leaving the page.
If your Squarespace plan does not include Code Injection (see below), you can still put a "Chat with us" button anywhere on the site that links to your hosted chatbot page. That works on any plan.
Where to find it
Open Dashboard → Chatbots → your chatbot → Integrations → Plugins → Squarespace.
Before you start
- Code Injection is available on the Core, Plus, and Advanced plans, and on the legacy Business, Commerce Basic, and Commerce Advanced plans. It is not available on Personal.
- You need owner or administrator permission on the Squarespace site.
- Add your domain to the widget allowlist in Agentency first — see Allow the widget on your domains. Include the
wwwversion if visitors use it. - Confirm the chatbot is Active on its Playground tab. A paused chatbot loads nothing.
Steps
- Open Dashboard → Chatbots → your chatbot → Integrations → Plugins and click the Squarespace card.
- Click Copy embed code.
- In Squarespace, open Settings → Advanced → Code Injection.
- Click into the Header field and paste the snippet. If something is already in there, add yours on a new line below it rather than replacing it.
- Click Save.
- Open your live site in a new tab — not the Squarespace editor preview — and wait a second for the bubble to appear.
- Send a test message and confirm it lands in Conversations.
What the snippet looks like
This is the shape of what goes into the Header field. Copy your own from the Plugins drawer; the token below is a placeholder:
<!-- Squarespace: Settings -> Advanced -> Code Injection -> Header -->
<script src="https://agentency.com/js/chatbot-widget.js" defer data-widget-token="wt_YOUR_WIDGET_TOKEN" data-api-base-url="https://api.agentency.com" referrerpolicy="strict-origin-when-cross-origin" crossorigin="anonymous"></script>
The defer keyword is there on purpose: Squarespace pages render first, and the chat loads afterwards, so your Core Web Vitals do not suffer. Do not remove data-widget-token — the widget will not start without it.
What you will see
Squarespace saves the Header field immediately and shows no visible change in the editor. On the live site, the bubble appears in the corner set by your chatbot's appearance settings.
Because Code Injection is site-wide, the bubble is also present on checkout and member pages served by Squarespace. If you want it on some pages only, the cleanest route is to leave the site-wide injection off and use per-page Code Injection under Page settings → Advanced instead.
Limits and plan notes
Embedding on your own site requires a paid Agentency plan; the Free plan is share-link only. See Which plans include integrations, and the pricing page for what each tier includes.
Squarespace's own restriction is the plan gate on Code Injection. On Personal, the field is not there at all — no snippet will help, so use the hosted link.
Nothing here syncs your Squarespace Commerce catalogue. The widget is a chat surface, not an integration with your store data. To let the chatbot quote live stock or order status, add a Call action pointing at a system that knows those answers.
Common problems
I cannot find Code Injection in Settings.
You are on the Personal plan, or you are signed in as a contributor without administrator permission. Check the plan first.
The bubble does not show in the Squarespace editor.
That is expected. Injected code is stripped inside the editing environment. Always test on the published site in a normal browser tab.
It works on my domain but not on something.squarespace.com.
Both are separate hosts as far as the allowlist is concerned. Add the built-in Squarespace address too if you or your team test on it.
I pasted it into the Footer instead of the Header.
It will usually still work, but Header is the supported placement and loads a little earlier. Move it up if you see the bubble appearing late.
The chat shows on the site but says the chatbot is not ready.
The chatbot has no knowledge or is still training. See Chatbot readiness.
Common questions
Which Squarespace plans include Code Injection?
Core, Plus and Advanced, plus the legacy Business, Commerce Basic and Commerce Advanced plans. It is not available on Personal.
Where exactly does the snippet go in Squarespace?
Settings → Advanced → Code Injection, in the Header field. Add it on a new line below anything already there rather than replacing it.
Why can I not see the bubble in the editor?
Injected code is stripped inside the Squarespace editing environment. Always test on the published site in a normal browser tab.
Can I show the chat on one page only?
Yes. Leave the site-wide Header empty and paste the snippet into that page's own Code Injection under Page settings → Advanced.
Was this article helpful?
Related articles
Website plugins overview
Fifteen platforms, two ways to install: the one-click WordPress plugin, or a copy-paste snippet for everything else. Start here.
Add the chat to a Wix site
Paste the snippet into Settings, Custom Code, set it to all pages and Head, and the chat bubble is live on your published Wix site.
Add the chat to a Ghost publication
Ghost Code injection has a Site Header box that prints into every page. One paste there puts the chat across your whole publication.
Allow the widget on your domains
Only listed hostnames may load your widget. An empty list means "not configured", so live sites are blocked.
Ready to try it on your own content?
Create a free workspace, add a document, and ask the questions your team is tired of answering.