Skip to content

Widget embed

The script tag, every data attribute it accepts, and how the widget resolves its chatbot and configuration.

The fastest way to put evoriqa on a page is the embed script. If you need your own interface instead, see Public endpoints.

The script tag

index.html

Place it before the closing </body> tag on every page the widget should appear on.

Attributes

Without data-chatbot-id the script logs an error and does nothing:

How it resolves a chatbot

  1. 1
    The script finds its own tag by the data-chatbot-id attribute.
  2. 2
    It requests that chatbot's public configuration.
  3. 3
    The request carries the page's Origin, which is checked against the

    chatbot's allowed domains. A disallowed origin returns DOMAIN_NOT_ALLOWED and nothing renders.

  4. 4
    The returned configuration — branding, greeting, suggested questions, lead

    capture, online/away state — drives the UI.

That configuration is cached for up to about a minute, so a settings change can take that long to appear; saving in the dashboard clears the cache.

Isolation

The widget renders inside a Shadow DOM. Your page's CSS cannot reach into it, and its styles cannot leak out. That is why appearance is configured through the dashboard's Appearance settings and its custom CSS field rather than through your own stylesheet.

help.html

Same chatbot, same knowledge, answered inline instead of in a floating panel.

What the widget gives you for free

Conversation persistence across reloads, streaming replies, markdown rendering, a typing indicator, keyboard and screen-reader accessibility, per-answer thumbs feedback, an end-of-chat CSAT card, transcript download, an unread badge, retry on a failed send, and the away state outside business hours.

Rebuilding those is the real cost of a custom frontend — worth knowing before you choose Public endpoints.

Where to go next

Last updated