> 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.md).

# Custom Events Overview

What custom events are in Elevate A/B Testing, the seven event types, and how to use one as a goal, a custom metric, or a custom trigger.

***

A custom event tracks a specific visitor action on your store, such as visiting a chosen product, clicking a button, seeing a section, or scrolling to a point on the page. You create it once, Elevate A/B Testing stores it in **Custom Events**, and you can reuse it in any experiment.

Most custom events need no code. Only the **Custom JavaScript event** type needs a snippet added to your theme.

***

### What can custom events do in Elevate A/B Testing?

| Capability                              | Elevate A/B Testing         | Details                                                                                                                                                                                                 |
| --------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Custom conversion goal                  | Yes                         | Any custom event can be the experiment goal that decides the winner. The goal is set when you create the experiment and cannot be changed after launch.                                                 |
| Secondary custom metrics                | Yes                         | Custom metrics are reported for every variation without affecting the winner. You can add them to an experiment that is already running.                                                                |
| Event-based experiment entry            | Yes                         | A custom trigger enrolls only visitors who perform the action. Set in the Audiences step.                                                                                                               |
| Reusable custom events                  | Yes                         | Each event is stored once in Custom Events and can be used in any number of experiments. Within one experiment, an event has one role.                                                                  |
| Results for an event added after launch | Partly                      | Product page, collection page, and URL visit events count from the start of the experiment. Click, element viewed, scroll depth, and Custom JavaScript events count from when the event started firing. |
| No-code event creation                  | Yes, for 6 of 7 event types | Only the Custom JavaScript event type needs a snippet in your theme                                                                                                                                     |
| Custom events sent from your server     | No                          | Custom events are tracked in the visitor's browser on your Shopify storefront. They cannot be sent from your server or backend.                                                                         |

### Can I reuse a custom event across experiments?

Yes. Elevate A/B Testing stores every custom event once, in **Custom Events** in the sidebar, whether you created it there or during experiment setup. Any number of experiments can then use it, so you define an action such as "clicked the size guide" one time and measure it everywhere you need it.

One event can play different roles in different experiments. It can be the goal in one experiment, a custom metric in a second, and the custom trigger that decides who enters a third. Within a single experiment, each event has one role: the goal, the trigger, or a custom metric.

### What happens to results when I edit a shared custom event?

An edit applies to every experiment that uses the event. You can change an event's name, description, and trigger settings, but not its type. What the edit does to results depends on the event type.

| Event type                                    | What an edit changes                                                                                                             |
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Product page, collection page, and URL visits | Changing which pages or products count updates results in every experiment that uses the event, including data already collected |
| Clicks, element viewed, and scroll depth      | Only what is tracked from the edit onward. Results already collected stay as they were.                                          |
| Custom JavaScript event                       | Only the name and description can be edited, so results are not affected                                                         |

Updated results can take a little while to appear. Before you change the pages or products on a page visit event, check which experiments use it, because their past results will change too. See [Manage Custom Events](/elevate-helpcenter/experiment-setup/custom-events/manage-custom-events.md).

### Can I add a custom event to an experiment after it starts?

Yes, as a custom metric. The experiment goal is chosen when you create the experiment and cannot be changed after launch, so pick a custom event goal before you launch.

How far back a custom metric counts depends on the event type.

| Event type                                    | Results start from                                                                                                                           |
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Product page, collection page, and URL visits | The start of the experiment. Elevate A/B Testing already records page views, so earlier visits are included. Paused periods are not counted. |
| Clicks, element viewed, and scroll depth      | When the event was created and started firing on your store                                                                                  |
| Custom JavaScript event                       | When your snippet went live on your theme                                                                                                    |

If you need a click, element viewed, scroll depth, or Custom JavaScript event measured from the first day, create it and confirm it fires before you launch the experiment.

### Can I send custom events from my server?

No. Elevate A/B Testing tracks custom events in the visitor's browser on your Shopify storefront. Custom events cannot be sent from your server, backend, or an external API.

For an action the no-code event types cannot detect, use a Custom JavaScript event. Add the snippet Elevate A/B Testing generates to your theme and keep its tracking ID unchanged. Elevate A/B Testing links each event to the visitor and the variation they are seeing automatically. See [Custom JavaScript Events](/elevate-helpcenter/experiment-setup/custom-events/custom-javascript-events.md).

Because custom events are tracked in the browser, visitors who decline cookie consent are not counted in custom event results. On experiments launched with Shopify server events, a custom event used as the experiment goal is still matched to the visitor and variation that server events recorded.

### What is a custom event?

