Install on Squarespace
Add your botts.ai chat widget to every page of a Squarespace site with Code Injection, in five steps and without changing your design.
This guide adds the chat widget of a botts.ai website deployment to a Squarespace site. It uses Squarespace's Code Injection panel: code in its Footer field loads on every page of your site except the checkout pages, whichever template you use.
Before you start
You need:
- Owner or administrator access to the Squarespace site. Other contributor roles can't add code injection.
- A Squarespace plan that includes code injection: Core or higher. The Basic plan doesn't include it. Of the older plans that are no longer sold, Business and Commerce include it and Personal doesn't. On a free trial you already have most custom code options, so you can set the widget up before you upgrade; just pick Core or higher when you do.
- The embed code of your website deployment. In botts.ai, open Agents, pick your agent, go to the Deploy tab and open the Website deployment. The Install section at the bottom of the editor shows the code with a copy button. No website deployment yet? See Deployments.
The embed code looks like this, with your deployment's own key in place of YOUR_API_KEY:
<script async src="https://api.botts.ai/widget/chat-widget.js?key=YOUR_API_KEY"></script>
Note
The website widget needs the Business plan or higher. The Personal plan includes the internal chat only.
Step 1: Open your site in Squarespace
Log in at squarespace.com. In your account dashboard, click Website on your site, or hover over its image and click Go To Website. The site editor opens with the main menu on the left.

Step 2: Open Code Injection
In the main menu, click Website, then Pages. Scroll to the bottom of the Pages panel and click Custom Code. The section opens in place: click Code Injection inside it.

On a version 7.0 site, click Website Tools at the bottom of the Pages panel instead, then Code Injection. The bottom of the Pages panel shows which version your site uses.
Step 3: Paste the code into the Footer field
Paste your embed code into the Footer field. If the field already holds code, put the botts.ai code on a new line below it and leave the rest as it is. Paste the code exactly as copied: the address and the key must not change.

On a trial site, an Upgrade label with a lock icon shows above the Code Injection title, as in the screenshot. The fields still accept code and the Save button still appears, so you can add the widget before you upgrade.
Squarespace adds the Footer field just before the closing </body> tag on every page, which is where the widget script belongs. Use this site-wide field so the widget shows on all pages. Don't use the code injection in a single page's settings, or the Order Confirmation Page and Order Status Page fields further down the panel.
Step 4: Save
Click Save at the top left of the panel. The button only appears once you've added code. The code is now on every page of your site.

Step 5: Check the widget on your site
Open your public site in a private window, reload the page and wait a moment. The chat launcher appears in the bottom-right corner, or wherever you placed it in the widget editor. Open it and send a test question. Check a subpage and your phone as well.
Tip
It worked if the widget shows on your public site, opens, and answers your test question.
If the widget doesn't appear
- Check that the complete code is in the Footer field of Code Injection and that you clicked Save.
- Check your plan. On Basic, code injection isn't available and the widget doesn't load. You need Core or higher.
- Check whether your site is still on a trial or has a site-wide password. Trial sites are private: visitors can't open them, and neither can you in a private window. To test before you upgrade, open the Site Availability panel, select Password Protected and set a password. Then open the site in a private window and enter the password on the lock screen, or check again once the site is public.
- Check outside the editor. If Squarespace shows "Scripts have been disabled on your site preview" at the bottom of the editor, custom code doesn't run in your preview, but visitors still get it. A private window shows the real site.
- On a version 7.0 site, Squarespace notes that Ajax loading can conflict with custom code. Open the Site styles panel, uncheck Enable Ajax loading and test again.
- Test in a private window without an ad blocker. If your cookie banner or consent tool blocks scripts, check its configuration.
- Check that the key belongs to the right deployment and that the deployment is switched on in the Deploy tab.
Change or remove the widget
Colors, texts, the launcher and every other widget setting are changed in the botts.ai editor. Your site picks them up without any change in Squarespace. The code only needs replacing if the deployment's key changes.
To remove the widget, delete only the botts.ai script line from the Footer field in Code Injection and click Save again.
Note
The screenshots show a Squarespace 7.1 site in English. Menu and button names can differ with your Squarespace language and site version.
More help
- Squarespace: Customize parts of your site with code injection
- Squarespace: Choosing the right Squarespace plan
- The general steps for any website: Embed code
Last updated on October 4, 2026