Contentful Personalization & Analytics
    Preparing search index...
    interface AnalyticsProps {
        children: ReactNode;
        entry: Entry;
        style?: StyleProp<ViewStyle>;
        testID?: string;
        threshold?: number;
        viewTimeMs?: number;
    }
    Index

    Properties

    children: ReactNode

    Child components to render. The entry is NOT provided via render prop since no resolution is needed.

    Use the entry directly in your components as needed.

    entry

    entry: Entry

    The Contentful entry to track (non-personalized content). Can be any entry fetched from Contentful.

    const productEntry = await contentful.getEntry('product-123')
    
    style?: StyleProp<ViewStyle>

    Optional style prop for the wrapper View

    testID?: string

    Optional testID for testing purposes

    threshold?: number

    Minimum visibility ratio (0.0 - 1.0) required to consider component "visible".

    0.8 (80% of the component must be visible in viewport)
    
    viewTimeMs?: number

    Minimum time (in milliseconds) the component must be visible before tracking fires.

    2000 (2 seconds)