Guides

Goals and conversions

The four goal types, how conversions are counted, and how to track custom events.

A goal is what counts as a conversion. Add one or more goals in the Goals step when you create a test, and mark one as primary. Results show every goal separately.

Goal types#

TypeWhat you enterCounts when
ClickA CSS selector, such as #headerCTA or .bodyCTAA visitor clicks the element or anything inside it.
Form submitA CSS selector for the form, such as form#signupA visitor submits that form.
Page visitA URL, with URL is, URL contains or URL matches regexA visitor in the test loads a matching page.
Custom eventAn event name, such as signupYour page calls ABTest.track('signup').

Click and form goals#

These are watched on the control and variation pages. Use selectors that exist on every version of the page.

Page visit goals#

Use these for thank-you and confirmation pages. The page must be on a registered domain and must have the install snippet in its <head>. URL is ignores the query string, the hash and a trailing slash. URL contains checks the full address. URL matches regex is not case sensitive.

Custom event goals#

Call ABTest.track from your own code when something happens that a click or page visit cannot capture, such as a completed checkout in a single-page app. The page needs the install snippet.

JavaScript
// After a successful signup
ABTest.track('signup');

Event names can use letters, numbers and _ . : -. One event counts toward every running test that has a goal with the same name.

How conversions are counted#

MetricHow it is counted
VisitorsUnique visitors who entered the test and saw a version.
ConversionsUnique visitors who completed the goal at least once.
Conversion rateConversions divided by visitors.

Unique, not total

A visitor who completes a goal five times counts as one conversion. Only visitors who are already in the test count, so a visit from someone who never saw the control or a variation is ignored.