Install the chat

Put the widget on your site with one line of code.

Add the script

  1. Open Settings › Install and copy your snippet. It has your workspace's key in it.
  2. Paste it before </body> on every page of your site.
  3. Open your site. The chat button is in the corner.

It looks like this:

HTML

<script src="https://YOUR_DOMAIN/widget.js" data-workspace="ws_YOUR_KEY" async></script>

The key in the snippet is public. It only says which workspace the chat belongs to.

Where to paste it

Your siteWhere
Plain HTMLBefore </body> in each page or the shared template
WordPressA plugin that adds code to the footer
Shopifytheme.liquid, before </body>
Google Tag ManagerA Custom HTML tag on all pages
Next.jsThe layout, as below

JavaScript

import Script from "next/script";

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script src="https://YOUR_DOMAIN/widget.js" data-workspace="ws_YOUR_KEY" />
      </body>
    </html>
  );
}

Make it yours

Settings › Appearance has the color, the logo, the header pattern, the greeting, and light or dark mode.

If it doesn't show

  • Check that data-workspace is there and complete.
  • If your site has a Content Security Policy, allow your whileisleep domain in script-src and connect-src.
  • Look for a blocked widget.js in the browser's developer tools, under Network.

Next

Tell the chat who your signed-in users are, or open it from your own button: see Widget in code.