Skip to content

JavaScript embed

Add the Chatevo chat widget to any website with a single async script tag. No npm package required.

<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.

AttributeRequiredDescription
srcYesAlways https://widget.chatevo.ai/chat.js
data-deployment-idYesDeployment ID from Deployments → Web widget → Embed
data-api-baseRecommendedAPI base URL; defaults to https://api.chatevo.ai
data-localeNoUI locale, e.g. en, de, fr
data-themeNoOverride theme: light or dark

The script loads asynchronously and does not block page render. On load it:

  1. Fetches widget config for appearance and greeting.
  2. Injects the chat bubble into the page.
  3. Opens an SSE connection when the visitor sends a message with streaming enabled.

Target time to interactive bubble: ≤ 2 seconds. See Rate limits.

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.

After load, the global window.Chatevo object exposes:

MethodDescription
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
PlatformGuide
WordPressWordPress embed
WebflowWebflow embed
Custom HTMLEmbed code
IssueGuide
Bubble not visibleWidget not loading
Console 403Domain not allowed