Embed SDK
Available on all plans

Widget JavaScript Events

Every action a user takes inside the booking widget fires a typed JavaScript event. Listen with window.ConsultGen.on() for a global bus, or with element.addEventListener() when you have multiple widgets on the page.

Quick start - add this before widget.js

<!-- Add this BEFORE widget.js loads so no events are missed -->
<script>
  window.ConsultGen = window.ConsultGen || {
    _q: [],
    on: function (event, fn) { this._q.push([event, fn]) },
  }
</script>
<script src="https://cdn.consultgen.app/widget.js" async></script>

Why the stub? The pre-stub queues any on() calls made before widget.js has finished loading. The SDK drains the queue on init so no events are missed.

2 widget lifecycle events
4 booking funnel events
1 contact & identity event
3 payments events

Widget Lifecycle

Booking Funnel

Contact & Identity

Payments