Chat widget
One script tag, no dependencies. Drops into any HTML page, renders in its own shadow DOM, and starts collecting messages immediately.
Install
Copy the snippet from Settings → Installation — it comes pre-filled with your workspace ID, with tabs for plain HTML, WordPress, React, and Next.js. The plain-HTML version:
<script async src="https://leadiosa.com/widget.js" data-workspace="YOUR_WORKSPACE_ID"> </script>
The script loads asynchronously, mounts a launcher button in the corner, and connects to the real-time backend when the visitor opens the chat.
Data attributes
| Attribute | Default | Description |
|---|---|---|
data-workspace | — | Required. Your workspace ID from Settings → Installation. |
data-title | From workspace settings | Overrides the chat panel heading for this page. |
data-color | From workspace settings | Overrides the accent color for this page (any CSS color). |
Everything else — welcome text, launcher position, required visitor fields, offline behaviour — is configured per workspace in Settings → Widget and applies everywhere the widget is installed, no redeploy of your site needed.
The launcher sits bottom-right by default; switch to bottom-left during onboarding or later in Settings → Install — it takes effect everywhere the widget loads, including through the WordPress plugin.
Appearance and language
The widget ships in eleven languages and picks the visitor's automatically from navigator.language, falling back to English.
It renders inside a closed shadow DOM, so your site's CSS never bleeds into the widget and the widget's styles never leak out. It won't conflict with React, Vue, htmx, or anything else on the host page.
Targeted messages
Instead of greeting everyone the same way, the widget can open with a message written for what the visitor is actually doing — lingering on the pricing page, returning for a second visit, or moving the cursor toward the browser bar with a full cart.
Rules are authored in Settings → Widget → Targeted messages and evaluated in the visitor’s browser, so a rule costs no extra request on your site and works on pages served from a cache or CDN. The first rule that matches wins — two messages never stack on one visitor.
A rule can require any combination of: page URL contains (or does not contain) a fragment, referrer, utm_source, visit number, scroll depth, exit intent, device type, and whether anyone is available to reply. Each rule also sets its delay and how often one person may see it — once per visit, once ever, or on every page.
Hosted chat page
Every workspace also gets its chat as a standalone page — a link that works with no website at all. Put it in an Instagram bio, behind a QR code by the counter, or in an email signature; messages land in the same inbox as the widget, with the same greeting, colours, pre-chat fields and AI agent.
https://leadiosa.com/chat/YOUR_WORKSPACE_ID
Copy your link from Settings → Widget → Chat page . The page is deliberately not indexed by search engines — it is a conversation surface, not content.
Allowed domains
By default the widget answers on any domain that embeds your workspace ID. To stop someone else from mounting your widget on their site, list your domains under Settings → Widget → Allowed domains. Once the list is non-empty, the backend rejects widget sessions from any other origin.
Controlling it from your code
Once loaded, the widget exposes a small global — window.LeadiosaChat — for driving the panel from your own buttons and links:
LeadiosaChat.open(); // open the chat panel LeadiosaChat.close(); // close it LeadiosaChat.toggle(); // toggle open/closed
Prefer event-driven wiring without touching globals? Dispatch the equivalent events on window:
document.querySelector("#talk-to-us").addEventListener("click", () => {
window.dispatchEvent(new Event("leadiosa:open"));
});
// also available: "leadiosa:close", "leadiosa:toggle"Files and attachments
Visitors can attach a file to a chat message, and operators can send files back. Accepted types: PNG, JPEG, GIF and WebP images, PDF, plain text, CSV, Word (.doc/.docx), Excel (.xls/.xlsx) and ZIP. Anything else is refused with a message rather than silently dropped.
Size and count depend on the plan: Free allows 2 MB per file and 5 files per conversation, Pro 10 MB and 15, Pro Plus 50 MB with no per-conversation limit. Images preview inline in the inbox; other types are offered as a download.
Privacy and consent
When a visitor sends a message, you (the workspace operator) become the data controller for that message under GDPR — see our GDPR page for the full breakdown.
We recommend mentioning live chat in your privacy notice, and (if your cookie banner gates non-essential scripts) only loading widget.js after the visitor opts in. The widget stores a session identifier in the visitor's browser so they can return to the same conversation later.
If a visitor left their email, Leadiosa emails them automatically when they go offline mid-conversation — every reply they haven't read yet, plus the full chat log, sent once about fifteen minutes after your last message so they don't miss you.