Read time: 2 minutes
Last edited: Jan 10, 2023
This topic explains Experimentation events and how they work.
An Experimentation event is any event an SDK produces that impacts your experimentation event count. There are two categories of Experimentation events:
- Metric events:
page view, and
customevents from metrics used in running experiments.
- Evaluation events:
featureevents from flags with targeting rules included in running experiments.
All LaunchDarkly SDKs send
custom metric events when you call the SDK's track method. To learn more about the track method, read Sending custom events.
click metric event when a user clicks on a page URL or anchor tag that you have included in a click conversion metric, and sends a
page view metric event when a user visits a URL that you have included in a page view conversion metric.
You can view metric events in the debugger under the Experimentation events tab.
If you prefer to import metric events from your existing data pipeline, read Importing metric events.
All LaunchDarkly SDKs send a
feature conversion event when you call the SDK's variation method for a flag in an experiment. To learn more about the variation method, read Evaluating flags.
variation evaluation event when you call the SDK's
allFlags method, unless you configure it not to. The React Web SDK automatically calls
allFlags when you initialize the SDK, and when a user receives a new variation for a flag. To learn more, read Getting all flags.
allFlags can help keep your Experimentation costs down. To learn more about how SDKs send events, read Recording events.
Every time a user triggers a metric that is attached to a running experiment, your Experimentation event count increases by one. If you are being billed by event count, you may want to reduce your Experimentation event counts to control billing costs. You can manage your event counts by not calling variation and track methods unnecessarily.
page view and
click metric events, first update your metrics to use
custom instead of
page view where possible. Then, reduce
custom metric events by limiting the number of times you call track.
You can also cache when you call track to ensure you call it only once per user.
To reduce evaluation events, cache or persist the response from the SDK, so that you only call the variation method when when you want to register an impression, or when you don't have the response cached or persisted.
You can also decrease the number of users in an experiment using audience allocation. To learn how, read Allocating experiment audiences.
A conversion is when a user action provides a measurable value for a metric. For example, if a metric is tracking clicks on a checkout button, LaunchDarkly registers a conversion each time an end user clicks the button. The SDK sends a track call to register the conversion in LaunchDarkly.
LaunchDarkly uses variation calls to correlate the variation an end user received to a conversion within a 90-day window. If there are more than 90 days between the time of a variation call and a track call on a user key, then LaunchDarkly does not register the metric in the experiment.
In rare cases, unexpected behavior may cause an end user to receive multiple variations in the 90 days prior to a conversion. In these cases, LaunchDarkly attributes the conversion to the first variation the end user received in that 90-day period.