Contentful Personalization & Analytics
    Preparing search index...

    Interface PersonalizationProductConfig

    Configuration for PersonalizationStateful.

    interface PersonalizationProductConfig {
        allowedEventTypes?: EventType[];
        defaults?: PersonalizationProductConfigDefaults;
        getAnonymousId?: () => string | undefined;
        onEventBlocked?: (event: BlockedEvent) => void;
        queuePolicy?: PersonalizationQueuePolicy;
    }

    Hierarchy

    • ProductConfig
      • PersonalizationProductConfig
    Index

    Properties

    allowedEventTypes?: EventType[]

    The set of event type strings that are allowed to be sent even if consent is not granted.

    ['identify', 'page', 'screen']

    These types are compared against the type property of events.

    Default signal values applied during initialization.

    getAnonymousId?: () => string | undefined

    Function used to obtain an anonymous user identifier.

    Type Declaration

      • (): string | undefined
      • Returns string | undefined

        A string identifier, or undefined if no anonymous ID is available.

    If a getAnonymousId function has been provided, the returned value will take precedence over the id property of the current Profile signal value

    onEventBlocked?: (event: BlockedEvent) => void

    Callback invoked whenever an event call is blocked by guards.

    This callback is best-effort. Any exception thrown by the callback is swallowed to keep event handling fault tolerant.

    Policy that controls the offline personalization queue size and drop telemetry.