Skip to main content
Squarespace does not run a plugin marketplace for third-party scripts, so the honest, supported way to add a Squarespace voice AI is the same one every custom tool uses: paste one small script tag. That single tag loads the SmartAlex widget, which handles both voice and chat with Alex, our in-app assistant. Everything the visitor sees (the variant, the colours, which agent answers) is read live from your workspace at load time, so you paste once and restyle later without touching Squarespace again.
Code Injection and Code blocks are available on Squarespace Business and Commerce plans. The legacy Personal plan does not include custom code, so the widget will not load there. This applies to both Squarespace 7.0 and 7.1.

How the embed works

The script tag never contains your colours or variant. It carries one attribute, data-tenant-id, and the widget resolves the rest from the server. That is why a design change in Widget Studio is instant and never needs a re-paste.

Before you start

1

Confirm your plan

Open Settings and check you are on a Business or Commerce plan. If Code Injection is missing from the Advanced menu, you are on Personal and need to upgrade first.
2

Grab your tenant id

In SmartAlex, open the widget code panel in Widget Studio and copy YOUR_TENANT_ID. If you drive SmartAlex from an AI client over MCP, the tool smartalex_get_widget_install_code returns the exact snippet for you.
3

Pick and publish a variant

Choose a variant in Widget Studio (see the table below) and save it as active. Only one widget is active per workspace at a time, so saving one turns the others off.

Method 1: Code Injection (whole site)

This is the recommended path. It puts the widget on every page in one place.
1

Open Code Injection

Go to Settings > Advanced > Code Injection.
2

Paste into the Footer field

Paste the snippet into the Footer box (not Header). The footer injects just before the closing </body> tag site-wide, which is where an async widget belongs.
3

Save and publish

Click Save. Injected code runs only on your live, published site, not inside the Squarespace editor preview, so open the real URL in a normal browser tab to test.

Method 2: Code block (one page)

Use this when you only want the widget on a single page, for example a contact or pricing page.
1

Add a Code block

Edit the page, click an insert point, and add a Code block.
2

Paste the snippet

Paste the same script tag. Leave the block set to HTML and turn Display Source off so the code runs instead of showing as text.
3

Save and view live

Code blocks do not execute scripts in the editor preview. Save, then check the published page.

The snippet

Paste this exactly and replace YOUR_TENANT_ID with your real tenant id. Both forms below are identical to the widget; use whichever reads cleaner in your Code Injection box.
There is no data-variant, data-agent, or data-color attribute. data-tenant-id is the only one. If you find yourself editing anything else in the tag, you are configuring the wrong place: the variant and colours live in Widget Studio.

Choosing a variant

Set the variant once in Widget Studio. The snippet stays byte-identical across all five.
Naming to expect: the same premium variant is labelled Widget v2 in Studio and Ask Alex in these docs. It is one variant with two names. The Voice Pill and Ask Alex variants only appear in the picker when your agent runs on the SmartAlex voice engine. Ask Alex also turns on persistent pop-up calls so a call survives page navigation.

Restyle without re-pasting

Because the widget reads its config from the server, you change the look entirely inside SmartAlex:
  • Open Widget Studio, pick a new variant or new colours, and save.
  • The published Squarespace page updates on the next visitor load. No Code Injection edit, no republish of the tag.
The Squarespace snippet is a permanent anchor. Everything visual is a workspace setting.

Let an AI agent wire it for you

SmartAlex is agent-native, so you can have Claude Code, Cursor, or ChatGPT fetch the exact tag and hand it to you. Connect the hosted MCP server once:
Then prompt your assistant:
Get my SmartAlex widget install code and give me the exact script tag to paste into Squarespace Code Injection.
The assistant calls smartalex_get_widget_install_code and returns the snippet with your tenant id already filled in. Generating MCP API keys for local use requires the Power Tools add-on ($29/mo) and a super-admin role; the hosted command above uses a browser sign-in and needs no key.

Troubleshooting

Confirm you are on a Business or Commerce plan, check that YOUR_TENANT_ID was replaced with your real id, and hard refresh (the script is cached). Make sure one widget config is saved as active in Widget Studio.
Squarespace runs injected code and Code blocks only on the published site, not in the editor preview. Always test on the real URL in a normal browser tab.
Only add the snippet in one place. If it is in Code Injection Footer, do not also add a per-page Code block, or the widget loads twice.
Those two variants require an agent deployed to the SmartAlex voice engine. Pill, Chat bar, and Side panel are always available.

Widget install reference

The canonical install guide, including the React and Next.js versions of the same snippet.

Widget variants

A closer look at all five variants and how to style them in Widget Studio.

Build with SmartAlex

Embed guides for Webflow, Framer, WordPress, Shopify, Wix, and more.

Operate from an AI client

Connect Claude, Cursor, or ChatGPT to your workspace over the live MCP server.