trackImpression

fun Modifier.trackImpression(name: String, properties: JsonObject = EmptyJsonObject, target: String? = null, minDurationMs: Long = 500, minFractionVisible: Float = 0.5f): Modifier

Fires name the first time this element becomes visible — at least minFractionVisible of its bounds inside the viewport for at least minDurationMs — and never again for the lifetime of this composable instance, even if it later scrolls out of view and back. Built on the stable androidx.compose.ui.layout.onVisibilityChanged; that API itself re-fires on every visibility transition, so the "only once" bookkeeping happens here.

Screen/section from the ambient ScreenContext (see TrackedScreen) are merged into properties automatically when this element is nested inside one.

Does not suppress autocapture. Unlike trackClick, this marks nothing as instrumented: it reports a visibility event and never reports a click, so autocapture reporting a tap on this element duplicates nothing. Marking it was the original design and it cost an event rather than saving one — a tappable element that also reported an impression produced no click event at all, on either platform (#158). An element that should report neither is what autographIgnore is for.