- Figure out why you are not seeing your variation
- Check the integrity of your variation code
Are you experiencing the following issue?
Your Optimizely experiment is running, but you cannot see your variation (or certain changes you made) on your live page
Usually, this problem has to do with the variation code execution timing or scoping. We will walk you through what this means and how to troubleshoot the issue.
Check that recent changes are published
First, make sure your variation content is published.
If you made changes to a running experiment, you must publish the new changes and start the experiment again to see them live.
If your experiment contains unpublished changes, they are listed below Manage Experiment beside Variations.
Click Publish Experiment > Publish and Start to publish variation content to your site.
Check the changes in Preview mode and your site
Next, check your whether you may have an issue with your experiment setup.
Are you able to see your changes using the Preview tool?
The Preview tool automatically qualifies you for the right audience conditions and traffic allocation, so you can view the experiment as if you are in it. If you can see the changes in the Editor, but not in Preview mode, you may have a timing issue. Skip down to "Check for a timing issue" to learn more or go straight to our article on timing issues.
Next, visit your site without the Preview tool. Do you see the variation when you expect to? If not, you may have an issue with your experiment setup. Check the page settings, audience conditions and traffic allocation.
Do you have an ad blocker installed? It may be preventing you from seeing the right changes. If so, pause or disable the ad blocker or whitelist Optimizely to see your variation content.
Ensure you are in the experiment and variation
Check for active experiments with this call:
If the experiment name or ID is returned, then your experiment is active on the page.
Then, use this call to check whether you are bucketed into the right variation:
If you see the name (or ID) of your variation, then you are bucketed into the right variation.
Seeing an experiment or variation ID returned instead of a human-readable name? You probably enabled masked IDs for privacy purposes. Here is how to match masked IDs to names.
If you see your experiment, are bucketed into the right variation, and can see your changes in the Visual Editor but not on your site, you likely have a timing issue.
Check for a timing issue
1. If you do not see any issues with experiment activation or your variation code, the issue may have to do with the order in which Optimizely runs on your page. In other words, the elements you want to change do not yet exist when the page first loads. Here is how to fix a timing issue that causes variation content not to appear on your live site.
2. If flashing is not an issue since the change happens below the fold or to an element (e.g., a banner) that does not display until later, for specific variation changes, you can have a browser load them asynchronously. Asynchronous loading makes the Optimizely snippet itself slightly smaller as it does not contain the information needed to make that change, but it greatly increases the chances of flashing.
Check for a scoping issue
window.functionName, as appropriate.
You can QA your code is running as expected by testing in the console while in Preview Mode.