Contentful Personalization & Analytics
    Preparing search index...

    Configuration for the Node-specific ContentfulOptimization SDK.

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

    interface OptimizationNodeConfig {
        api?: Omit<CoreApiConfig, "beaconHandler">;
        app?: { name: string; version: string };
        clientId: string;
        environment?: string;
        eventBuilder?: Partial<
            Omit<
                | Omit<
                    EventBuilderConfig,
                    "getLocale"
                    | "getPageProperties"
                    | "getUserAgent",
                >
                | undefined,
                "app",
            >,
        >;
        fetchOptions?: Omit<ProtectedFetchMethodOptions, "apiName">;
        logLevel?: LogLevels;
    }

    Hierarchy

    Index

    Properties

    api?: Omit<CoreApiConfig, "beaconHandler">

    Unified API configuration for stateless environments. Omits stateful-only delivery hooks such as beaconHandler.

    app?: { name: string; version: string }

    The application definition used to attribute events to a specific consumer app.

    Type Declaration

    • name: string

      Name of the application.

    • version: string

      Version of the application.

    When not provided, events will not contain app metadata in their context.

    clientId: string

    Client identifier used for authentication or tracking.

    environment?: string

    Contentful environment identifier.

    'main'

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

    Partial overrides for the event builder configuration.

    Any provided fields are merged with the default Node SDK metadata. This differs from CoreStatelessConfig eventBuilder, which expects a full configuration object.

    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.

    logLevel?: LogLevels

    Minimum log level for the default console sink.