Integration Guide
Add the LaunchChat widget to your website in your preferred framework.
Installation
Add this code before the closing </body> tag:
<!-- LaunchChat Widget -->
<script>
window.LaunchChatConfig = {
widgetId: "YOUR_WIDGET_ID"
};
</script>
<script src="https://your-domain.com/widget.js" async></script>Content Security Policy (CSP)
If your site uses CSP headers, add these domains:
Content-Security-Policy:
script-src 'self' https://your-launchchat-domain.com;
connect-src 'self' https://your-launchchat-domain.com;
frame-src 'self' https://your-launchchat-domain.com;Security Considerations
Widget ID is Public
The Widget ID is designed to be public and embedded in your client-side code. It only allows read access to your knowledge base and chat functionality. No sensitive operations can be performed with just the Widget ID.
Domain Restrictions
You can restrict which domains can embed your widget in the dashboard under Widget → Behavior → Allowed Domains. If set, the widget will only work on those domains.
Verify Installation
After adding the code, verify the widget loads correctly:
- Open your website in a browser
- Look for the chat button in the bottom-right corner
- Click it to open the chat window
- Send a test message to verify it works
If the widget doesn't appear, check the browser console for errors and ensure your Widget ID is correct.