Contentful Personalization & Analytics
    Preparing search index...

    Interface CoreStatelessForRequestOptions

    Options used to bind stateless SDK calls to an incoming request.

    interface CoreStatelessForRequestOptions {
        consent: CoreStatelessRequestConsent;
        eventContext?: {
            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;
            };
            screen?: { name: string; [key: string]: JSONType };
            userAgent?: string;
        };
        experienceOptions?: CoreStatelessRequestOptions;
        insightsOptions?: CoreStatelessInsightsOptions;
        locale?: string;
        profile?: { id: string; [key: string]: JSONType };
    }
    Index

    Properties

    Request-scoped event and persistence consent.

    eventContext?: {
        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;
        };
        screen?: { name: string; [key: string]: JSONType };
        userAgent?: string;
    }

    Universal event context shared by event calls made through this request object.

    experienceOptions?: CoreStatelessRequestOptions

    Experience API options shared by Experience calls made through this request object.

    Insights API options shared by Insights calls made through this request object.

    locale?: string

    Request-scoped SDK locale used for Experience API requests and default event context.

    profile?: { id: string; [key: string]: JSONType }

    Profile already known for the request, such as an anonymous ID from a cookie.

    Type Declaration

    • [key: string]: JSONType
    • id: string

      Identifier of the profile.

      Used to associate events with an existing profile.