Contentful Personalization & Analytics
    Preparing search index...

    Unified API configuration for Core.

    interface CoreApiConfig {
        beaconHandler?: (
            url: string | URL,
            data: {
                events: (
                    | {
                        channel: "mobile"
                        | "server"
                        | "web";
                        componentId: string;
                        componentType: "Entry" | "Variable";
                        context: {
                            app?: { name: string; version: string };
                            campaign: {
                                content?: string;
                                medium?: string;
                                name?: string;
                                source?: string;
                                term?: string;
                            };
                            gdpr: { isConsentGiven: boolean };
                            library: { name: string; version: string };
                            locale: string;
                            location?: {
                                city?: (...) | (...);
                                continent?: (...) | (...);
                                coordinates?: (...) | (...);
                                country?: (...) | (...);
                                countryCode?: (...) | (...);
                                postalCode?: (...) | (...);
                                region?: (...) | (...);
                                regionCode?: (...) | (...);
                                timezone?: (...) | (...);
                            };
                            page?: {
                                path: string;
                                query: Record<(...), (...)>;
                                referrer: string;
                                search: string;
                                title?: (...) | (...);
                                url: string;
                                [key: string]: JSONType;
                            };
                            screen?: { name: string; [key: string]: JSONType };
                            userAgent?: string;
                        };
                        experienceId?: string;
                        messageId: string;
                        originalTimestamp: string;
                        sentAt: string;
                        timestamp: string;
                        type: "component";
                        userId?: string;
                        variantIndex: number;
                        viewDurationMs?: number;
                        viewId?: string;
                    }
                    | {
                        channel: "mobile"
                        | "server"
                        | "web";
                        componentId: string;
                        componentType: "Entry" | "Variable";
                        context: {
                            app?: { name: string; version: string };
                            campaign: {
                                content?: string;
                                medium?: string;
                                name?: string;
                                source?: string;
                                term?: string;
                            };
                            gdpr: { isConsentGiven: boolean };
                            library: { name: string; version: string };
                            locale: string;
                            location?: {
                                city?: (...) | (...);
                                continent?: (...) | (...);
                                coordinates?: (...) | (...);
                                country?: (...) | (...);
                                countryCode?: (...) | (...);
                                postalCode?: (...) | (...);
                                region?: (...) | (...);
                                regionCode?: (...) | (...);
                                timezone?: (...) | (...);
                            };
                            page?: {
                                path: string;
                                query: Record<(...), (...)>;
                                referrer: string;
                                search: string;
                                title?: (...) | (...);
                                url: string;
                                [key: string]: JSONType;
                            };
                            screen?: { name: string; [key: string]: JSONType };
                            userAgent?: string;
                        };
                        experienceId?: string;
                        messageId: string;
                        originalTimestamp: string;
                        sentAt: string;
                        timestamp: string;
                        type: "component_click";
                        userId?: string;
                        variantIndex: number;
                    }
                    | {
                        channel: "mobile"
                        | "server"
                        | "web";
                        componentId: string;
                        componentType: "Entry" | "Variable";
                        context: {
                            app?: { name: string; version: string };
                            campaign: {
                                content?: string;
                                medium?: string;
                                name?: string;
                                source?: string;
                                term?: string;
                            };
                            gdpr: { isConsentGiven: boolean };
                            library: { name: string; version: string };
                            locale: string;
                            location?: {
                                city?: (...) | (...);
                                continent?: (...) | (...);
                                coordinates?: (...) | (...);
                                country?: (...) | (...);
                                countryCode?: (...) | (...);
                                postalCode?: (...) | (...);
                                region?: (...) | (...);
                                regionCode?: (...) | (...);
                                timezone?: (...) | (...);
                            };
                            page?: {
                                path: string;
                                query: Record<(...), (...)>;
                                referrer: string;
                                search: string;
                                title?: (...) | (...);
                                url: string;
                                [key: string]: JSONType;
                            };
                            screen?: { name: string; [key: string]: JSONType };
                            userAgent?: string;
                        };
                        experienceId?: string;
                        hoverDurationMs: number;
                        hoverId: string;
                        messageId: string;
                        originalTimestamp: string;
                        sentAt: string;
                        timestamp: string;
                        type: "component_hover";
                        userId?: string;
                        variantIndex: number;
                    }
                )[];
                profile: { id: string; [key: string]: JSONType };
            }[],
        ) => boolean;
        enabledFeatures?: Feature[];
        experienceBaseUrl?: string;
        insightsBaseUrl?: string;
        ip?: string;
        locale?: string;
        plainText?: boolean;
        preflight?: boolean;
    }
    Index

    Properties

    beaconHandler?: (
        url: string | URL,
        data: {
            events: (
                | {
                    channel: "mobile"
                    | "server"
                    | "web";
                    componentId: string;
                    componentType: "Entry" | "Variable";
                    context: {
                        app?: { name: string; version: string };
                        campaign: {
                            content?: string;
                            medium?: string;
                            name?: string;
                            source?: string;
                            term?: string;
                        };
                        gdpr: { isConsentGiven: boolean };
                        library: { name: string; version: string };
                        locale: string;
                        location?: {
                            city?: (...) | (...);
                            continent?: (...) | (...);
                            coordinates?: (...) | (...);
                            country?: (...) | (...);
                            countryCode?: (...) | (...);
                            postalCode?: (...) | (...);
                            region?: (...) | (...);
                            regionCode?: (...) | (...);
                            timezone?: (...) | (...);
                        };
                        page?: {
                            path: string;
                            query: Record<(...), (...)>;
                            referrer: string;
                            search: string;
                            title?: (...) | (...);
                            url: string;
                            [key: string]: JSONType;
                        };
                        screen?: { name: string; [key: string]: JSONType };
                        userAgent?: string;
                    };
                    experienceId?: string;
                    messageId: string;
                    originalTimestamp: string;
                    sentAt: string;
                    timestamp: string;
                    type: "component";
                    userId?: string;
                    variantIndex: number;
                    viewDurationMs?: number;
                    viewId?: string;
                }
                | {
                    channel: "mobile"
                    | "server"
                    | "web";
                    componentId: string;
                    componentType: "Entry" | "Variable";
                    context: {
                        app?: { name: string; version: string };
                        campaign: {
                            content?: string;
                            medium?: string;
                            name?: string;
                            source?: string;
                            term?: string;
                        };
                        gdpr: { isConsentGiven: boolean };
                        library: { name: string; version: string };
                        locale: string;
                        location?: {
                            city?: (...) | (...);
                            continent?: (...) | (...);
                            coordinates?: (...) | (...);
                            country?: (...) | (...);
                            countryCode?: (...) | (...);
                            postalCode?: (...) | (...);
                            region?: (...) | (...);
                            regionCode?: (...) | (...);
                            timezone?: (...) | (...);
                        };
                        page?: {
                            path: string;
                            query: Record<(...), (...)>;
                            referrer: string;
                            search: string;
                            title?: (...) | (...);
                            url: string;
                            [key: string]: JSONType;
                        };
                        screen?: { name: string; [key: string]: JSONType };
                        userAgent?: string;
                    };
                    experienceId?: string;
                    messageId: string;
                    originalTimestamp: string;
                    sentAt: string;
                    timestamp: string;
                    type: "component_click";
                    userId?: string;
                    variantIndex: number;
                }
                | {
                    channel: "mobile"
                    | "server"
                    | "web";
                    componentId: string;
                    componentType: "Entry" | "Variable";
                    context: {
                        app?: { name: string; version: string };
                        campaign: {
                            content?: string;
                            medium?: string;
                            name?: string;
                            source?: string;
                            term?: string;
                        };
                        gdpr: { isConsentGiven: boolean };
                        library: { name: string; version: string };
                        locale: string;
                        location?: {
                            city?: (...) | (...);
                            continent?: (...) | (...);
                            coordinates?: (...) | (...);
                            country?: (...) | (...);
                            countryCode?: (...) | (...);
                            postalCode?: (...) | (...);
                            region?: (...) | (...);
                            regionCode?: (...) | (...);
                            timezone?: (...) | (...);
                        };
                        page?: {
                            path: string;
                            query: Record<(...), (...)>;
                            referrer: string;
                            search: string;
                            title?: (...) | (...);
                            url: string;
                            [key: string]: JSONType;
                        };
                        screen?: { name: string; [key: string]: JSONType };
                        userAgent?: string;
                    };
                    experienceId?: string;
                    hoverDurationMs: number;
                    hoverId: string;
                    messageId: string;
                    originalTimestamp: string;
                    sentAt: string;
                    timestamp: string;
                    type: "component_hover";
                    userId?: string;
                    variantIndex: number;
                }
            )[];
            profile: { id: string; [key: string]: JSONType };
        }[],
    ) => boolean

    Beacon-like handler used by Insights event delivery when available.

    enabledFeatures?: Feature[]

    Experience API features enabled for outgoing requests.

    experienceBaseUrl?: string

    Base URL override for Experience API requests.

    insightsBaseUrl?: string

    Base URL override for Insights API requests.

    ip?: string

    Experience API IP override.

    locale?: string

    Experience API locale override.

    plainText?: boolean

    Experience API plain-text request toggle.

    preflight?: boolean

    Experience API preflight request toggle.