OptionalanalyticsOptionalautomatic
If true, automatically tracks exposure events though the
ExperimentAnalyticsProvider. If no analytics
provider is set, this option does nothing.
Optionalautomatic
This config only matters if you are using the amplitude
analytics SDK integration initialized by calling
Experiment.initializeWithAmplitudeAnalytics().
If true, the ExperimentClient will automatically
fetch variants when the user's identity changes. The user's
identity includes user_id, device_id and any user properties
which are set, unset or
clearAlled via a call to identify().
Note: Non-idempotent identify operations setOnce,
add, append, and
prepend are not counted towards the user identity
changing.
Optionaldebug
Debug all assignment requests in the UI Debugger and log additional information to the console. This should be false for production builds.
OptionalexposureProvides the ability to track exposure events through a 3rd party analytics implementation.
OptionalfallbackThe default fallback variant for all ExperimentClient.variant calls.
OptionalfetchExplicitly enable or disable calling fetch() on start():
true: fetch will always be called on start.
false: fetch will never be called on start.
undefined: fetch will always be called on
start.
OptionalfetchThe request timeout, in milliseconds, when fetching variants.
Optionalflag
The interval to poll local evaluation flag configurations on
start(). Only used if pollOnStart is
true. Minimum 60000.
OptionalflagsThe domain to request flag configurations used in local evaluation from.
Optionalhttp(Advanced) Use your own http client.
OptionalinitialInitial values for flags. This is useful for bootstrapping the client with fallbacks for flag configs.
OptionalinitialInitial values for variants. This is useful for bootstrapping the client with fallbacks and values evaluated from server-side rendering.
OptionalinstanceThe name of the instance being initialized. Used for initializing separate instances of experiment or linking the experiment SDK to a specific instance of the amplitude analytics SDK.
OptionalloggerCustom logger implementation. If not provided, a default ConsoleLogger will be used. The logger must implement the Logger interface with methods for error, warn, info, debug, and verbose.
OptionallogThe minimum log level to output. Messages below this level will be ignored. Supported levels: Disable, Error (default), Warn, Info, Debug, Verbose. If the deprecated debug flag is set to true, this will default to Debug.
Optionalpoll
Enable or disable local evaluation flag configuration polling
on start().
OptionalretrySet to true to retry fetch requests in the background if the initial requests fails or times out.
OptionalserverThe domain from which to request variants using remote evaluation.
OptionalserverThe amplitude data center to fetch flags and variants from. If set, automatically sets the serverUrl and flagsServerUrl configurations.
Optionalsource
Determines the primary source of variants and variants before falling back.
OptionalthrowWhen set to true, the client will throw errors if requests fail for any reason (including timeouts, network errors, or server errors), rather than silently handling the error. This applies to both the initial fetch during start() and subsequent fetch() calls. Background retries will still be started if configured via retryFetchOnFailure.
When false (default), errors are handled silently and retries may occur in the background based on the retryFetchOnFailure configuration.
OptionaluserSets a user provider that will inject identity information into the user for fetch() requests. The user provider will only set user fields in outgoing requests which are null or undefined.
See ExperimentUserProvider for more details
Provides a analytics implementation for standard experiment events generated by the client (e.g. ExposureEvent).