Elevate A/B Testing measures the commerce funnel out of the box: conversion rate, product and collection page views, add-to-cart rate, cart-to-checkout rate, checkout start and success rates, revenue per visitor, average order value, and profit per visitor. You find these in **Choose what to measure** when you set up an experiment.

Those built-in metrics tell you whether a visitor bought. They do not tell you whether visitors engaged with the thing you changed. When you move a bundle selector, add a subscription toggle, or redesign a size guide, the built-in funnel shows the downstream effect without showing whether anyone used the new element. A custom event measures that step.

### When should you use a custom event?

Use a custom event when the action you want to measure is narrower than a built-in metric, or sits between landing and add to cart.

| You want to know                                                                              | Event type              |
| --------------------------------------------------------------------------------------------- | ----------------------- |
| Do visitors reach the product you are promoting, not just any product                         | Product page visits     |
| Do visitors reach a specific collection, such as Best Sellers or Bundles                      | Collection page visits  |
| Do visitors reach a specific page, such as a size chart, comparison, or quiz page             | URL visits              |
| Does the new subscribe and save toggle, sticky add to cart bar, or size guide button get used | Clicks                  |
| Do visitors actually see the new reviews or trust badge section                               | Element viewed          |
| Do visitors read far enough down a long product page to reach the details                     | Scroll depth            |
| Does the product finder get completed, or a back in stock form get submitted                  | Custom JavaScript event |

You do not need a custom event for an action already listed in **Choose what to measure**. Product page view rate, for example, already counts visits to any product page. Use **Product page visits** only when you care about specific products.

### Which event types are available?

| Event type                  | Fires when                                         | Code needed |
| --------------------------- | -------------------------------------------------- | ----------- |
| **Product page visits**     | A visitor lands on the product pages you choose    | No          |
| **Collection page visits**  | A visitor lands on the collection pages you choose | No          |
| **URL visits**              | A visitor lands on specific URLs                   | No          |
| **Clicks**                  | A visitor clicks an element you choose             | No          |
| **Element viewed**          | An element appears on the visitor's screen         | No          |
| **Scroll depth**            | A visitor scrolls past a point you set             | No          |
| **Custom JavaScript event** | Your own code triggers it                          | Yes         |

Start with the no-code types. Use **Custom JavaScript event** only when the action cannot be expressed as a page visit, click, view, or scroll, for example a form submitting successfully, a variant selection changing, or a multi-step finder reaching its last step.

### Where can you use a custom event?

Every custom event is stored in **Custom Events**, no matter where you created it. Once saved, you can use it in any experiment, in any of these places.

| Where           | What it does                                                     | Decides the winner |
| --------------- | ---------------------------------------------------------------- | ------------------ |
| Experiment goal | The metric the experiment is judged on                           | Yes                |
| Custom metrics  | Reported for every variation alongside the goal                  | No                 |
| Custom triggers | Enrolls only visitors who perform the action into the experiment | Not applicable     |

The same event can play more than one role. For example, a **Product page visits** event can be the custom trigger in one experiment and a custom metric in another.

### FAQs

**Do I need a developer to create a custom event?** Only for **Custom JavaScript event**. The other six types are set up entirely in Elevate A/B Testing.

**Can I reuse a custom event in another experiment?** Yes. Every custom event is stored in **Custom Events**, whether you created it there or during experiment setup, and is available to every experiment.

**Do custom metrics affect which variation wins?** No. Custom metrics are reported for every variation, but only the experiment goal determines statistical significance.

**What is the difference between a custom trigger and audience targeting?** Audience targeting filters visitors by who they are or where they came from, such as device, new or returning, UTM parameters, source, or country. A custom trigger filters by what they do on your store: only visitors who perform the action are enrolled.

### Next steps

* [Create a Custom Event](/elevate-helpcenter/experiment-setup/custom-events/create-a-custom-event.md) to set up a no-code event
* [Custom JavaScript Events](/elevate-helpcenter/experiment-setup/custom-events/custom-javascript-events.md) for actions that need your own code
* [Use Custom Events as Goals and Metrics](/elevate-helpcenter/experiment-setup/custom-events/use-custom-events-as-goals-and-metrics.md) to add an event to an experiment
* [Use Custom Events as Triggers](/elevate-helpcenter/experiment-setup/custom-events/use-custom-events-as-triggers.md) to enroll only visitors who perform an action
* [Manage Custom Events](/elevate-helpcenter/experiment-setup/custom-events/manage-custom-events.md) to check, edit, or delete events
* [Troubleshooting Custom Events](/elevate-helpcenter/experiment-setup/custom-events/troubleshooting-custom-events.md) if an event is not firing
