Skip to main content
A conversion goal is what a test is measured against. You manage goals in pagent under Tracking → Goals. Click New goal to create one: For anything that happens in your code or your backend, use an event goal.

Create an event goal

1

Send the event

Make sure the event reaches pagent, from your site code, an observed source or your backend. It is listed under Tracking → Sources → Events once it has arrived.
2

Create the goal

Go to Tracking → Goals, click New goal and choose Event goal. Select the Event. Events that have only been observed so far are marked (observed).
3

Choose how to count

Count conversions sets how often one visitor can convert: Once per session (default), Once per visit or Every time. Optionally set a Goal Name; it defaults to the event label.
4

Save

Click Add Goal.
The goal is computed retroactively: every occurrence of the event that was already recorded counts from day one, in every arm of every test.

Advanced settings

Open Advanced in the goal dialog for:
  • Measure: Converted (did the visitor convert), Count (how many times), Sum (a numeric payload field such as cart.items) or Revenue (the event’s revenue).
  • Only count users with at least N occurrences, for Count and Sum.
  • Counting window: count only conversions within a number of hours After exposure to the test (default 72), or only during the Final days of the test (default 14).
  • Delay: start counting a number of hours after exposure. A negative value includes conversions from just before exposure.
  • Outlier capping for revenue and sums: Automatic, Percentile, Fixed or Off.
  • Goal direction: Higher is better or Lower is better, for goals like cart abandonment or error rate.

Add goals to a test

  1. Open the test in the Editor.
  2. Under the settings icon, open Manage conversion goals.
  3. Add the goal and choose whether it is the primary goal.
The same goal can be used in as many tests as you like.

Migrating from programmatic goals

Programmatic goals only counted conversions sent with kind: "conversion" and a label matching the goal, and only once that goal had been published to your site. Moving to events takes three steps.
1

Send an event with the same label

Change kind: "conversion" to kind: "event". Keep the label, revenue and properties as they are.
Replace window.pagent.track("signup") with window._pgnt.push({ kind: "event", label: "signup" }). On your backend, move from /v2/conversions to /v2/events.
2

Create an event goal

Create an event goal on the label as described above and add it to your new tests.
3

Retire the programmatic goal

Once no running test uses the programmatic goal anymore, archive it.
A running test keeps measuring the goals it started with. If a running test uses a programmatic goal, keep sending the conversion until that test ends. You can send both calls side by side during the switch:
The event goal’s history starts with the first event you send, not with your older conversions.