Developers

JavaScript SDK

One script embeds live chat, voice, and video on your site — and gives you a full JavaScript API to drive it.

Overview

The Glimpze widget embeds live chat, voice, and video into any website. Drop in one script and you get a floating launcher; or switch to API mode and drive everything yourself — open the widget on demand, prefill the visitor's details from your own forms, and react to widget events through window.GlimpzeWidget.

Installation — default mode

Add the script once, anywhere in your page. It mounts the floating launcher and manages everything for you. You'll find your widget ID (and this exact snippet, prefilled) in the Glimpze app under Settings > Widgets > Implementation.

<script
  src="https://api.glimpze.io/functions/v1/widget-loader?id=YOUR_WIDGET_ID"
  async
  defer
></script>

Installation — API mode

Add &mode=api to load the widget without the floating launcher. The runtime still boots (so window.GlimpzeWidget and your inline triggers work), but nothing appears until you call GlimpzeWidget.open().

<script
  src="https://api.glimpze.io/functions/v1/widget-loader?id=YOUR_WIDGET_ID&mode=api"
  async
  defer
></script>

Use API mode when you want your own button to open the widget, or when you only want it to appear in specific situations.

The script loads asynchronously, so window.GlimpzeWidget is not available on the very first synchronous tick. Call API methods from a user interaction (a click handler) or after the glimpze:triggers-ready event, which fires once the widget has booted.

Explore the SDK