Quick Installation
Add this script tag to your website (before the closing</body> tag):
YOUR_AGENT_ID with your actual agent ID (found in your agent dashboard).
Widget Types
Bubble Widget (Default)
The bubble widget appears as a floating button in the bottom-right corner of your page.Inline Widget
Embed the chat directly in your page content.Full Page Widget
Display the chat as a full-page interface.Configuration Options
Basic Configuration
Available Attributes
chatbot-id(required): Your agent IDdata-type: Widget type (bubble,inline,fullpage)data-position: Position for bubble widget (bottom-right,bottom-left,top-right,top-left)data-primary-color: Primary color (hex code)data-base-url: Custom base URL (if using custom domain)
Customization
Appearance Settings
Customize your widget’s appearance from the agent dashboard:- Go to your agent dashboard
- Navigate to Widget or Settings → Widget
- Customize:
- Primary Color: Main brand color
- Launcher Icon: Icon style (bot, chat, custom)
- Launcher Shape: Circle or square
- Widget Style: Glass, solid, or minimal
Behavior Settings
Configure how your widget behaves:- Auto-open Mode:
manual- User clicks to openauto- Opens automatically after delaynever- Never auto-opens
- Auto-open Delay: Delay in milliseconds before auto-opening
- Auto-open Once: Only auto-open once per session
- Allow File Uploads: Enable/disable file uploads
- Enable Suggested Replies: Show suggested response options
- Enable Typing Indicator: Show typing animation
Content Customization
Customize the widget’s content:- Title: Widget header title
- Subtitle: Widget header subtitle
- Initial Message: First message shown to users
- Input Placeholder: Placeholder text in input field
- Suggested Questions: Pre-defined questions users can click
React Integration
For React applications, use theuseEffect hook:
React Native Integration
For React Native applications, use WebView:SPA (Single Page Application) Compatibility
The widget works with SPAs. For dynamic route changes:Event Listeners
Listen to widget events:Multi-Agent Setup
You can embed multiple agents on the same page:Lazy Loading
Load the widget only when needed:Troubleshooting
Widget Not Appearing
- Verify the agent ID is correct
- Check browser console for errors
- Ensure the script is loaded before page unload
- Check that the base URL is correct
Widget Not Responding
- Check network connectivity
- Verify agent is active
- Check browser console for API errors
- Ensure authentication is working
Styling Issues
- Clear browser cache
- Check for CSS conflicts
- Verify widget settings in dashboard
- Try in incognito mode
Best Practices
- Load Script at End: Place script before
</body>tag - Use HTTPS: Always use HTTPS for production
- Test on Mobile: Verify widget works on mobile devices
- Monitor Performance: Check widget load time
- Handle Errors: Implement error handling for failed loads