Widget Installation
The Awentail chat widget is a lightweight, embeddable component that loads on your website. One script tag — no dependencies, no build tools.
Basic installation
Copy this script tag and paste it before the closing </body> tag on your website:
<script
src="https://app.awentail.com/widget.js"
data-bot-id="your-bot-id"
defer>
</script>
Replace your-bot-id with your actual assistant ID (found in your assistant settings).
Customization options
Configure the widget using data- attributes on the script tag:
| Attribute | Default | Description |
|---|---|---|
data-bot-id | (required) | Unique identifier for your assistant |
data-color | #7C3AED | Primary color for widget header and user messages |
data-position | bottom-right | Widget position: bottom-right or bottom-left |
data-title | Assistant name | Custom title shown in the widget header |
data-welcome | Assistant welcome message | Override the welcome message |
data-auto-open | 0 | Auto-open delay in seconds (0 = disabled) |
Example with all options
<script
src="https://app.awentail.com/widget.js"
data-bot-id="abc123"
data-color="#2563EB"
data-position="bottom-left"
data-title="Help Center"
data-welcome="How can I help you today?"
data-auto-open="5"
defer>
</script>

Session persistence
The widget uses localStorage to persist conversations. If a visitor leaves and comes back, their chat history is preserved. Sessions are tied to the assistant ID — different assistants maintain separate conversations.
Styling
The widget renders inside an <iframe> with its own isolated styles, so it won’t conflict with your site’s CSS. The widget adapts its look based on the data-color attribute.
Multiple assistants
You can embed multiple assistants on a single page — just add multiple script tags with different data-bot-id values:
<script src="https://app.awentail.com/widget.js" data-bot-id="sales-assistant" defer></script>
<script src="https://app.awentail.com/widget.js" data-bot-id="support-assistant" defer></script>
Performance
- The widget script loads asynchronously with
defer— it won’t block page rendering - Total bundle size is under 15 KB gzipped
- No external dependencies
- Conversations load on demand, not on page load
Troubleshooting
Widget not showing?
- Check that
data-bot-idexactly matches your assistant ID - Make sure the script is placed before
</body> - Check the browser console for errors
Style conflicts?
- The widget renders in an iframe — it shouldn’t inherit your site’s styles
- If you see issues, check for global CSS targeting
iframeelements
Assistant not responding?
- Verify your assistant has documents uploaded in the knowledge base
- Check if you’ve exceeded your monthly conversation quota