Skip to Content
DeploymentInstall the Widget

Install the Widget

Use the Deploy page to copy your installation snippet.

Example Snippet

<script src="https://dukon2.vercel.app/widget.min.js" data-widget-key="YOUR_WIDGET_PUBLISHABLE_KEY" defer></script>

This is inline mode (default), so the widget renders directly in-page.

Optional iframe Mode

<script src="https://dukon2.vercel.app/widget.min.js" data-widget-key="YOUR_WIDGET_PUBLISHABLE_KEY" data-render-mode="iframe" defer></script>

Placement

Place the snippet in:

  • <head> or
  • Just before </body>

Updates & caching

Keep the snippet exactly as shown — always point it at the stable /widget.min.js. You never need to change the embed to get a new version.

Behind the scenes, /widget.min.js is served with a short cache lifetime (Cache-Control: public, max-age=300, must-revalidate, stale-while-revalidate=86400). Each build stamps a content hash into the file, so its bytes (and ETag) change whenever the widget changes. Returning visitors revalidate against the origin within ~5 minutes and pick up new widget code automatically — no immutable, indefinitely-stale copy. The stale-while-revalidate window keeps page loads instant while the refresh happens in the background.

Validation

After deploy:

  1. Open your site and confirm widget launcher appears.
  2. Send a test message and confirm response.
  3. Check response headers include X-Conversation-Id.
  4. Confirm domain allowlist behavior from allowed and blocked origins.
Last updated on
Engine64 | Docs