trackClick

fun Modifier.trackClick(name: String, properties: JsonObject = EmptyJsonObject, target: String? = null, onClick: () -> Unit): Modifier

Fires name on click, then invokes onClick. Screen/section from the ambient ScreenContext (see TrackedScreen) are merged into properties automatically when this element is nested inside one. The event carries kind click in its envelope metadata, and inside a TrackedScreen the screen's visit id (#242).