Guides
Docs
Examples
Support
Open Source
menu
close
Guides
Docs
Examples
Support
Open Source
Introduction
Installation
Usage
With Jetpack Compose
With Views (legacy)
API
Methods
Configuration
Texts
Variables
Events
#
Events
Most actions completed by a visitor will trigger custom events for which you will be able to assign a listener.
#
Usage
fun on*(callback: (event: EngageEventData) -> Unit): Engage
fun off(event: Events): Engage
#
Available events
#
ready
Arguments:
{ readyEvent: { element: { name: String, slug: String } } }
Triggered when the element is fully loaded and displayed inside the app.
#
seen
Arguments:
{ seenEvent: { element: { name: String, slug: String } } }
Triggered when the element has been seen by the user (when it has entered the app's viewport).
#
click
Arguments:
{ clickEvent: { id: String, type: String, url: String, name: String, element: { name: String, slug: String } } }
Triggered when a user has clicked a button/link inside the element.
#
formSubmit
Arguments:
{ formEvent: { fields: Map<String, Any>, valid: Map<String, Boolean>, element: { name: String, slug: String } } }
Triggered when a form inside the element is submitted.
#
destroy
Arguments:
{ destroyEvent: { buttonId: String, element: { name: String, slug: String } } }
Triggered when a user has clicked a button/image configured to destroy element.
#
error
Arguments:
{ errorEvent: { message: String, element: { name: String, slug: String } } }
Triggered when an error occurs during the element's loading process.
arrow_back
Previous
Add custom variables
Usage
Available events
ready
seen
click
formSubmit
destroy
error