Contentful Personalization & Analytics
    Preparing search index...

    Configuration for the Node-specific Optimization SDK.

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

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

    Hierarchy

    Index

    Properties

    analytics?: Omit<
        undefined
        | Omit<InsightsApiClientConfig, GlobalApiConfigProperties>,
        "beaconHandler",
    >

    Override configuration for the analytics (Insights) API client. Omits 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.

    Defaults to main when not provided.

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

    Partial overrides for the event builder configuration.

    Any provided fields are merged with the default Node SDK metadata. This differs from CoreConfig.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.

    Configuration for the personalization (Experience) API client.