Experiment JS Client Documentation - v1.21.0
    Preparing search index...

    Variable ExperimentConst

    Experiment: {
        initialize: (
            apiKey: string,
            config?: ExperimentConfig,
        ) => ExperimentClient;
        initializeWithAmplitudeAnalytics: (
            apiKey: string,
            config?: ExperimentConfig,
        ) => ExperimentClient;
    } = ...

    Provides factory methods for storing singleton instances of ExperimentClient

    Type Declaration

    • initialize: (apiKey: string, config?: ExperimentConfig) => ExperimentClient

      Initializes a singleton ExperimentClient identified by the configured instance name.

    • initializeWithAmplitudeAnalytics: (apiKey: string, config?: ExperimentConfig) => ExperimentClient

      Initialize a singleton ExperimentClient which automatically integrates with the installed and initialized instance of the amplitude analytics SDK.

      You must be using amplitude-js SDK version 8.17.0+ for this integration to work.