Developers
Web Chat Widget SDK
Integrate the Qwetty web chat widget into your website for real-time customer communication.
Installation
Add the widget script to your website:
Code
Configuration options
Pass configuration via data- attributes on the script tag:
| Attribute | Description | Default |
|---|---|---|
data-channel-id | Your web chat channel ID (required) | — |
data-position | Widget position: left or right | right |
data-color | Primary color (hex) | #0066ff |
data-title | Chat window title | "Chat with us" |
How it works
- The widget loads and displays a chat button on your page
- When a visitor clicks, a chat window opens
- If "require form before chat" is enabled, the visitor fills in their details first
- A guest chat session is created on the Qwetty backend
- Messages are exchanged in real-time via WebSocket
- Your team sees the conversation in the Qwetty inbox
Guest sessions
Web chat visitors don't need to log in. Each visitor gets a guest session tied to the channel. If the visitor provides their name or email (via the pre-chat form), a contact is created in your directory.
Framework examples
React
Code
Next.js
Code
Next steps
- Web Chat Widget — Channel setup and design configuration
- Channel Configuration — Advanced widget settings
Last modified on