LunadeskLunadesk

Install the live chat widget

Add the Lunadesk chat to any website with one script tag.

Published 6/12/2026Updated 9/9/2026
Live Chat Widget
Install the live chat widget

Add the Lunadesk chat to any website with one script tag.

One script tagWidget key is publicMessages arrive in the Inbox as tickets

The live chat widget puts a launcher button on your site; visitor messages arrive in the Inbox like any other ticket.

Create the widget channel

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.

Settings›Channels›Live chat widget
Widget key lw_…
Paste the snippet

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.

HTMLyour site's <head>
<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 (strategy afterInteractive) or in index.html for Vite apps. The widget survives client-side route changes; no re-boot needed.

Useful JS calls

JSopen · close · shutdown
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.
One tag and you're live

Paste the snippet, and the next visitor message lands in your Inbox.

Was this article helpful?
Install the live chat widget | Lunadesk Help Center · Lunadesk