ChatEventHandler

Event handler allows for triggering events regarding the overall Chat instance. It has no side effects attached to it and can be created again on demand.

Types

Link copied to clipboard
fun interface OnEventErrorListener

Listener which will be notified when the triggered event has failed with an error.

Link copied to clipboard
fun interface OnEventSentListener

Listener to be notified when the triggered event is considered sent.

Functions

Link copied to clipboard

Send a ChatWindowOpen event to the analytics server.

Link copied to clipboard

Send a conversion event to the analytics server.

Link copied to clipboard

Send an arbitrary custom analytics event to the analytics server.

Link copied to clipboard

Trigger event specified in agent console or elsewhere as per your representative instructions. This event is not mandatory though, consult your representative for more information.

Link copied to clipboard

send a page viewed event to the server.

Link copied to clipboard

send a page view ended event to the server when a previously viewed page is left.

Link copied to clipboard

Send a proactive action click event to the analytics.

Link copied to clipboard

Send a proactive action display event to the analytics.

Link copied to clipboard

Send a proactive action failure event to the analytics.

Link copied to clipboard

Send a proactive action success event to the analytics.

Link copied to clipboard

Refresh the authentication token associated with the chat.

Link copied to clipboard
abstract fun trigger(event: ChatEvent, listener: ChatEventHandler.OnEventSentListener? = null, errorListener: ChatEventHandler.OnEventErrorListener? = null)

Sends an event to server without further delays from background thread. If sending of the event fails, the event is considered consumed anyway.