Widgets and installation
The surfaces, the script tag, allowed domains, and what to check when nothing appears.
Updated 2026-09-05Choosing a surface
- Floating chat. A bubble in the corner. The default for a marketing site.
- Inline chat. Renders inside an element you choose, for a help page.
- Docs assistant. A search-style box for documentation.
- Hosted page. A full page at your own address, for when you have nowhere to embed.
Installing
Copy the script tag from the widget's Install tab and paste it just before the closing body tag.
<script src="https://cdn.welcomeai.dev/widget/v1.js" data-wai-key="wg_xxxxxxxxxxxx" defer></script>Nothing else is required. The widget loads asynchronously and does not block your page.
Allowed domains
A widget only answers on the domains you list. Add every host it will run on, including staging. *.example.com covers subdomains. A request from anywhere else is refused, which is what stops someone from lifting your key and running your assistant on their own site.
Nothing appears
Check in this order:
- Is the widget published? A draft widget does not load.
- Is the domain allowed? The browser console shows a refusal with the origin we saw.
- Is the script actually on the page? View source and search for
data-wai-key. - Is something blocking it? A strict content security policy needs
cdn.welcomeai.devallowed.
The widget page shows the domains where the widget has been seen and when, which usually settles the question faster than the console does.