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.

AttributeValuesDefaultDescription
data-chatbot-idstringRequired. Your chatbot's ID.
asyncflagoffRecommended. Loads the script without blocking page render.
data-lazytrue | falsefalseDefer building the widget until the page is idle or the visitor interacts (best for page speed). Floating mode only.
data-devicesall | desktop | mobileallOnly show the widget on the given device type.
data-pagesall | specificallWhether to limit the widget to specific URL paths.
data-page-matchinclude | excludeincludeWith data-pages=“specific”: show only on, or hide on, the listed paths.
data-page-pathscomma listPaths for targeting, e.g. “/pricing,/docs”. Matches a path or its prefix.
data-inlinetrue | falsefalseRender inside a container instead of a floating bubble.
data-targetCSS selectorInline mode: the element to render the chat into (e.g. “#embedmybot-chat”).
data-heightpixels600Inline 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>