Manage impressions
To measure the effects of an experiment, Optimizely tracks which users were exposed to each variation. The SDK tracks each exposure by sending an impression event back to Optimizely's servers, triggering a network request via the event dispatcher and a notification listener for any integrations.
Impressions are sent any time the Activate method returns a variation. They are not sent if the method returns null, because the user didn't qualify for any experiment.
Impressions are also sent when the user is bucketed into a feature test via the Is Feature Enabled or Get Enabled Features method, regardless of whether the feature is enabled or disabled in the feature test variation. Impressions are not sent if the user is only exposed to a feature rollout, or if neither a test nor rollout is running.
Impressions are used to generate the visitor counts on the Results page, which serve as the denominator for measuring conversion rates. They're also used for billing—when you purchase Full Stack, your pricing plan will include a yearly quota of impressions.
Get variations without sending an impression
In some cases, you may want to evaluate an experiment without triggering an impression event. For example, in an isomorphic React app, you may want to activate experiments on the server-side but not trigger a second impression when the same code runs client-side.
You can use the Get Variation method to see which variation key a user would get if you were to call Activate. Get Variation has the exact same behavior as Activate, except that it won't send a network request. This means that if you only use Get Variation, you won't see any results for your experiment.
The table list common scenarios and the appropriate method to use for a scenario.
Scenario | Method |
---|---|
| |
|
Updated over 3 years ago