1. Help Center
  2. Troubleshooting

Best Practices for Fixing Metrics

Learn how to troubleshoot and fix Metrics that are not collecting data

Table of Contents

Did you receive an alert about a Metric not collecting data? Or does the data from one of your Metric look wrong? Follow these steps to troubleshoot and fix your Metrics.

Learn more about Monitoring Alert and how to configure them.

There are a number of scenarios that can cause a Metric to stop receiving data. Most common causes include the following:

  • Your website has changed.
  • Your Campaigns have changed.
  • A JavaScript error has occurred, and prevents an EventTrack Metric from firing properly.
  • A Global or Campaign Variation is no longer applying.

Identify the Metric Type

Understanding the Metric type is important to help determine the best course of action for troubleshooting and fixing purposes.

Review the Metric Triggers, are they Client-Side or Server-Side? Is the Metric using EventTrack? 

Update the Triggers

Websites change and evolve all the time, and a site release can break your Metrics. This happens when a Metric is looking for a specific pattern on your website, and that pattern is no longer available. This could be a URL, an element in the source of your page or data layer, a cookie, etc.

Review the Metric Name, Description, Triggers and Preview URL. This information should help you understand what the Metric is meant to be measuring.

Launch a preview session:

Make sure to navigate to pages where you expect this Metric to Trigger, and pages where you don’t. Look at the preview Panel and confirm if the Metric appears with a green check mark where appropriate, or not.

Adjust Triggers, and preview again. Confirm the Metric is firing in all scenarios where you expect it to fire, and does not fire otherwise. 

Save your changes.

Review Campaigns and Sequence

Find Campaigns associated with the Metric under Associated Tests, on the Metric Detail Page, in the upper end right of the page:

By default, Metrics apply before Variations change your pages, with exceptions for Redirects and Origin Variations.

Are any of the associated Campaigns modifying pages where your Metric is trying to match? 

When multiple components apply on the same page, the Evaluation Sequence determines the order in which these components are evaluated.

Review the Sequence by looking under the Metric Advanced Settings, and under the Variations Advanced Settings, and adjust accordingly. Components with a lower evaluation sequence are evaluated first.

You can also update the Triggers on your Metric page, to ensure that it keys off an element that is reliable and unchanged by your Campaigns.

Fix EventTrack Metrics

EventTrack Metrics are comprised of two components:

  • Metric detail, including Triggers and other settings
  • JavaScript code that fires the event

Launch a Preview session, from the Metric or Campaign page, and see if your EventTrack Metric is firing properly. If you don’t see it appear correctly in the Preview Panel with a green check mark, follow these steps.

To troubleshoot your EventTrack Metrics, make sure to locate the JavaScript code where the event call originates from. Look for that code in:

  • Global Variations
  • Variations inside of Campaigns (not recommended)
  • Your own code base (not recommended)

Once you have located the JavaScript code that generates the event, follow this guide to troubleshoot and fix the issue: Using EventTrack for Advanced Visitor Tracking.

Preview Your Metric

To ensure that your Metrics measure accurately the intended behaviors, make sure to Preview them on your website, and confirm that they are working properly:

  • Launch a Preview session from the Metric detail page
  • Launch a Preview session from Campaigns where the Metric is included. Make sure to preview for different Variation Groups.
  • When previewing at the Campaign level, also use the Advanced Preview Settings to preview with multiple Campaigns in overlay
  • Confirm that the Metric is firing as intended
  • Confirm that the Metric is not firing in other cases

Fix Metrics used in EngineAPI Campaigns

Metric used with EngineAPI are triggered via API calls. In order to troubleshoot them, review the logic in your app or codebase, to make sure that the API calls are made properly and that behaviors are accurate measured.

Learn more about using Metrics with EngineAPI.

Archive Old Metrics

Have you recently created a new version of a Metric, and left the old one in your Campaigns? If that’s the case, you can safely make the Metric Inactive to archive it. This will not delete any reporting and analytics data, but it will remove the Metric from the list of available Metrics when building Campaigns moving forward, and will make sure you no longer get alerted about this Metric. 

If this Metric has never received any data in the first place and is no longer needed, consider deleting it.