Contentful Personalization & Analytics
    Preparing search index...
    interface TrackCurrentPageOptions {
        buildPayload: (
            metadata: CurrentPageEmissionMetadata,
        ) =>
            | {
                campaign?: {
                    content?: string;
                    medium?: string;
                    name?: string;
                    source?: string;
                    term?: string;
                };
                locale?: string;
                location?: {
                    city?: string;
                    continent?: string;
                    coordinates?: { latitude: number; longitude: number };
                    country?: string;
                    countryCode?: string;
                    postalCode?: string;
                    region?: string;
                    regionCode?: string;
                    timezone?: string;
                };
                page?: {
                    path: string;
                    query: Record<string, string>;
                    referrer: string;
                    search: string;
                    title?: string;
                    url: string;
                    [key: string]: JSONType;
                };
                properties?: {
                    path?: string;
                    query?: Record<string, string>;
                    referrer?: string;
                    search?: string;
                    title?: string;
                    url?: string;
                    [key: string]: JSONType;
                };
                screen?: { name: string; [key: string]: JSONType };
                userAgent?: string;
            }
            | undefined;
        initialPageEvent?: InitialCurrentPageEvent;
        routeKey: string;
    }
    Index

    Properties

    buildPayload: (
        metadata: CurrentPageEmissionMetadata,
    ) =>
        | {
            campaign?: {
                content?: string;
                medium?: string;
                name?: string;
                source?: string;
                term?: string;
            };
            locale?: string;
            location?: {
                city?: string;
                continent?: string;
                coordinates?: { latitude: number; longitude: number };
                country?: string;
                countryCode?: string;
                postalCode?: string;
                region?: string;
                regionCode?: string;
                timezone?: string;
            };
            page?: {
                path: string;
                query: Record<string, string>;
                referrer: string;
                search: string;
                title?: string;
                url: string;
                [key: string]: JSONType;
            };
            properties?: {
                path?: string;
                query?: Record<string, string>;
                referrer?: string;
                search?: string;
                title?: string;
                url?: string;
                [key: string]: JSONType;
            };
            screen?: { name: string; [key: string]: JSONType };
            userAgent?: string;
        }
        | undefined

    Builds the page payload only when a page event will be emitted.

    initialPageEvent?: InitialCurrentPageEvent

    Controls the first route emission. SSR integrations can use skip when the server already emitted the same page event.

    routeKey: string

    Stable route identity used for current-page deduplication.