Web JS SDK
CSP, privacy & accessibility
Content-Security-Policy directives, which URL data the widget reports, and accessibility behaviour of the STINGIM widget.
Content Security Policy
If your site sends a Content-Security-Policy header, allow the widget's script and iframe:
Text
script-src https://app.stingim.com;
frame-src https://app.stingim.com;- Your page does not need
connect-srcentries: all API and WebSocket traffic happens inside the widget iframe and is governed by the widget's own CSP. - No
style-srcchanges are needed. The loader only sets inline styles on the iframe element through the CSSOM, which'unsafe-inline'does not restrict.
Privacy
The widget sends the server only the URL information needed for attribution:
- The page URL, referrer and browsing trail are stripped of their query string before they are reported, except for
utm_*,stg_tagandstg_l. - URL fragments (
#…) are dropped, except a hash-router path such as#/cart. - If you renamed the entry-tag parameter in the console (for example to
ref), add it tostingImSettings.keepQueryParams, otherwise it is not reported.
JavaScript
window.stingImSettings = Object.assign(window.stingImSettings || {}, { keepQueryParams: ['ref'] });The widget's app_secret and other install parameters are sent to the iframe by postMessage only; they are never added to the iframe URL or browser history. The widget does not show STINGIM branding to your visitors.
Accessibility
- The widget iframe has a
title("Customer support chat", or the Chinese equivalent when the visitor's browser prefers Chinese). - The launcher button has
aria-haspopup="dialog"andaria-expanded. - New agent messages are announced through an
aria-live="polite"region. - Opening the panel moves focus into it;
Esccollapses it.
Found a mistake? Email [email protected]
