Embed the widget
Widget features
The Glozr widget is more than a chat box. It persists conversations, accepts voice input, captures leads, surfaces citations, and supports a real-time human handoff — all from the same Shadow-DOM bundle.
Conversation persistence
On first contact, each visitor gets a unique anon_id stored in localStorage. When they return within 24 hours, the widget rehydrates the prior thread — the init response ships the last 30 messages so the chat reopens exactly where it stopped.
A Clear conversation control writes a timestamp without erasing history; the messages stay available for analytics and lead tracking, the visitor just sees a fresh thread.
Voice input
A microphone button lets visitors dictate messages using the browser's native SpeechRecognition API. While recording, an animated sonar ring signals the active state; clicking again ends the capture and inserts the transcript. Browsers without SpeechRecognition support — Firefox, older Safari — simply don't render the button.
Lead capture
The widget collects contact info through several triggers:
- A behavior rule fires whose
kindislead_capture. - The visitor expresses contact intent ("call me", "email me a quote").
- A custom CTA button configured with the
lead_captureaction is clicked.
Default fields are name and email; phone, company, and custom parameters can be added per agent. Captured leads POST to /v1/widget/leads and surface in the workspace inbox in real time.
Intent-based capture
The agent can also surface the lead form proactively when the conversation looks sales-shaped — pricing questions, demo requests, scoping questions — without waiting for a hard-coded keyword.
Human takeover
When a teammate claims the conversation from the inbox, the widget swaps the agent badge for a Human is here indicator. The AI pauses; visitor messages route to the operator, and operator replies stream back as part of the same thread.
Citations
Source references appear as numbered chips beneath agent replies. Visitors can click through to verify the answer against the underlying document — useful for trust and for spotting outdated sources you should refresh.
Streaming and retries
Replies stream token-by-token over Server-Sent Events. On transient failures the widget retries up to three times before surfacing an error, so brief network blips don't kill an in-flight message.
Branding and storage
The default footer reads Powered by Glozr; eligible plans can hide it via the remove_branding feature flag. Client-side storage is intentionally minimal — only anon_id and the conversation clear-state live in localStorage. No personally identifiable information is kept on the visitor's machine.