trackVisibility

Tracks either a HiddenEvent or a VisibleEvent depending on the value of the given isVisible.

trackVisibility = (parameters: {
tracker: Tracker,
isVisible: boolean,
locationStack?: LocationStack,
globalContexts?: GlobalContexts
}) => Promise<TrackerEvent>
caution

This is a lower-level API.

Event Tracking Hooks are preferable as they automate retrieving both the Tracker instance and LocationStack. In fact, the do use these lower-level APIs internally.

Parameters

type
requiredtrackerReactNativeTracker
requiredisVisibleboolean
optionallocationStackLocationStack
optionalglobalContextsGlobalContexts

Returns

Promise<TrackerEvent>

Usage