Add an AI form to Squarespace using a Code Block
Squarespace's Code Block lets you embed any HTML or JavaScript snippet on your page. The Sift widget drops in cleanly, renders inline, and uses Shadow DOM to avoid clashing with your Squarespace template styles.
YOUR_FORM_ID and YOUR_PUBLIC_KEY in the snippets below.Install Sift on Squarespace
- 1
Edit the page where you want the widget
From your Squarespace dashboard, navigate to the page you want to update and click Edit.
- 2
Add a Code Block
Click an Insert Point (the line that appears between sections), select Code from the menu, and confirm. The Code Block opens with a default snippet.
- 3
Paste the Sift script and save
Replace the default code with the Sift snippet, ensure the language dropdown is set to HTML, toggle Display Source OFF, click Apply, and save the page.
<script src="https://siftforms.com/widget/v1.js" data-schema-id="YOUR_FORM_ID" data-api-key="YOUR_PUBLIC_KEY" async ></script>
Alternative install methods
Site-wide via Code Injection
Go to Settings → Advanced → Code Injection and paste the snippet into the Footer field. The widget script loads on every page. Then place an empty container div where you want the widget to render.
Tips for the best results
- Code Blocks require a Business plan or higher on Squarespace 7.0 — verify your plan supports custom code
- Always toggle Display Source OFF or your visitors will see the raw HTML
- Squarespace lazy-loads images, but the Sift widget loads independently — no conflict
- If you use Squarespace Forms elsewhere, Sift can replace them entirely with a smarter, lower-friction alternative
Troubleshooting
Widget renders as raw HTML text
You forgot to toggle Display Source OFF in the Code Block editor. Edit the block, click the eye icon to disable Display Source, and save.
Code Block option does not appear
Code Blocks require a Business plan or higher. Upgrade your Squarespace plan, or use a third-party embed service if you are on Personal.
Embed Sift on other platforms
WordPress
Add the Sift widget to WordPress using the Custom HTML block, a header/footer plugin, or directly in your theme files. Works with classic editor, Gutenberg, and Elementor.
Webflow
Add the Sift widget to any Webflow page using the built-in Embed component, or globally via Project Settings → Custom Code.
Wix
Add the Sift widget to Wix using the Custom Element or HTML iFrame embed. Both options take less than 3 minutes to set up.
Ready to embed Sift on Squarespace?
Create your first form in your dashboard, then come back and paste the snippet above.