Features
- Real-time messaging - Instant two-way communication
- File attachments - Share images, documents, and files
- Customizable appearance - Match your brand colors and style
- Pre-chat forms - Collect visitor information before starting chat
- Business hours - Show availability and expected response times
- Continuity via email - Continue conversations over email
- HMAC verification - Secure user identity verification
- Mobile responsive - Works seamlessly on all devices
Installation
Create a website inbox
Navigate to Settings → Inboxes → Add Inbox and select Website.Configure your inbox:
- Website Name: Display name for your website
- Website Domain: Your website URL (e.g.,
https://example.com) - Widget Color: Primary color for the widget (hex code)
Copy the installation code
After creating the inbox, you’ll receive a JavaScript snippet. Copy this code.
Add to your website
Paste the code before the closing
</body> tag on every page where you want the widget to appear.For single-page applications (SPAs) using React, Vue, or Angular, see the Widget SDK documentation for framework-specific integration.
Configuration Options
Widget Appearance
Primary color for the widget (hex code)
Welcome message title shown when widget opens
Welcome message subtitle
Expected response time. Options:
in_a_few_minutes, in_a_few_hours, in_a_dayPre-Chat Form
Collect visitor information before starting a conversation:Enable pre-chat form
Message shown at the top of the pre-chat form
Make email field required
Custom fields to collect. Each field can have:
label- Field labelname- Field name/keytype- Field type (text,email,phone,select)placeholder- Placeholder textrequired- Whether field is requiredvalues- Options for select fields
Security
Require HMAC verification for user identity
Comma-separated list of domains where widget is allowed (prevents unauthorized usage)
Allow continuing conversations via email when visitor is offline
Advanced Configuration
User Identity
Set user information when visitor is logged in:HMAC Verification
Secure user identity with HMAC verification:Locale/Language
Set the widget language:en, es, fr, de, pt, pt_BR, ru, zh_CN, ja, ko, and more.
Widget Position
Customize widget position:Widget SDK Methods
Control the widget programmatically:Best Practices
Load the widget asynchronously to avoid blocking page rendering
Set user identity and custom attributes for better context
Use HMAC verification in production to prevent identity spoofing
Configure pre-chat forms to collect important information upfront
Set appropriate business hours and response time expectations
Test widget behavior on mobile devices
Use allowed domains to prevent unauthorized usage
Troubleshooting
Widget not appearing
Widget not appearing
- Verify the installation code is placed before
</body> - Check browser console for JavaScript errors
- Ensure
websiteTokenis correct - Check if domain is in allowed domains list
- Verify Content Security Policy (CSP) allows loading from Chatwoot domain
Widget showing but messages not sending
Widget showing but messages not sending
- Check if inbox is active in Chatwoot settings
- Verify agents are assigned to the inbox
- Check browser network tab for API errors
- Ensure WebSocket connections are not blocked by firewall
User identity not persisting
User identity not persisting
- Verify
identifieris set correctly - For HMAC verification, ensure hash is generated correctly
- Check that user information is set before widget loads

