#Events

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

#Usage

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

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

#Available events

#identityAvailable

  • 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.

#identityUnknown

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

#trackError

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