Contentful Personalization & Analytics
    Preparing search index...

    Observables exposed by the stateful analytics product.

    interface AnalyticsStates {
        eventStream: Observable<
            | undefined
            | {
                channel: "mobile"
                | "server"
                | "web";
                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?: 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;
                };
                messageId: string;
                originalTimestamp: string;
                sentAt: string;
                timestamp: string;
                type: "alias";
                userId?: 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?: 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;
                };
                experienceId?: string;
                messageId: string;
                originalTimestamp: string;
                sentAt: string;
                timestamp: string;
                type: "component";
                userId?: string;
                variantIndex: number;
            }
            | {
                channel: "mobile"
                | "server"
                | "web";
                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?: 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;
                };
                messageId: string;
                originalTimestamp: string;
                sentAt: string;
                timestamp: string;
                type: "group";
                userId?: string;
            }
            | {
                channel: "mobile"
                | "server"
                | "web";
                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?: 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;
                };
                messageId: string;
                originalTimestamp: string;
                sentAt: string;
                timestamp: string;
                traits: Record<string, JSONType>;
                type: "identify";
                userId?: string;
            }
            | {
                channel: "mobile"
                | "server"
                | "web";
                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?: 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;
                    };
                    userAgent?: string;
                };
                messageId: string;
                name?: string;
                originalTimestamp: string;
                properties: {
                    path: string;
                    query: Record<string, string>;
                    referrer: string;
                    search: string;
                    title?: string;
                    url: string;
                    [key: string]: JSONType;
                };
                sentAt: string;
                timestamp: string;
                type: "page";
                userId?: string;
            }
            | {
                channel: "mobile"
                | "server"
                | "web";
                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?: string;
                        continent?: string;
                        coordinates?: { latitude: number; longitude: number };
                        country?: string;
                        countryCode?: string;
                        postalCode?: string;
                        region?: string;
                        regionCode?: string;
                        timezone?: string;
                    };
                    screen: { name: string; [key: string]: JSONType };
                    userAgent?: string;
                };
                messageId: string;
                name: string;
                originalTimestamp: string;
                properties?: Record<string, JSONType>;
                sentAt: string;
                timestamp: string;
                type: "screen";
                userId?: string;
            }
            | {
                channel: "mobile"
                | "server"
                | "web";
                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?: 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;
                };
                event: string;
                messageId: string;
                originalTimestamp: string;
                properties: Record<string, JSONType>;
                sentAt: string;
                timestamp: string;
                type: "track";
                userId?: string;
            },
        >;
        profile: Observable<
            | undefined
            | {
                audiences: string[];
                id: string;
                location: {
                    city?: string;
                    continent?: string;
                    coordinates?: { latitude: number; longitude: number };
                    country?: string;
                    countryCode?: string;
                    postalCode?: string;
                    region?: string;
                    regionCode?: string;
                    timezone?: string;
                };
                random: number;
                session: {
                    activeSessionLength: number;
                    averageSessionLength: number;
                    count: number;
                    id: string;
                    isReturningVisitor: boolean;
                    landingPage: {
                        path: string;
                        query: Record<string, string>;
                        referrer: string;
                        search: string;
                        title?: string;
                        url: string;
                        [key: string]: JSONType;
                    };
                };
                stableId: string;
                traits: Record<string, JSONType>;
            },
        >;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    eventStream: Observable<
        | undefined
        | {
            channel: "mobile"
            | "server"
            | "web";
            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?: 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;
            };
            messageId: string;
            originalTimestamp: string;
            sentAt: string;
            timestamp: string;
            type: "alias";
            userId?: 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?: 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;
            };
            experienceId?: string;
            messageId: string;
            originalTimestamp: string;
            sentAt: string;
            timestamp: string;
            type: "component";
            userId?: string;
            variantIndex: number;
        }
        | {
            channel: "mobile"
            | "server"
            | "web";
            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?: 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;
            };
            messageId: string;
            originalTimestamp: string;
            sentAt: string;
            timestamp: string;
            type: "group";
            userId?: string;
        }
        | {
            channel: "mobile"
            | "server"
            | "web";
            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?: 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;
            };
            messageId: string;
            originalTimestamp: string;
            sentAt: string;
            timestamp: string;
            traits: Record<string, JSONType>;
            type: "identify";
            userId?: string;
        }
        | {
            channel: "mobile"
            | "server"
            | "web";
            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?: 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;
                };
                userAgent?: string;
            };
            messageId: string;
            name?: string;
            originalTimestamp: string;
            properties: {
                path: string;
                query: Record<string, string>;
                referrer: string;
                search: string;
                title?: string;
                url: string;
                [key: string]: JSONType;
            };
            sentAt: string;
            timestamp: string;
            type: "page";
            userId?: string;
        }
        | {
            channel: "mobile"
            | "server"
            | "web";
            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?: string;
                    continent?: string;
                    coordinates?: { latitude: number; longitude: number };
                    country?: string;
                    countryCode?: string;
                    postalCode?: string;
                    region?: string;
                    regionCode?: string;
                    timezone?: string;
                };
                screen: { name: string; [key: string]: JSONType };
                userAgent?: string;
            };
            messageId: string;
            name: string;
            originalTimestamp: string;
            properties?: Record<string, JSONType>;
            sentAt: string;
            timestamp: string;
            type: "screen";
            userId?: string;
        }
        | {
            channel: "mobile"
            | "server"
            | "web";
            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?: 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;
            };
            event: string;
            messageId: string;
            originalTimestamp: string;
            properties: Record<string, JSONType>;
            sentAt: string;
            timestamp: string;
            type: "track";
            userId?: string;
        },
    >

    Observable stream of the latest AnalyticsEvent or PersonalizationEvent (or undefined).

    profile: Observable<
        | undefined
        | {
            audiences: string[];
            id: string;
            location: {
                city?: string;
                continent?: string;
                coordinates?: { latitude: number; longitude: number };
                country?: string;
                countryCode?: string;
                postalCode?: string;
                region?: string;
                regionCode?: string;
                timezone?: string;
            };
            random: number;
            session: {
                activeSessionLength: number;
                averageSessionLength: number;
                count: number;
                id: string;
                isReturningVisitor: boolean;
                landingPage: {
                    path: string;
                    query: Record<string, string>;
                    referrer: string;
                    search: string;
                    title?: string;
                    url: string;
                    [key: string]: JSONType;
                };
            };
            stableId: string;
            traits: Record<string, JSONType>;
        },
    >

    Observable stream of the active Profile (or undefined).