Use this guide to install the AI Agent widget on Squarespace.
Copy the Embed Code from your portal as described in Installation Overview.Two embed methods are supported:1.
Script-based loader (recommended): Adds an AI Agent bubble. The chat opens in an iframe popover when the visitor clicks the bubble.
2.
Iframe-based embed: Loads the AI Agent directly as an iframe appended to the page body (best for a dedicated page).
Best placement#
Script-based loader: Use Code Injection and add the code site-wide in the Footer area.
Iframe-based embed: Add only on a specific page (Code Block) where you want a direct embedded chat experience.
The embed code appends to document.body, so placing it in the Footer is safest.
Script-based loader (AI Agent Bubble)#
2.
Go to Settings → Advanced → Code Injection.
3.
Paste the Script-based loader code into the Footer field (site-wide).
5.
Publish (if required by your Squarespace setup).
Iframe-based embed (Direct AI Agent Chat)#
This method appends the iframe to the page body and is best used on a dedicated page.1.
Open the page where you want the embedded AI Agent.
3.
Paste the Iframe-based embed code.
To control size, adjust iframe.style.width and iframe.style.height in the code (example: 600px, 80vh, 100vh).
Some Squarespace blocks or templates can restrict scripts. If the Code Block does not run the script, use Code Injection for that page, or place the code in a footer injection area if your plan supports it.
Verify installation#
1.
Open your site in an incognito/private window.
2.
Confirm the bubble or embedded AI Agent loads.
3.
Send a test message and confirm replies.
Troubleshooting#
Confirm changes are saved and the site is published.
Hard refresh the page and clear cache.
Confirm the code was added to the Footer (recommended) and not stripped by the editor.
Check if your template or plan restricts third-party scripts.
Check browser console for blocked requests (tracking blockers, CSP rules, network blocks).
Test with browser extensions disabled.
Remove either the global Code Injection or the page Code Block if both are present.
Ensure the code is not added multiple times across different injection areas.
Modified at 2026-02-19 07:23:24