---
title: "Troubleshooting web experiments"
slug: "troubleshooting-web-experiments"
abstract: "Describes how to troubleshoot web experiments during preview (Sitecore Personalize)."
---
# Troubleshooting web experiments

When you preview a web experiment, you can view variant errors in the QA tool, including `Handlebars.js` errors and JavaScript evaluation errors.

> [!note]
> If there are issues with the variant, the message or error displays beneath the status block.

![The Sitecore Personalize QA Tool.](https://doc.sitecore.com/api/markdown-image/personalize/en/users/sitecore-personalize/images/jsevaluationerror.png)

The following table details potential messages or errors:

| Status block | Message/Error | Type | Definition |
| --- | --- | --- | --- |
| **Valid Experience and Variant** | `Invalid Experience` | configuration | The reference you entered in the URL parameter when [previewing the web experiment](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/preview-a-web-experiment.html) was incorrect. |
| **Valid Experience and Variant** | `Invalid Variant` | configuration | The reference you entered in the URL parameter when [previewing the web experiment](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/preview-a-web-experiment.html) was incorrect. |
| **Page Targeting** | `Target page criteria not met` | execution | The [target webpage(s) are not valid](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/preview-a-web-experiment/target-a-webpage-in-a-web-experiment.html) for this page. |
| **Page Targeting** | `Custom targeting criteria not met` | execution | The custom JavaScript targeting code does not [return truthy for the webpage](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/preview-a-web-experiment/target-a-webpage-in-a-web-experiment.html) browser, and so on. |
| **Page Targeting** | `Custom targeting code invalid` | configuration | The custom JavaScript is invalid and cannot [run on the webpage](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/preview-a-web-experiment/target-a-webpage-in-a-web-experiment.html). |
| **Audience** | `Audience criteria not met` | execution | The guest is not in the segment you chose when you targeted a segment for the web experiment. |
| **Audience** | `Custom audience criteria not met` | execution | The JavaScript entered for the real-time audience does not return truthy. |
| **Audience** | `Custom audience code invalid` | configuration | The JavaScript entered for the real-time audience is invalid and cannot execute. |
| **Variant HTML/CSS/JS** | `JavaScript Evaluation Error` | configuration | The JavaScript entered in the JavaScript editor is invalid and unable to be evaluated. |
| **Variant HTML/CSS/JS** | `HandlebarsJS Error in HTML` | configuration | The Handlebars JavaScript that you entered in the HTML editor is invalid. |