Some actions completed by a visitor will trigger custom events for which you will be able to assign a listener.


.on(name: String, callback: Function): this

.off(name: String, callback: Function): this

#Available events


  • Arguments: { event: { user_id: String, context_name: String, context_type: String, context_value: String, segment_slug: String, journey_name: String }}
Triggered after the first tracking request, when the user ID is available.


Triggered when the user ID isnt available (ex: disabled cookies).


  • Arguments: { error: Error }
Triggered on error while sending tracking event.