You must whitelist your domain before the widget will load. In the Lua AI admin dashboard, go to Chat Widget → Customization and add your website URL to the allowed sites list. The widget silently refuses to initialise on any domain not listed here.
Testing on localhost?localhost cannot be whitelisted — the dashboard approach will not work. You must pass your configuration inline and set environment: "production" explicitly:
There are two ways to get the widget running. The dashboard approach is recommended — it requires no code changes when you update settings.
Dashboard (Recommended)
Inline Config
Configure everything from the Lua AI admin dashboard and embed a single script with no payload.
1
Whitelist your site
In the admin dashboard, go to Chat Widget → Customization and add your website URL(s) to the allowed sites list. The widget will only load on whitelisted domains.
2
Configure in the dashboard
Set your agent behavior, appearance, and features directly in the dashboard UI — no code required.
3
Add the script
Copy and paste this code right before the closing </body> tag:
Refresh your page — the chat button will appear using your dashboard settings.
That’s it! Update appearance or behavior any time from the dashboard — no code deploys needed. ✨
Configuration priority: If you pass options to window.LuaPop.init({...}), those values override the dashboard settings. To use dashboard settings exclusively, call window.LuaPop.init() with no arguments.
Pass configuration directly in the script for full programmatic control, or to override specific dashboard values. This is also required when testing on localhost.
1
Add the Script
Copy and paste this code right before the closing </body> tag:
<script src="https://lua-ai-global.github.io/lua-pop/lua-pop.umd.js"></script><script> window.LuaPop.init({ agentId: "support-agent-id", chatTitle: "Customer Support", buttonText: "💬 Need Help?", position: "bottom-right", welcomeMessage: "Hi there! 👋 How can we help you today?", chatInputPlaceholder: "Describe your issue..." });</script>