Contentful Personalization & Analytics
    Preparing search index...

    Configuration for stateless Optimization Core runtimes.

    This configuration extends CoreConfig but allows partial overrides of the event-builder configuration. SDKs commonly inject their own library metadata or channel definitions.

    interface CoreStatelessConfig {
        allowedEventTypes?: AllowedEventType[];
        api?: CoreStatelessApiConfig;
        clientId: string;
        contentful?: ContentfulConfig;
        environment?: string;
        eventBuilder?: Omit<
            EventBuilderConfig,
            "getLocale"
            | "getPageProperties"
            | "getUserAgent",
        >;
        fetchOptions?: Omit<ProtectedFetchMethodOptions, "apiName">;
        locale?: string;
        logLevel?: LogLevels;
        onEventBlocked?: (event: BlockedEvent) => void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    allowedEventTypes?: AllowedEventType[]

    Allow-listed event type strings permitted when request event consent is not granted.

    Unified API configuration for stateless environments.

    clientId: string

    Client identifier used for authentication or tracking.

    contentful?: ContentfulConfig

    Optional SDK-managed Contentful Delivery API entry fetching.

    Existing manual resolveOptimizedEntry() usage remains supported. Configure this when callers want the SDK to fetch entries by ID or by content type and slug through contentful.js.

    environment?: string

    Contentful environment identifier.

    'main'

    eventBuilder?: Omit<
        EventBuilderConfig,
        "getLocale"
        | "getPageProperties"
        | "getUserAgent",
    >

    Overrides for the event builder configuration. Omits methods that are only useful in stateful environments.

    fetchOptions?: Omit<ProtectedFetchMethodOptions, "apiName">

    Options used to configure the underlying protected fetch method.

    apiName is derived from the client name and must not be provided here.

    locale?: string

    Default SDK locale used for Experience API requests and event context.

    logLevel?: LogLevels

    Minimum log level for the default console sink.

    onEventBlocked?: (event: BlockedEvent) => void

    Callback invoked whenever an event call is blocked by consent.