> For the complete documentation index, see [llms.txt](https://docs.elevateab.com/elevate-helpcenter/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elevateab.com/elevate-helpcenter/experiment-setup/custom-events/troubleshooting-custom-events.md).

# Troubleshooting Custom Events

Fix Elevate A/B Testing custom events that do not fire, fail validation, fire only on the control, or count more than once per action.

***

Use this page when a custom event is not recording what you expect. Each entry starts with the symptom, then the likely cause, how to confirm it, and the fix.

To check whether an event is firing, perform the action on your storefront, then open **Custom Events** in the Elevate A/B Testing sidebar, select refresh, and look at **24 Hours Count**.

***

### The 24 Hours Count stays at 0 after I perform the action

**Likely cause:** the trigger does not match what you did.

| Event type                                  | Common mismatch                                                                                  |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| Product page visits, Collection page visits | You visited a product or collection that is not in the event's selection                         |
| URL visits                                  | The URL you visited differs from the one entered, for example by a query string or trailing path |
| Clicks, Element viewed                      | The element you chose does not match the element on the page                                     |
| Scroll depth                                | You did not scroll past the point you set                                                        |
| Custom JavaScript event                     | The snippet is not on the page, or its selector does not match                                   |

**How to confirm:** in **Custom Events**, open the event with the edit action and compare the trigger with the page and element you used. For a Custom JavaScript event, open the page source in your browser and search for `eab:custom_event`.

**Fix:** correct the trigger or selector, save, perform the action again, and select refresh.

### Validate does not pass for a Custom JavaScript event

**Likely cause:** one of the following:

* The snippet is in a theme that is not published.
* The action was not performed after the snippet was added.
* The `tracking_id` was edited.
* The element is added to the page after it loads, so the listener never attaches.

**How to confirm:** check that you edited the published theme. Then open your browser's developer console on the page, perform the action, and look for JavaScript errors.

**Fix:** add the unedited snippet to the published theme. For elements added after load, listen on `document` and check the target, as shown in [Custom JavaScript Events](https://docs.elevateab.com/elevate-helpcenter/experiment-setup/custom-events/custom-javascript-events.md). Perform the action once and select **Validate** again.

### The event fires on the control but not on a variation

**Likely cause:** the variation uses a different template or theme that does not contain the tracked element or snippet. Variation templates and alternative themes do not automatically carry elements or code added elsewhere.

**How to confirm:** preview the variation and check that the element exists. For a Custom JavaScript event, search the variation's page source for `eab:custom_event`.

**Fix:** add the element or snippet to every variation template or theme before launching. If the experiment is already running, the variation's data for this event is not usable. Fix the setup and start a new experiment.

### The event counts more than once per action

**Likely cause:** the snippet is added in more than one theme file, or the listener is attached to an element that sits inside another tracked element.

**How to confirm:** search your theme code for the event's `tracking_id` value and count the matches.

**Fix:** keep the snippet in one file only.

### An experiment with a custom trigger has few or no visitors

**Likely cause:** the trigger event fires rarely or not at all. Only visitors who perform the trigger action are enrolled, so a trigger that never fires means nobody enters the experiment.

**How to confirm:** in **Custom Events**, check the trigger event's **24 Hours Count**. If it is 0 or very low, the event is the problem. If it is healthy, the experiment is enrolling as expected and the action is simply uncommon.

**Fix:** if the count is 0, fix the event using the first entry on this page. If the action is uncommon, choose a broader trigger, or remove the trigger and use the event as a custom metric instead. Triggered experiments take longer to reach significance because fewer visitors qualify.

### Still stuck?

Contact Elevate A/B Testing support with the event name, the event type, and the page where you performed the action.

### Next steps

* [Manage Custom Events](https://docs.elevateab.com/elevate-helpcenter/experiment-setup/custom-events/manage-custom-events.md) to check an event's 24-hour count
* [Create a Custom Event](https://docs.elevateab.com/elevate-helpcenter/experiment-setup/custom-events/create-a-custom-event.md) for trigger settings by event type
* [Custom JavaScript Events](https://docs.elevateab.com/elevate-helpcenter/experiment-setup/custom-events/custom-javascript-events.md) for snippet placement and validation
