Nuxt
Add the chat widget to a Nuxt 3 app with a client-only plugin, so the loader runs in the browser and never during server rendering.
Where it goes
On Nuxt the snippet lives in a plugin file ending in .client.ts under plugins/. It is one script tag; it loads asynchronously and never blocks the page.
export default defineNuxtPlugin(() => {
const w = window as any;
w.sellioSettings = { widgetKey: "your-widget-key" };
w.SellioWidget = w.SellioWidget || [];
const s = document.createElement("script");
s.src = "https://sellio.chat/widget/embed.js";
s.async = true;
document.head.appendChild(s);
});Replace your-widget-key with the key from Settings, then Install. The key is public and safe to commit: it names the workspace and carries no permissions.
Steps
- 1In Sellio, open Settings, then Install, and copy your widget key.
- 2Create plugins/sellio.client.ts with the code below. The .client suffix keeps it off the server.
- 3Nuxt registers plugins automatically; no nuxt.config change is needed.
- 4After sign-in, call window.SellioWidget.setVisitor from wherever you know the user.
- 5Run the app; the launcher should be in the bottom corner.
Identify visitors
When your site knows who is signed in, tell the widget so the inbox shows a name and email instead of a visitor id. Safe to call before the loader has finished; commands queue until it is ready.
window.SellioWidget = window.SellioWidget || [];
window.SellioWidget.push(["setVisitor", {
id: "your-user-id",
name: "Ada Lovelace",
email: "ada@example.com",
}]);To stop anyone spoofing a name, sign the id on your server and pass it as userHash; see Identity verification.
Verify
Open the live site, send a message from the launcher, and check your inbox. If the launcher does not appear, the usual causes are a cache that still serves the old page, a visibility rule in Settings, then Visibility that hides it on this page or device, a domain missing from Allowed domains under Settings, then Install, or a snippet pasted into a page-level box rather than the site-wide one.
Updated . Something wrong or missing? Tell us.