Configuration Approaches
You can configure the widget in two ways — choose what works best for your workflow:Dashboard Settings
Configure appearance and behavior in the Lua AI admin dashboard. Call
window.LuaPop.init() with no arguments — the widget pulls settings automatically.Inline Config
Pass configuration directly to
window.LuaPop.init({...}). Useful for dynamic values or overriding specific dashboard settings.Configuration priority: Inline config passed to
window.LuaPop.init({...}) always takes priority over dashboard settings. To rely entirely on dashboard settings, call window.LuaPop.init() with no arguments.Site Whitelisting
1
Open the dashboard
Go to the Chat Widget section in your Lua AI admin dashboard.
2
Add your domain
Under Customization, add each domain where you want the widget to appear (e.g.
https://yoursite.com).3
Save
Save your settings. The widget will only initialise on whitelisted domains — requests from unlisted origins are blocked.
Installation Methods
CDN Script
Quickest setup — no build process
NPM Package
For modern frameworks and build tools
CDN Installation (Recommended)
Perfect for static websites, WordPress, Shopify, or any HTML page.Step 1: Add Script Tag
Add this code right before the closing</body> tag:
Step 2: Initialize
Using dashboard settings (recommended):Complete Example
NPM Installation
For React, Vue, Angular, or other modern frameworks.Step 1: Install Package
Step 2: Import and Use
- React
- Vue 3
- TypeScript
Platform-Specific Installation
WordPress
1
Access Theme Editor
Go to Appearance → Theme File Editor
2
Edit footer.php
Find your theme’s
footer.php file3
Add Script
Add before
</body>:Shopify
1
Access Theme Editor
Go to Online Store → Themes → Edit code
2
Edit theme.liquid
Find
theme.liquid in Layout folder3
Add Script
Add before
</body>:4
Save and Test
Click Save and view your store
Wix
1
Add Custom Code
Go to Settings → Custom Code
2
Add to Body End
Click + Add Custom Code → Body - end
3
Paste Code
4
Apply to All Pages
Select “All pages” and click Apply
Squarespace
1
Access Code Injection
Go to Settings → Advanced → Code Injection
2
Add to Footer
In the Footer section, add:
3
Save
Click Save and your chat widget will appear on all pages
Webflow
1
Open Project Settings
Go to Project Settings → Custom Code
2
Add to Footer Code
Paste in Footer Code section:
3
Publish
Publish your site to see the widget
Single Page Applications
React
Next.js
More Framework Examples
Vue, Angular, Svelte, and more
Verification
Check Installation
Open your website and verify:1
Chat Button Appears
Look for the chat button in your chosen position
2
Button Opens Chat
Click the button - chat window should open
3
Chat Responds
Send a test message - AI should respond
4
No Console Errors
Check browser console (F12) - no errors should appear
Browser Console Check
Environment Variables
For different environments, use environment variables:- React/Next.js
- Vue
- Angular
Security Considerations
Best Practices
- ✅ Use environment-specific agent IDs
- ✅ Use
stagingenvironment for development - ✅ Generate unique session IDs per user
- ✅ Don’t store user PII in
runtimeContext - ✅ Use HTTPS on your website
Example Secure Setup
Next Steps
Configuration
Complete configuration reference
Customization
Style the widget to match your brand
Examples
See real-world implementations
Troubleshooting
Common issues and solutions

