Embed Widget
Script Tag Integration
Basic Setup
Add this snippet to your HTML, just before the closing </body> tag:
<script
src="https://cdn.getilana.ai/embed.js"
data-bot-id="your-bot-id"
data-token="your-embed-token"
></script>The widget will auto-initialize and render a floating action button (FAB) in the bottom-right corner.
Data Attributes
| Attribute | Required | Default | Description |
|---|---|---|---|
data-bot-id | Yes | — | Your agent ID from the admin portal |
data-token | Yes | — | The embed token for your partner domain |
data-runtime-url | No | https://api.getilana.ai | Runtime API URL override |
data-position | No | bottom-right | Widget position: bottom-right or bottom-left |
Getting Your Credentials
- Log into the Ilana admin portal
- Navigate to your agent's Partner Domains tab
- Add the domain where you'll embed the widget
- Copy the generated embed snippet — it includes both
data-bot-idanddata-token
Full Example
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<!-- Ilana Chat Widget -->
<script
src="https://cdn.getilana.ai/embed.js"
data-bot-id="abc-123"
data-token="eyJhbGciOiJIUzI1NiIs..."
data-position="bottom-right"
></script>
</body>
</html>Notes
- The script is loaded asynchronously — it won't block page rendering
- The widget fetches its configuration (name, welcome message, theme, suggested questions) from the runtime via the
/embed-configendpoint - Only domains registered in the admin portal will be allowed to use the widget