In the app: Agent Settings → Widget → Install → Install code. In Webflow: Site settings → Custom code → Footer code.
Custom code and the Embed element need a paid Webflow Site plan, and the script only runs on the published domain.
How do I get my snippet?
1
Have an agent ready
Create and activate an agent first. See Create an agent.
2
Copy the Install code
Open Agent Settings → Widget → Install → Install code and press Copy, and your
data-tenant-id is already filled in. You can also press Send to developer, or ask a connected AI app for it.3
Turn the widget on
Switch on Show widget on my website under Agent Settings → Widget.
data-tenant-id.
How do I add it to the whole site?
1
Open site settings
In the Webflow Designer, click the site name at the top left, then Site settings.
2
Open Custom code
Open the Custom code tab and scroll to Footer code, the box for code before the closing
</body> tag.3
Paste and save
Paste the full script tag and click Save changes.
4
Publish
Publish the site. Open the live address to see the widget.
How do I add it to one page only?
1
Add an Embed element
Open the add elements panel and drag Embed onto the page. Its position does not matter, because the widget floats on its own.
2
Paste the snippet
Paste the script tag into the code editor and click Save and close.
3
Publish
Publish the page. The widget does not run in the Designer preview.
</body> tag for one page without an Embed element.
Which widget style should I pick?
You choose the style in Agent Settings → Widget, not in Webflow. Widget v2 gives voice and chat in one window and suits most sites. Pill, Chat bar, Side panel and Voice pill are the other four, and only one widget is active per workspace. See Widgets. The diagram shows how the pieces load.Why is the widget not showing?
- Publish the Webflow site, because custom code never runs in the Designer.
- Check the site is on a paid plan.
- Check the tag sits before the closing
</body>tag, not in the head. - Check Show widget on my website is on, and that your site is in Allowed websites if you set that list.
- Look in the browser console for the request to
api.getsmartalex.com.
Questions people ask
Why does the widget not show in the Webflow Designer?
Why does the widget not show in the Webflow Designer?
Custom code only runs on the published site, never in the Designer canvas, so publish the site and open the live address.
Do I need a paid Webflow plan?
Do I need a paid Webflow plan?
Yes. Custom code in site settings and the Embed element need a paid Site plan. The script only runs on the published domain.
Do I have to republish Webflow when I restyle the widget?
Do I have to republish Webflow when I restyle the widget?
No. The widget reads its style, colours and agent from SmartAlex when the page loads. Changes in Agent Settings → Widget show on the next page load.
Can I add the widget to one page only?
Can I add the widget to one page only?
Yes. Use an Embed element on that page, or paste the tag in that page’s settings under Custom code, before the closing body tag.
Related
Installing the widget
The full install guide and fixes.
Widgets
The five styles, colours and limits.
Framer
The same widget in Framer.
Create an agent
Build the agent the widget talks with.

