window.TarsConfig object, and what the widget receives from the host page.
The script tag
Copy the snippet from Distribute → Widget Embed on the agent, under the HTML tab. Paste it before the closing</body> tag.
data-region. The HTTP APIs use a per-region base URL instead, listed in API authentication.
The script adds a floating launcher in a shadow DOM, so host-page CSS cannot break it. The widget iframe is preloaded when the page goes idle, or on first hover of the launcher, whichever comes first.
window.TarsConfig
Setwindow.TarsConfig before the script tag runs to pass options and data about the end user.
Values from
TarsConfig are unverified browser data. They personalize the conversation but never overwrite a verified identity.
Locale resolution
The widget locale resolves in this order, using the first value present.TarsConfig.lang- The host page’s
?lang=URL parameter - The browser’s
navigator.language
en-US resolves to en.
Context passed to the widget
The script collects context and passes it to the iframe as a base64urlctx parameter, at the moment the iframe is built.
The encoded context is capped at 6000 characters. Over the cap,
attributes is dropped first. If the remainder still exceeds the cap, no context is sent.
