UseViewportTrackingOptions including the entry, thresholds, and selected optimization data.
An object with isVisible state and an onLayout callback for the tracked View
Error if called outside of an OptimizationProvider
Uses useScrollContext if available, otherwise falls back to screen dimensions.
A new visibility cycle (with a fresh viewId) starts each time the tracked
entry transitions from invisible to visible. Time accumulation pauses when
the app moves to the background.
Tracks whether an entry is visible in the viewport and fires entry view events with accumulated duration tracking.
The hook implements a three-phase event lifecycle per visibility cycle:
viewTimeMs.viewDurationUpdateIntervalMswhile visible.