JavaScript embed
Add the Chatevo chat widget to any website with a single async script tag. No npm package required.
Standard embed
Section titled “Standard embed”<script src="https://widget.chatevo.ai/chat.js" data-deployment-id="YOUR_DEPLOYMENT_ID" data-api-base="https://api.chatevo.ai" async></script>Paste before </body> on every page where chat should appear.
Script attributes
Section titled “Script attributes”| Attribute | Required | Description |
|---|---|---|
src | Yes | Always https://widget.chatevo.ai/chat.js |
data-deployment-id | Yes | Deployment ID from Deployments → Web widget → Embed |
data-api-base | Recommended | API base URL; defaults to https://api.chatevo.ai |
data-locale | No | UI locale, e.g. en, de, fr |
data-theme | No | Override theme: light or dark |
Load behavior
Section titled “Load behavior”The script loads asynchronously and does not block page render. On load it:
- Fetches widget config for appearance and greeting.
- Injects the chat bubble into the page.
- Opens an SSE connection when the visitor sends a message with streaming enabled.
Target time to interactive bubble: ≤ 2 seconds. See Rate limits.
JWT for logged-in users
Section titled “JWT for logged-in users”When JWT verification is enabled, set the token before the visitor chats:
<script src="https://widget.chatevo.ai/chat.js" data-deployment-id="YOUR_DEPLOYMENT_ID" data-api-base="https://api.chatevo.ai" async></script><script> window.Chatevo = window.Chatevo || {}; window.Chatevo.setIdentityToken("eyJhbGciOiJIUzI1NiIs…");</script>Generate the JWT server-side with your deployment secret. Never expose the secret in client code.
Programmatic API
Section titled “Programmatic API”After load, the global window.Chatevo object exposes:
| Method | Description |
|---|---|
Chatevo.open() | Open the chat panel |
Chatevo.close() | Close the chat panel |
Chatevo.setIdentityToken(token) | Set or update JWT |
Chatevo.on(event, callback) | Listen for open, close, message events |
Platform guides
Section titled “Platform guides”| Platform | Guide |
|---|---|
| WordPress | WordPress embed |
| Webflow | Webflow embed |
| Custom HTML | Embed code |
Troubleshooting
Section titled “Troubleshooting”| Issue | Guide |
|---|---|
| Bubble not visible | Widget not loading |
| Console 403 | Domain not allowed |