Package-level declarations

Functions

Link copied to clipboard

A function that tracks an event, for click handlers and other callbacks in a composable that has no ViewModel:

Link copied to clipboard
fun Modifier.trackImpression(event: Event, threshold: Float = 0.5f, minVisibleDuration: Duration = Duration.ZERO): Modifier

Tracks event once, when at least threshold of this layout is visible on screen. With a minVisibleDuration, it has to stay that visible for that long first; leaving earlier cancels the count.

Link copied to clipboard
fun TrackOnLifecycleEvent(event: Event, on: Lifecycle.Event = Lifecycle.Event.ON_RESUME)

Tracks event every time the host lifecycle reaches on. The default, ON_RESUME, is every time the screen becomes visible; ON_PAUSE or ON_STOP is every time the user leaves it. ON_DESTROY is not supported.

Link copied to clipboard
fun TrackScreenView(event: ScreenViewEvent, on: Lifecycle.Event = Lifecycle.Event.ON_RESUME)

Tracks event every time the host lifecycle reaches on.