• Optimizely Classic

This article will help you:
  • Identify unique visitors across devices
  • Integrate Universal User ID and create an Optimizely Audience

Optimizely provides an API call to identify a unique visitor across devices. This is known as a Universal User ID. You'll use Universal User ID to consistently count and bucket your identified users (usually via a login identifier).


UUID achieves consistent bucketing by clearing a visitor's OptimizelyBuckets cookie of its prior contents. This can have a negative impact if you are running other experiments that depend on that information.

For example: Imagine you are running an experiment on a pre-login page with a goal targeting a post-login event. Normally, the OptimizelyBuckets cookie would track that conversion.  But, if you create a new experiment that uses UUID, the OptimizelyBuckets cookie will be cleared at login. This means that the post-login goal from the first experiment will no longer be tracked.

To avoid this problem, experiments running on pre-login pages should have goals that only track pre-login events.

Once you provide a Universal User ID to Optimizely, new experiment visitors to your app or website will be bucketed into the same variations across devices. Visitors will also be counted according to their Universal User ID - a single visitor will only count as one unique user across all their logged in sessions. Optimizely will also cache the Universal User ID locally until a new one is set.


When using Universal User ID, make sure that your Audience condition only allows logged-in users. Optimizely does not de-duplicate between anonymous and Universal User IDs. So if a single visitor enters your experiment anonymously and then logs in, they will show up as two visitors in the experiment results.


Let’s say Optimizely is running an experiment to change its site color from blue to red, trying to test if our logged-in users create cross-platform experiments, depending on the site color. This experiment has two variations (Blue and Red) and each variation contains the code necessary to render the correct color on Optimizely’s desktop site and responsive single-column mobile site.

Three people visit while this experiment is running:

User Visits on desktop Visits on mobile web Converts on web Converts on mobile
Alice x     x
Bob x x x  
Michelle   x    


This experiment would report three unique visitors, and a 66% conversion rate. Without Universal User ID, it would report four unique visitors and a 25% conversion rate - only Bob both visited and converted on the same device. 

Implementing Universal User ID

This feature was deprecated in 2016 and will be disabled on 31 July 2017.

If you're interested in cross-platform testing in Optimizely X, we recommend learning about our Full Stack Product. For further information, please visit Optiverse or contact your Customer Success Manager.

  1. First, add the Universal User ID API call to your Optimizely implementation. To do this, please see our API documentation:

  2. Once you've added the API call, you can now target your experiment to only identified users. To do this, create an Audience in a Web project or a targeting condition in an iOS or Android experiment.

Web Project

iOS or Android Experiment