LiveChat Widget Demo (Modular)

1. Floating Widget (Default)

Look at the bottom-right corner for the floating chat button.

2. Integration Code

Use this code to integrate the widget into your website:

<script src="https://livechatgs.web.app/livechat-widget.js" crossorigin></script> <div id="livechat-container"></div> <script> document.addEventListener("DOMContentLoaded", function() { var chatWidget = new LiveChat({ widgetId: "{bot.bot_token}", title: "{bot.bot_name}", agentName: "AI assistant", primaryColor: "#0ED0A7", position: "right" }); chatWidget.mount("livechat-container"); }); </script>

3. Auto-initialization with data attributes

<script src="https://livechatgs.web.app/livechat-widget.js" data-widget-id="{bot.bot_token}" data-title="{bot.bot_name}" data-ws-url="wss://backend.generalsecret.com/api/livechat/ws"></script>