GuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityLog In
Hey! These docs are for version 2.1, which is no longer officially supported. Click here for the latest version, 3.1!

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

  • You want to retrieve a variation assignment and also have results to display in Optimizely's reporting interface.

Activate

  • You want to retrieve an experiment decision to pass to another service for later activation.

  • You want to perform unit, functional, integration, and other QA tests.

Get Variation


Did this page help you?