In development

Install the messenger on your website

Paste one snippet and visitors can chat with your team from any page.

Written by OngoingAIUpdated

The messenger is the chat bubble in the corner of your website. Installing it takes one snippet, and it works on any site: plain HTML, a site builder, or an app built with React, Next.js, Vue or anything else.

The messenger on a website, greeting a visitor with quick replies

1. Copy your snippet

Go to Settings → Messenger. Your snippet already includes your workspace's key:

Settings, Messenger: your snippet with a copy button
<script>
  window.intercomSettings = { app_id: "YOUR_WIDGET_KEY" };
  (function () { var i = function () { i.c(arguments); }; i.q = []; i.c = function (a) { i.q.push(a); }; window.Intercom = i; })();
</script>
<script async src="https://app.ongoing.ai/widget/widget.js"></script>

2. Paste it on every page

Add it just before the closing </body> tag, in your site's shared layout or template so it's on every page. In Next.js, add it to your root layout with next/script:

import Script from "next/script";

// app/layout.tsx, inside <body>
<Script id="ongoingai-settings" strategy="afterInteractive">
  {`window.intercomSettings = { app_id: "YOUR_WIDGET_KEY" };
  (function () { var i = function () { i.c(arguments); }; i.q = []; i.c = function (a) { i.q.push(a); }; window.Intercom = i; })();`}
</Script>
<Script src="https://app.ongoing.ai/widget/widget.js" strategy="afterInteractive" />

3. Check it works

  1. Reload your site. The chat bubble appears in the bottom-right corner.
  2. Open it, choose Send us a message, and send a test.
  3. The conversation appears in your inbox under Unassigned.

Coming from Intercom?

The messenger understands Intercom's snippet and commands, so Intercom('show'), Intercom('hide'), Intercom('showNewMessage', 'Hi!') and Intercom('shutdown') keep working. Swap the script tag and the key, and your existing buttons and links still open the messenger.

If it doesn't appear

  • Content Security Policy: if your site sends a CSP header, allow https://app.ongoing.ai in script-src, img-src and connect-src, plus wss://app.ongoing.ai in connect-src.
  • Order: keep the settings script before widget.js, and include both once, in your layout.
  • Still nothing? Look in your browser's console for messages starting with [ongoingai].

Still have questions?

Ask us in the chat and someone on the team will get back to you.