Overview
The web chat widget is a lightweight, embeddable chat window that your website visitors can use to start conversations with your support team (and AI).
Setup steps
- Go to Projects → your project → Channels
- Create a new Web Chat channel
- Set the colours and wording under Appearance, and the pre-chat form under Home screen & chat flow
- Optional: to keep the widget on your own website only, add its address under URLs & domains → Allowed Origins
- Copy the embed code snippet
- Paste it into your website's HTML, just before the closing
</body>tag
If Allowed Origins is empty, the widget works on any website you paste it into. Add an address and it becomes a strict list: the widget then works only on the addresses listed, so nobody else can put your chat on their pages. Enter the full address including https://, and press Add — typing alone does not add it. Add www and non-www separately if your site answers on both, or the widget will not load on the one you left out.
Embed code
The embed code looks like this:
<script async src="https://chatonio.com/widget/loader.js" data-channel-id="YOUR-CHANNEL-ID"></script>
You never have to fill in YOUR-CHANNEL-ID yourself. The snippet on the channel page already carries your channel's id — copy it as it is.
Customization
You can customize the widget's appearance from the channel settings:
- Widget Color — the launcher and chat header colour
- Greeting Message — shown when the widget opens
- Pre-Chat Form — collect visitor name and/or email before chatting
- Launcher corner and Chat window corner — which corner the button sits in, and separately which corner the chat window opens in
Each section of the channel settings page shows its everyday settings first and keeps the rest behind an Advanced settings link. Click it to reach things like the corner and screen offsets, light/dark colour mode, the notification sound, the Chatonio badge, and the page rules that decide where the widget is allowed to appear. When an Advanced link shows a number, that many settings inside it differ from their defaults — so nothing you have configured is ever hidden without a hint.
The widget is fully responsive and works on mobile devices.
Custom pre-chat fields
The pre-chat form is not limited to name and email. In the Web channel settings, open Home screen & chat flow and look under Pre-Chat Form for Custom fields, where you can add your own fields — short text, email, phone, a longer message, a dropdown, or a checkbox — and mark any of them as required. Whatever visitors enter is saved with their contact and shown to your operators in the info panel next to the chat. Where each answer goes, and how (and when) it can be used for marketing emails, is explained in Collecting names, emails and other details in web chat.
Reaching out first
The same widget can also greet visitors on its own. In the Marketing area you can set up proactive messages — an automatic chat greeting that appears after a visitor has spent time on your site, opens a specific page, or is about to leave — as well as on-site popups and banners. A proactive greeting opens straight into a real conversation your AI handles, so nobody is left waiting. Proactive messages and popups are not on every plan: compare plans. See Proactive chat messages.
More about the web chat widget
Each of these articles covers one part of the widget in detail:
- Web chat widget: style and position — the twelve widget styles and their colors, trying changes in the live preview before saving, and the corners and offsets of the launcher and the chat window.
- Web chat widget: choosing a launcher — launcher styles and what goes inside them, the AI Orb and side-tab options, launcher text and size, which launcher older channels keep, and how No launcher differs from hiding the widget on a page.
- Web chat widget: light and dark mode — where to find Color mode, how Match the website reads your page, the dark brand color, overriding the mode from your own site, and how popups and the captcha panel follow it.
- Web chat widget: languages and translations — how the widget picks each visitor's language, translating your widget texts, and forcing a language with
data-lang. - Web chat widget: home screen and multiple conversations — the home screen, letting visitors keep several conversations open, past conversations, and links to your other contact channels.
- Web chat widget: controlling the chat from your site's code — opening the chat from your own buttons, links or JavaScript, starting a conversation with a ready-made message, and showing visitors from your app's built-in browser under your app's name.
- Web chat widget: signing visitors in with their account — signing the chat in with a pass from your server, so a visitor's chat history follows their account.