Trigger types
Triggers are configured in the dashboard and mounted automatically (except in API mode, which suppresses the floating launcher).
- Floating launcher — the circular / online-pill launcher. One per widget.
- Inline button — a styled button injected into a placeholder you place in your HTML:
<div data-glimpze-trigger="YOUR_TRIGGER_ID"></div>Declarative open — data-glimpze-cta
Add data-glimpze-cta="true" to any element to make it open the widget on click. Handled via a delegated listener, so elements added later (e.g. after a SPA route change) work too.
<button type="button" data-glimpze-cta="true">Open chat</button>Deep-link a CTA into a call
Add data-glimpze-cta-action="call" to open straight into a call — the declarative twin of open({ action: 'call' }). data-glimpze-cta-media picks video (default) or audio; data-glimpze-cta-skip-setup="true" skips the camera/mic device-check screen (the declarative twin of skipSetup). No dashboard config needed:
<!-- Opens the camera/mic check, then the call -->
<button data-glimpze-cta="true" data-glimpze-cta-action="call">Talk to us</button>
<!-- Skips the device-check screen — best paired with prefilled details -->
<button data-glimpze-cta="true" data-glimpze-cta-action="call" data-glimpze-cta-skip-setup="true">Call now</button>glimpze:triggers-ready
Once the widget has booted it dispatches a glimpze:triggers-ready event on window carrying the widget's triggers and prefillable fields. It's a reliable signal that window.GlimpzeWidget is ready to call.
window.addEventListener('glimpze:triggers-ready', (event) => {
const { widgetId, triggers, fields } = event.detail;
// fields === GlimpzeWidget.getFields()
});