Optional
analyticsUse exposureTrackingProvider instead
Optional
automaticIf true, automatically tracks exposure events though the
ExperimentAnalyticsProvider
. If no analytics provider is set, this
option does nothing.
Optional
automaticThis 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 clearAll
ed via a call
to identify()
.
Note: Non-idempotent identify operations setOnce
, add
, append
, and
prepend
are not counted towards the user identity changing.
Optional
debugDebug all assignment requests in the UI Debugger and log additional information to the console. This should be false for production builds.
Optional
exposureProvides the ability to track exposure events through a 3rd party analytics implementation.
Optional
fallbackThe default fallback variant for all variant calls.
Optional
fetchExplicitly 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.Optional
fetchThe request timeout, in milliseconds, when fetching variants.
Optional
flagThe interval to poll local evaluation flag configurations on start()
.
Only used if pollOnStart
is true
. Minimum 60000.
Optional
flagsThe domain to request flag configurations used in local evaluation from.
Optional
http(Advanced) Use your own http client.
Optional
initialInitial values for flags. This is useful for bootstrapping the client with fallbacks for flag configs.
Optional
initialInitial values for variants. This is useful for bootstrapping the client with fallbacks and values evaluated from server-side rendering.
Variants
Optional
instanceThe 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.
Optional
pollEnable or disable local evaluation flag configuration polling on start()
.
Optional
retrySet to true to retry fetch requests in the background if the initial requests fails or times out.
Optional
serverThe domain from which to request variants using remote evaluation.
Optional
serverThe amplitude data center to fetch flags and variants from. If set, automatically sets the serverUrl and flagsServerUrl configurations.
Optional
sourceDetermines the primary source of variants and variants before falling back.
Source
Optional
userSets 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).