#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: { userId: String, contextName: String, contextType: String, contextValue: String, groupSlug: String, journeyName: 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.