Install the widget
Use one installation per page and keep the same snippet as your settings evolve.
Get your installation snippet
In Settings → Chat widget, select your workspace and copy Embed code. The full snippet defines the queued SDK before loading the script asynchronously. Paste it before the closing body tag.
<script>
window.TruComWidgetConfig = { color: '#111111' };
window.TruComWidget = window.TruComWidget || { q: [] };
TruComWidget.q.push(['on', 'ready', function (event) {
console.log('Support is ready');
}]);
</script>
<script async src="https://trucom.app/widget/loader.js"
data-trucom-widget="YOUR_WIDGET_PUBLIC_KEY"></script>Call before the loader finishes
Use the full Settings snippet for direct early calls such as TruComWidget.identify(...). If you keep a legacy one-line loader, use the queue before readiness.
window.TruComWidget = window.TruComWidget || { q: [] };
TruComWidget.q.push(['identify', { name: 'John Doe' }]);
TruComWidget.q.push(['on', 'open', function (event) {
console.log('Widget opened');
}]);Call after readiness
await TruComWidget.ready();
await TruComWidget.identify({ name: 'John Doe' });
await TruComWidget.open();Allowed domains and CSP
Add every host that embeds the widget, including development hosts, in widget settings. Wildcards follow the configured domain rules. For a content security policy, allow the widget origin in script-src, frame-src and connect-src, and allow its served fonts and images as needed. A blocked loader cannot deliver SDK readiness.
Do not put an identity signing secret or privileged API credential in the snippet. Load only one widget key per page. Existing snippets continue to work without the new bootstrap, but direct calls must wait until their methods exist.