Customize and extend the widget
For developers: open the chat from your own page, style it, and build it into your app.
- Open the chat from your own buttons and links
Turn any button or link on your site into a way into the chat, with no JavaScript.
- Control the widget with JavaScript
Open the chat, ask a question for the visitor, read its state and react to events from your own code.
- Verify signed-in users
Keep signed-in customers' chats on every device, and tell the AI agent who they are.
- Tell the AI agent about your visitor and page
Give the AI agent your visitor's plan and name, and the page they're on, with attributes or code.
- Show unread replies on your site
Put a badge with the number of unread replies on your own Help or Messages link.
- Send chat activity to your analytics
Forward chat opens, messages, form submissions and ratings to Google Analytics or any tracker.
- Match your site's theme and style the widget
Follow your site's dark mode, and restyle the widget with CSS variables and part names.
- Add the widget to a React or Next.js app
Mount the widget with one component, drive it with a hook, and get typed attributes in Vue and Svelte.
- Run two widgets on one page
Show two deployments on the same page, such as Sales and Support, and control each one.
- Load the chat after visitors accept cookies
Start the widget from your consent banner, and remove it and its stored data if consent is withdrawn.
- Install the widget with an AI coding assistant
Point your coding assistant at the widget's docs for AI tools, and check what it did.
- Debug the widget on your site
Turn on the widget's console log, send it to your error tracker, and check which version runs.
- Report your site's events to help.ai
Tell the AI agent what the visitor just did on your site, and count it, with track().