Add an AI chatbot to Squarespace: code and checks

Copy Agentkit's current two-tag widget code into Squarespace Code Injection, check plan access, and test the chat on a public page.

Cover Image for Add an AI chatbot to Squarespace: code and checks

To add a floating AI chatbot to a Squarespace site, enable Chat widget in your Agentkit agent's Channels → Website embed page. Copy the complete generated code, including both script tags, into Squarespace's sitewide Footer Code Injection field. Save it, open a public page outside the editor, and send a question whose answer you know.

Squarespace makes Code Injection available on Core, Plus, Advanced, and some legacy plans. Check your site's current plan before starting. Squarespace does not run injected code on its native checkout pages.

Prepare an answer before installing

If you do not have an agent yet, create one in Agentkit. Add a public Squarespace page with a specific answer, such as a service description or return policy, as a source. Wait for processing, then ask that question in Agentkit's Playground. Check the answer against the page itself. If the answer is missing or wrong, fix the source or add the missing information before publishing the widget.

A visually rich page may have little usable text. Test important questions rather than assuming every visible image, product option or private page became answer material. The website training guide covers source preparation in more detail.

Install the widget across the site

  1. In Agentkit, open your agent's Channels → Website embed page. Select Chat widget and enable it.
  2. Use Copy code to get the generated snippet. It contains a small bootstrap script and a second script that loads the widget. Keep both tags and their generated values together.
  3. Open your Squarespace site's Code Injection panel. Paste the complete snippet into Footer, then save. Squarespace inserts Footer code before the closing </body> tag on every page.
  4. Open your published site in a private browser window. Check a normal page and a mobile viewport. The editor may disable injected scripts during preview, so test the public URL.
  5. Open the chat bubble and send the same known question you tested in Playground. Confirm the answer matches the page.

Copy both tags from your own agent. An old script tag or example agent ID will not install your chat. The Squarespace integration guide has a short checklist, and the general embedding guide explains the difference between a floating widget and an inline iframe.

Troubleshoot the public page

  • No bubble appears: Confirm Chat widget is enabled, your Squarespace plan includes Code Injection, and both generated tags survived the paste. Check the published page source rather than relying on the editor preview. If a sitewide footer already contains older Agentkit code, remove the duplicate before retesting.
  • The bubble appears but messages fail: Check the browser's network errors. If you set domain restrictions, include the custom domain you publish on and any Squarespace subdomain you use for testing.
  • The answer is wrong: Return to the source and Playground. A working embed proves the interface loaded; it does not prove your source text is complete or current.
  • Nothing appears at checkout: Squarespace does not support code injection on checkout pages. Test a normal public page instead.

Squarespace treats third-party scripts as code-based customizations outside its support scope. Check mobile layout and cookie-banner overlap on your own site. After a source update, repeat the known-question test before assuming the live answer changed.

Get started freeNo credit card required