Squarespace’s Code Injection adds code to every page of your site. You paste the widget code into its Footer field.

Before you start

  • Your website widget. Kelu makes one for you when you create a knowledge base. Find it under Integrations → Website widget. You need the widget id and public key from the code on its Install tab.
  • Your site’s address on the widget’s Sites it works on list (Install tab). Add your custom domain and your built-in address, such as https://yoursite.squarespace.com. You see the built-in address while you are logged in.
  • Code Injection on your Squarespace plan. It is in the Core, Plus and Advanced plans and some older plans. The Basic plan does not have it.

Add the widget

The widget’s Install tab shows these same steps with your code already filled in.
1

Open Code Injection

In the Pages panel, click Custom Code at the bottom, then Code Injection. On version 7.0 sites, it is under Website Tools.
2

Paste the snippet into Footer

<script async src="https://widget.kelu.dev/kelu-widget.js"
  data-widget-id="YOUR_WIDGET_ID"
  data-client-key="kl_pk_..."></script>
Use the code from your widget’s Install tab, or replace YOUR_WIDGET_ID and kl_pk_... with its values.
3

Save

Click Save.
Checkout pages do not run custom code, so the widget does not appear there.

Check it works

Open your site in a private window. A round icon button appears in the bottom-right corner, with the tooltip Ask AI. Ask a question and check that the answer lists its Sources. Nothing there? See Troubleshooting.
Squarespace can turn off scripts in the editor preview. Then the widget shows only on the live site, so check it in a private window.