Embed Code
Add this snippet before the closing</body> tag of your website:
YOUR_WIDGET_ID and YOUR_CONFIG_TOKEN with the values from the widget configuration page. The exact snippet with pre-filled tokens is available under Chat Widgets > Installation.
For authenticated users, see Identity Verification.
Content Security Policy (CSP)
If your site uses a Content Security Policy, add the following directives to allow the widget:- script-src — allows loading the widget script.
- frame-src — allows the widget iframe to load.
Data Attributes
Configure the widget declaratively by setting attributes on the script tag. Everything except the widget ID is optional.By default the widget boots automatically once the page loads. Set
data-disable-autoboot and call Decimal.boot() when you need to pass a user_token or metadata — for example after your app knows who the signed-in user is.Display Modes
Control how the widget appears using thedata-display-mode attribute:
Hiding the Launcher Button
Hide the default launcher button withdata-hide-button:
Decimal.show() and Decimal.hide() to control visibility. Useful for custom trigger buttons or embedding in iframes.
Customization
Customize colors, position, sizing, and content withDecimal.theme(). Can be called before or after the widget loads.