Web widget
Configure the web widget
Script tag attributes and launcher position.
Content, theme and custom CSS are set per widget in Mentiora admin. The script tag controls how the widget sits on a particular page.
Script attributes
| Attribute | Purpose |
|---|---|
data-key | Required. Your embed key, pk_wgt_ followed by 12 characters. |
data-hide-launcher | "true" hides the default launcher. Open the chat with the JavaScript API. |
data-variant | bubble or pill. Overrides the variant saved in admin, so the page stops following later changes there. |
data-anchor | CSS selector for the element the pill variant positions itself against. Ignored by bubble. |
data-scroll-host | CSS selector for your scroll container, when the page scrolls an inner element instead of the window. |
data-thread-id | A thr_… thread to open instead of resuming the visitor's active one. |
data-launcher-offset-bottom | Whole pixels to move the bubble launcher up from the bottom edge. Negative moves it down. |
data-launcher-offset-right | Whole pixels to move the bubble launcher in from the right edge. Negative moves it out. |
Launcher position
The data-launcher-offset-* attributes move the launcher on every screen size. To move it on some screen sizes only, for example to clear a mobile bottom bar, set the CSS custom properties on your page instead:
CSS
@media (max-width: 767px) {
:root { --mw-launcher-offset-bottom: 70px; }
}--mw-launcher-offset-right works the same way. Both add to the default corner inset, so 0 leaves the launcher where it is. The chat panel follows the launcher.