Install the live chat widget
Add the Lunadesk chat to any website with one script tag.
Add the Lunadesk chat to any website with one script tag.
The live chat widget puts a launcher button on your site; visitor messages arrive in the Inbox like any other ticket.
Add a Live chat widget channel and give it a name (e.g. Main store). Open the channel and, on the Embed snippet tab, copy the widget key. The key is public — it is meant to live in your site's HTML.
Add it to the <head> of every page where the chat should appear. That is the whole installation: the widget boots automatically and renders its launcher.
<script
src="https://app.lunadesk.ai/api/v1/widget/v1/widget.js"
data-key="lw_YOUR_KEY"
defer
async
></script>Nothing else to wire up. The widget keeps the visitor's session and conversation across page loads and refreshes, so you only need the snippet.
Platform notes
- ·Shopify — paste the snippet into your theme's
theme.liquid, just before</head>. - ·Next.js / React — load it with
next/script(strategyafterInteractive) or inindex.htmlfor Vite apps. The widget survives client-side route changes; no re-boot needed.
Useful JS calls
lunadesk('open'); // open the chat panel
lunadesk('close'); // close it
lunadesk('shutdown'); // remove the widget (call on logout)For identifying logged-in users and pushing custom events, see Identify logged-in visitors and The widget JavaScript API.
Next steps
- ·Customize your widget's design — colors, logo, launcher and dark mode.
- ·Set up the pre-chat form — collect a few details before the chat starts.
- ·Set your chat availability — business hours and the away message.
- ·Automate replies with the AI agent — let AI answer in real time.
Paste the snippet, and the next visitor message lands in your Inbox.