Skip to main content


Optimizely Knowledge Base

Troubleshooting: Metrics don't track correctly in Optimizely

  • 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 experiment 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 track 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.


If none of the above steps help, we encourage you to submit a ticket with our Technical Support Team. If you do this, please include the following information so our agents can troubleshoot the issue (especially important for custom events):

  • The name & ID of the relevant event and how is this event implemented?

  • How to trigger the event conversion? (specific steps, which URLs to visit, specific actions one needs to perform, etc.)

  • If there is custom code related to the event, please tell us where is it implemented.