Overview
The AiSU chat widget lets you deploy your AI assistant on any website with a simple script tag.
Prerequisites
- An active AiSU account
- At least one collection with processed documents
- Access to your website's HTML
Installation
1. Get Your Widget Code
Navigate to Settings → Integrations → Chat Widget in your AiSU dashboard.
Copy the provided script tag, which will look like this:
```html
<script
src="https://widget.aisu.ai/chat-widget.js"
data-collection-id="your-collection-id"
defer
></script>
```
2. Add to Your Website
Add the script tag to your website's HTML, ideally just before the closing `</body>` tag:
```html
<!DOCTYPE html>
<html>
<head>
<title>Your Website</title>
</head>
<body>
<!-- Your content here -->
<script
src="https://widget.aisu.ai/chat-widget.js"
data-collection-id="your-collection-id"
defer
></script>
</body>
</html>
\`\`\`
3. Customize Appearance
You can customize the widget using data attributes:
```html
<script
src="https://widget.aisu.ai/chat-widget.js"
data-collection-id="your-collection-id"
data-theme="dark"
data-position="bottom-left"
data-primary-color="#6d28d9"
data-greeting="Hi! How can I help you today?"
defer
></script>
```
Available Options:
- `data-theme`: `light` or `dark` (default: `light`)
- `data-position`: `bottom-right` or `bottom-left` (default: `bottom-right`)
- `data-primary-color`: Any hex color code (default: `#6d28d9`)
- `data-greeting`: Custom greeting message
Testing
Open your website and you should see the chat bubble in the corner. Click it and try asking a question that your documents can answer.
Troubleshooting
Widget doesn't appear:
- Check your browser console for errors
- Verify the script URL is loading correctly
- Ensure JavaScript is enabled
Answers are generic:
- Your collection may still be processing
- Check that your collection has documents in Ready status
Need Help?
Contact support through the chat widget in your AiSU dashboard.