chatty4allBuild your assistant

How to add an AI chatbot to Squarespace

Updated · 3 min read

Squarespace's Code injection adds code to every page of your site. Paste the chatbot's one line into the Footer box and it loads after the rest of your page.

Before you start

  1. Build your assistant in the Chatty4All editor: pick a design, then teach it about your business.
  2. Under Go live → Websites it may run on, add your website's address. The assistant only loads on the sites listed there, so nobody can copy your code onto theirs.
  3. Publish it. The editor then shows your code with your own assistant id in place of YOUR_BOT_ID.

Your code

This is the whole install. Copy yours from Go live in the editor: it's the same line with your id filled in.

HTML
<script src="https://chatty4all.design/widget.js" data-bot="YOUR_BOT_ID" async></script>

Add it to Squarespace

  1. Settings → Advanced → Code injection → Footer.

Tips for Squarespace

  • Code injection depends on your Squarespace plan. If the setting is missing, check which plan the site is on.
  • After saving, check the live site in a private window rather than the editor.
  • Add your site's domain under Go live → Websites it may run on before you publish the assistant.

Showing the chat inside a page instead

For the Inline layout, add a Code block where the chat should appear and paste the line into it.

Check it worked

  • Open your live site in a private window. The chat button should appear in the corner within a few seconds.
  • If it says it isn't enabled for this site, add that exact domain under Go live → Websites it may run on.
  • If nothing appears, check that you published the assistant and that the line is on the page (view the page source and search for widget.js).

Would you rather let your AI coding assistant do it? See install the chatbot with Cursor, Claude, Lovable, v0 or Bolt.