Hierarchy

  • ExperimentConfig

Properties

analyticsProvider?: ExperimentAnalyticsProvider

Provides a analytics implementation for standard experiment events generated by the client (e.g. ExposureEvent).

Deprecated

Use exposureTrackingProvider instead

automaticExposureTracking?: boolean

If true, automatically tracks exposure events though the ExperimentAnalyticsProvider. If no analytics provider is set, this option does nothing.

automaticFetchOnAmplitudeIdentityChange?: boolean

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.

debug?: boolean

Debug all assignment requests in the UI Debugger and log additional information to the console. This should be false for production builds.

exposureTrackingProvider?: ExposureTrackingProvider

Provides the ability to track exposure events through a 3rd party analytics implementation.

fallbackVariant?: Variant

The default fallback variant for all variant calls.

fetchOnStart?: boolean

Explicitly 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.
fetchTimeoutMillis?: number

The request timeout, in milliseconds, when fetching variants.

flagsServerUrl?: string

The domain to request flag configurations used in local evaluation from.

httpClient?: HttpClient

(Advanced) Use your own http client.

initialFlags?: string

Initial values for flags. This is useful for bootstrapping the client with fallbacks for flag configs.

initialVariants?: Variants

Initial values for variants. This is useful for bootstrapping the client with fallbacks and values evaluated from server-side rendering.

See

Variants

instanceName?: string

The 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.

pollOnStart?: boolean

Enable or disable local evaluation flag configuration polling on start().

retryFetchOnFailure?: boolean

Set to true to retry fetch requests in the background if the initial requests fails or times out.

serverUrl?: string

The domain from which to request variants using remote evaluation.

serverZone?: string

The amplitude data center to fetch flags and variants from. If set, automatically sets the serverUrl and flagsServerUrl configurations.

source?: Source

Determines the primary source of variants and variants before falling back.

See

Source

userProvider?: ExperimentUserProvider

Sets 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