Documentation
Embed options
Every data-* attribute for the widget script: device and page targeting, lazy loading, and inline mode.
Script attributes
Add these attributes to the <script> tag. Only data-chatbot-id is required. Re-paste the updated snippet after changing any attribute.
| Attribute | Values | Default | Description |
|---|---|---|---|
| data-chatbot-id | string | — | Required. Your chatbot's ID. |
| async | flag | off | Recommended. Loads the script without blocking page render. |
| data-lazy | true | false | false | Defer building the widget until the page is idle or the visitor interacts (best for page speed). Floating mode only. |
| data-devices | all | desktop | mobile | all | Only show the widget on the given device type. |
| data-pages | all | specific | all | Whether to limit the widget to specific URL paths. |
| data-page-match | include | exclude | include | With data-pages=“specific”: show only on, or hide on, the listed paths. |
| data-page-paths | comma list | — | Paths for targeting, e.g. “/pricing,/docs”. Matches a path or its prefix. |
| data-inline | true | false | false | Render inside a container instead of a floating bubble. |
| data-target | CSS selector | — | Inline mode: the element to render the chat into (e.g. “#embedmybot-chat”). |
| data-height | pixels | 600 | Inline mode: height of the embedded chat. |
Targeting examples
Desktop only
html
<script async src="https://www.embedmybot.com/widget.js"
data-chatbot-id="YOUR_CHATBOT_ID"
data-devices="desktop"></script>Only on the pricing and docs pages
html
<script async src="https://www.embedmybot.com/widget.js"
data-chatbot-id="YOUR_CHATBOT_ID"
data-pages="specific"
data-page-match="include"
data-page-paths="/pricing,/docs"></script>Everywhere except checkout
html
<script async src="https://www.embedmybot.com/widget.js"
data-chatbot-id="YOUR_CHATBOT_ID"
data-pages="specific"
data-page-match="exclude"
data-page-paths="/checkout"></script>