Skip to content
Platforms

Squarespace

Where to add the Otto chat code in Squarespace with Code Injection, which plan you need, and why the chat does not show at checkout.

On this page

Squarespace is a website and online store builder. You paste the chat code into the Footer field in Code Injection, and Squarespace adds it to every page before </body>. It takes about 5 minutes.

What you need

  • An Otto account. You find the chat code in the panel under Overview, on the Installation & integrations card, on the Squarespace tile. It is under the More platforms tile, and you can also search for it.
  • The Core, Plus or Advanced plan, or an older plan that includes custom code. The Basic plan has no Code Injection.

Chat code

On the Squarespace tile, click Copy code. You get one line with your company’s public key:

<script async src="https://ottoai.sk/widget.js" data-otto-key="pk_vas_kluc"></script>
The sample shows pk_vas_kluc instead of a key, the tile gives you the code with your own key. The key is not a password, you do not need to hide it. Add the code once, it covers the whole site.

Adding the code

  1. In the site editor, open the Pages panel.
  2. At the bottom of the panel, click Custom Code and then Code Injection.
  3. Paste the chat code into the Footer field.
  4. Click Save.

In version 7.0, Code Injection is in the Pages panel under Website Tools.

The chat does not show at checkout. Squarespace does not run custom code on checkout pages.

You can also follow the official Squarespace help.

Checking it works

  1. Open your website in a new browser window and reload. A chat bubble should pop up in the bottom right.
  2. Send the chat a test question. Otto answers within a few seconds.
  3. In the panel, under Settings, Connections, the Your website row shows the domain the chat runs on.
The chat may already show in the editor on the .squarespace.com address, and it moves to your domain on its own the first time it shows up there. Check it on the published site in a private browser window.

Product catalogue

Squarespace sends products to Google Merchant Center through its own integration. A Google format feed with a downloadable address is made by a product feed extension from Squarespace Extensions.

Paste the feed address in the panel under Settings, Catalogue, and click Check feed. The panel tells you how many products it found, and Otto keeps the feed up to date on its own. More in Product catalogue.

Troubleshooting

I do not see Custom Code or Code Injection in the Pages panel

Your plan has no custom code, Code Injection starts with the Core plan. In version 7.0, look under Website Tools.

The chat is missing at checkout

Squarespace does not allow custom code on checkout pages, not even through Code Injection. The chat runs on all other pages.

The editor shows an error loading the preview

When custom code causes trouble, Squarespace offers Disable Scripts in Preview in the editor. It only turns scripts off in the editor preview, and visitors still see the chat.

Also check

  • Reload the page without cache with Ctrl+F5, or open it in a private window.
  • The code should be on the page only once, a second copy is ignored.
  • A cookie consent bar can block scripts until the visitor agrees. If the chat only shows up after consent, see Cookie consent.
  • If your site sends a Content-Security-Policy header, allow https://ottoai.sk in it, as shown in Content-Security-Policy.
  • In the browser console (F12), look for messages starting with [Otto]. They tell you what the chat is missing.
  • Still nothing? Write to us at podpora@ottoai.sk and include your website address.

Removing the chat

In Pages, Custom Code, Code Injection, delete the code from the Footer field and click Save.