Chat
The web chat the Zoie website widget opens: what visitors can and can't do in it, how a conversation starts, resumes and ends, what data it sends to Zoie and keeps in the visitor's browser, and its analytics.
The web chat is the panel that opens from the website widget. It isn’t a separate embed. It comes with the widget snippet and talks to the AI agent assigned to that widget. Conversations appear in your Zoie inbox like any other channel, and your team can reply from there.
What visitors can do
| Capability | How it works |
|---|---|
| Chat with the agent | Typed messages go to the widget’s AI agent, which answers using its skills and knowledge. Messages are sent as plain text: HTML tags are stripped, and anything over 5,000 characters is cut off. |
| Speak with the agent | A voice call in the browser, using the visitor’s microphone. The call is logged in Zoie as a call. |
| Tap a suggested question | Your suggested questions are listed in the open widget. Tapping one sends it as the visitor’s first message. See Interaction settings. |
| Fill in a pre-chat form | With Require Lead Info, the visitor gives the fields you chose before the first message. See Capturing leads. |
| Talk to your team | A reply someone sends from the Zoie inbox appears in the open chat straight away. See Human handoff. |
| Book an appointment | Through the conversation, when the agent has a booking skill. See Skills. |
| Carry on across pages | The conversation follows the visitor from page to page, and resumes if they come back later. See Conversation lifecycle. |
| End and rate the chat | Ending a chat or call shows Did I help you today? with a rating and an optional comment. Ratings appear on the widget’s Analytics tab. |
What it can’t do
- Visitors can’t send files or images. There is no upload in the chat.
- No calendar inside the widget. The widget’s appointment button is switched off for all widgets for now, so bookings happen through the conversation.
- No JavaScript API. Your page can’t open or close the chat, pre-fill a field, pass in a signed-in user’s identity, or listen for events such as “lead captured”. To act on new widget leads, use a workflow with a Send webhook step. See Webhooks overview.
- No custom CSS. Colours, position, icons and size come from Widget appearance. The widget’s internal class names aren’t a supported styling interface and can change.
- One widget per page. See More than one widget.
- No chat while AI is off. If AI is switched off for the business or for the widget channel, the launcher isn’t shown and Zoie refuses to start chats.
Conversation lifecycle
- Start. Clicking Chat with Agent starts a chat session for this widget and links it to a lead. A visitor who filled in the pre-chat form is matched to an existing lead by email or phone number, or gets a new one. Leads from the widget have the lead type
Web_Lead. - Talk. Each message is saved to the conversation in Zoie and passed to the agent. The agent’s reply comes back in the response to the message. A WebSocket stays open alongside, so replies your team sends from the inbox appear too.
- Move around. The browser keeps a pointer to the conversation and a copy of the last 100 messages. On the next page, the widget reopens on the same view and shows the thread at once, then asks Zoie for the authoritative history, which includes any replies your team sent in the meantime.
- Come back later. Zoie resumes a conversation that has been idle for up to 24 hours by default. After that, the visitor’s next chat starts a new conversation, still linked to the same lead.
- End. End chat closes the session and asks for a rating.
A returning visitor is recognised by a random visitor ID and the lead ID kept in their browser, not by a cookie. A different browser or device, a private window or cleared site data means a new anonymous visitor.
Data captured
Sent to Zoie
| Data | When | Where it ends up |
|---|---|---|
| Pre-chat form fields: name, phone, email, notes and any custom fields you picked | Before the first message, with Require Lead Info | The lead |
| Messages | As they are sent | The conversation, in the inbox and on the lead |
| Contact details the agent collects | During the conversation, if its skills save them | The lead |
| Voice call | During a call | The call log and the lead |
UTM parameters: utm_source, utm_medium, utm_campaign, utm_term, utm_adgroup, utm_matchtype, utm_device, utm_network | When a chat, call or pre-chat form starts | The lead’s tracking fields |
Google Ads click IDs: gclid, gbraid, wbraid | Same | The lead, for offline conversion reporting |
| Ad consent state | Same, only if your page declares one | The lead. See Ad consent. |
| The page’s domain | When the pre-chat form creates a lead | The lead’s website field |
| Page URL and referrer | With each analytics event, and with the presence ping every 15 seconds while the widget is loaded | The widget’s Analytics tab |
| IP address | Every request | Rate limiting, and checks against the business’s blocked contacts |
UTM parameters are read from the page URL when the conversation starts. Click IDs come from the URL first, then from gtag’s _gcl_aw and _gcl_gb cookies if your site has them, then from an earlier visit. A visitor whose phone, email or IP address is on the business’s block list doesn’t become a lead. See Leads overview.
Kept in the visitor’s browser
The widget doesn’t set cookies of its own. It uses localStorage and sessionStorage on your site’s origin:
| Key | Storage | Holds | Kept for |
|---|---|---|---|
zoie_widget_visitor_id | localStorage | A random visitor ID | Until cleared |
zoie_widget_visitor | localStorage | The business ID and the visitor’s lead ID | Until cleared |
zoie_widget_chat_session:<business>:<widget> | localStorage | The conversation pointer and the last 100 messages | 24 hours after the last update |
zoie_widget_seen | localStorage | A flag for the returning-visitor greeting | Until cleared |
zoie_widget_click_ids | localStorage | Google Ads click IDs | 90 days. Not written when ad consent is denied. |
zoie_widget_view_state:<business>:<widget> | sessionStorage | Whether the panel is open, and on which view | The browser tab |
zoie_widget_utm | sessionStorage | UTM parameters already captured | The browser tab |
zoie_widget_analytics_session | sessionStorage | The analytics session ID | The browser tab, renewed after 30 minutes idle |
Analytics
The widget reports usage in two separate streams.
- Zoie’s widget analytics. Page views, launcher clicks, conversations, captured leads and live visitors are sent to Zoie and shown on the widget’s Analytics tab. They’re part of the product and can’t be switched off from the page. See Widget analytics.
- Product analytics. The production bundle also sends anonymous usage events to Zoie’s PostHog project at
https://us.i.posthog.com. Events are anonymous by default and carry the visitor ID, the page URL and the widget’s IDs. This stream uses no PostHog library, so it doesn’t set PostHog cookies or record sessions. Adddata-analytics="off"to the script tag to stop it for your site. Your Analytics tab isn’t affected. See Configuration.
| Event | Sent when |
|---|---|
widget_loaded | The widget’s settings load, or fail to load. |
widget_opened | The visitor opens the panel. |
conversation_started | A chat or call begins. |
message_sent | The visitor sends a message. Only its position and length are sent, not its text. |
voice_call_started, voice_call_ended | A call connects, and ends. |
lead_created | The visitor submits contact details. |
appointment_booked | A booking made in the widget succeeds. |
human_handoff | A reply from your team arrives. |
conversation_completed | The conversation closes, with an outcome such as booked, lead_created or abandoned. |