Web widget

The web widget is a chat bubble you drop onto your site. Visitors open it and chat with your bot right there — no app, no account, no redirect.

Installing the widget#

  1. Open the Web widget card

    On your bot's Deploy tab, select the Web widget channel to generate its embed code.
  2. Copy the snippet

    Copy the generated script tag.
  3. Paste it into your site

    Add the snippet to your HTML, just before the closing </body> tag, on every page where the widget should appear.
  4. Publish

    Deploy your site. The chat bubble appears and connects to your bot.

The embed snippet#

The snippet looks like this — copy the exact one from your dashboard, since it carries your bot's identifier:

<script
  src="https://widget.virtuops.io/embed.js"
  data-bot-id="your-bot-id"
  async
></script>

Preview before you ship

Use the preview on the Deploy tab to see the widget with your bot before adding the snippet to production.

Good to know#

  • Add the snippet to a shared layout or template so it loads on every page at once.
  • The widget loads asynchronously and won't block your page from rendering.
  • Disconnecting the channel stops the widget from connecting, even if the snippet is still on the page.