Skip to main content
Squarespace supports third-party iframes through Code Blocks on individual pages or Code Injection for site-wide widgets.

Prerequisites

  • A TruGen agent with an agent_id — see the quickstart
  • Squarespace Business plan or higher (Code Blocks aren’t available on Personal plans)

Add via a Code Block (single page)

1

Edit the page

Open the Squarespace editor for the page where you want the agent.
2

Add a Code Block

Click the + insertion icon → Code. Choose HTML as the language.
3

Paste the iframe

Replace YOUR_AGENT_ID and set the user parameters.
4

Save and publish

Save the block. Publish the page.

Add site-wide via Code Injection (floating widget)

1

Open Code Injection settings

Go to Settings → Advanced → Code Injection.
2

Add to the Footer field

3

Save

Save and reload the site. The widget will float bottom-right on every page.

Squarespace-specific notes

  • Preview vs published — Squarespace’s editor preview strips iframes. Always test on the live URL.
  • Header injection blocked — Squarespace only allows Code Injection in Header and Footer. Choose Footer for anything with active DOM.
  • Mobile scaling — Squarespace templates sometimes constrain iframe width on mobile. Test on a real device.

Domain allowlist

Add your Squarespace domain (custom or .squarespace.com) to your agent’s allowed_domains list if configured.

What’s next

iFrame reference

Every iframe parameter documented.

Widget (React)

For headless Squarespace + React setups.