Docs menu

Web widget

Install the web widget

Add the widget script to your website and allow your site's origin.

The install snippet is a script tag. It adds a chat launcher to the page and loads the chat in an iframe. Visitors chat anonymously until your page signs them in.

Copy the snippet

Open your widget in Mentiora admin and go to the Install tab. Copy the install snippet from there: it has your embed key and widget origin filled in.

HTML
<script
  defer
  src="https://widget.<your-workspace>.mentiora.ai/v1/loader.js"
  data-key="pk_wgt_…"
></script>

Paste it once, anywhere in the page. data-key is the embed key. It is public and grants nothing on its own.

Only the first copy of the loader on a page runs. A second copy, for example one in your template and one in a tag manager, is ignored with a console warning.

Allow your site's origin

Add your site's origin under Allowed origins on the same tab. The loader does not mount on any other origin, so add your staging site too.

Reload the page to see the launcher.

Content Security Policy

With a strict CSP, allow the loader's origin in script-src, and the widget origin in frame-src and connect-src. If you add the inline identify block from Identify users, give it your nonce, or call mentiora("identify", …) from your own bundle.