Skip to main content
menu_icon.png

Everything you need to learn Optimizely X in one place: See our resource pages for Web Experimentation and Personalization.

x
Optimizely Knowledge Base

Troubleshooting: Metrics don't track correctly in Optimizely X

This article is about Optimizely X. If you're using Optimizely Classic, check this article out instead.
 
relevant products:
  • Optimizely X Web Experimentation
  • Optimizely X Web Personalization
  • Optimizely X Web Recommendations

THIS ARTICLE WILL HELP YOU:
  • Figure out why you aren't seeing conversions for a certain metric
  • Figure out why you're seeing a higher or lower number of conversions than expected
  • Check that event tracking is set up correctly

Are you experiencing any of the following problems? This article will help you get to the root of the issue:

  • You see no conversions at all for a certain metric on the Results page

  • You see a higher or lower number of conversions than expected for a certain metric

Here’s when this article may not be for you:

  • Your conversions don't match when compared to another analytics platform. See our article on analytics troubleshooting for that.

1. Check the snippet

Make sure that the Optimizely snippet is on your page as high as possible in the <head> tag, and that there's only one Optimizely snippet on the page. Optimizely works best when installed directly in the <head> tag of every page where you would like to track a goal.

Then, check that the test is published and the snippet is up to date.

2. Check that the origin is set

If you haven't specified an origin in snippet settings, events may not tracking correctly. Optimizely uses local storage to synchronize experiment and variation IDs across protocols and sub domains, so you'll need to specify where Optimizely will be running.

Here's how to list the domains where Optimizely will run and events will be tracked.

3. Check whether the event is firing

In a running experiment, check whether the event is firing on the page. If the event isn't firing, it may not be set up correctly. Check your event setup to verify that it targets the right selector.

If you see the event fire in the console but not on the Results page, proceed to the next step.

4. Check experiment or campaign activation on the page

  1. Check the LayerStates field in the network traffic. If the layerStates array doesn't include an entry with layerId equal to the campaign ID,  the visitor has not activated the campaign.

  2. If you expect the experiment or campaign to be active on this page, make sure it's published and running. If you expect the campaign to have been activated in the past on a different domain, you may need to set up cross-origin targeting.