Setting Up Conversions
A Conversion defines what success looks like — the valued action you want to measure and optimize toward. Every experiment optimizes toward a Metric that references a Conversion, so setting up your Conversions is the first step before running a test.
Info
"Goal" is retired as a product noun. You define a Conversion; an experiment optimizes toward a Metric (which points at a Conversion); a journey optimizes toward a conversion event + window; a Target is an aggregate KPI number by a date. See Conversions for the full model.
Conversion Types
A Conversion is observed from an owned event. Apex supports four types, each tracking a different kind of user action:
| Type | Trigger | Best For |
|---|---|---|
| Form Submit | Visitor submits a specific form | Lead generation, signups, contact forms |
| Click | Visitor clicks a specific element | CTA buttons, pricing plan selection, navigation |
| Pageview | Visitor reaches a specific URL | Thank-you pages, checkout confirmation, onboarding completion |
| Custom Event | Your code fires a specific event | Purchase, video play, feature activation, any custom action |
Creating a Conversion
Navigate to Conversions
Go to Conversions in the dashboard sidebar and click Add Conversion.
Choose the conversion type
Select one of the four types above. The configuration form changes based on your selection.
Configure the trigger
Form Submit: Enter a CSS selector that identifies the form (e.g. #signup-form or form[data-form="contact"]). The tracking snippet intercepts form submissions matching this selector.
Click: Enter a CSS selector for the clickable element (e.g. .cta-button or #pricing-start). Apex tracks clicks on matching elements.
Pageview: Enter the URL path that counts as a completion (e.g. /thank-you or /onboarding/complete). Supports exact match or prefix match.
Custom Event: Enter the event name that your code sends via apex.track() or the SDK's track() function (e.g. purchase_completed or trial_started).
Name your conversion
Give it a clear, descriptive name. This appears in experiment results and the dashboard. Good: "Pricing page signup form submit." Bad: "Conversion 1." Mark one as primary if it's the headline action for the workspace.
Save
Click Save. The Conversion is now available to reference from experiments and journeys.
Connecting Conversions to Experiments
When creating an experiment, you select a Conversion as the experiment's primary Metric. Apex tracks how many visitors in each variant complete that Conversion and calculates conversion rates accordingly.
Info
Each experiment has one primary Metric that determines the winner. You can add secondary and guardrail Metrics for additional insight, but the primary Metric is what drives the statistical analysis. A Metric always resolves to a Conversion's owned-event source — the only signal observable for both the exposed and holdout cohorts.
Conversion Type Details
Form Submit
The tracking snippet automatically monitors all <form> elements on your page, plus "formless" regions (groups of inputs with a submit button but no <form> wrapper, common in React and Plasmic sites). When a form is submitted, it counts as a completion. For native <form> elements, the snippet also injects hidden attribution fields.
<!-- Native form — tracked automatically -->
<form id="signup-form" action="/api/signup" method="POST">
<input type="email" name="email" />
<button type="submit">Sign Up</button>
</form>
<!-- Formless region — also tracked automatically -->
<div class="contact-section">
<input type="text" name="name" />
<input type="email" name="email" />
<button>Submit</button>
</div>
See Form Tracking for details on how formless detection works and manual tracking options.
Click
Click conversions track interactions with specific page elements. The selector should be specific enough to match only the element you care about.
Apex provides several ways to select the element:
- Visual picker (iframe preview) — Apex loads a preview of your page and lets you click the element directly. Works on most static and server-rendered sites.
- Live site picker — If the preview can't render your site (common with React, Next.js, or Plasmic), Apex opens your actual live site in a new tab. The Apex snippet activates a picker overlay — click an element and the selector is sent back to the dashboard automatically.
- Bookmarklet — If the Apex snippet isn't installed yet, drag the "Apex Picker" bookmarklet to your bookmarks bar and click it on your site to pick an element.
- Manual selector — Enter a CSS selector directly if you know it (e.g.,
#cta-buttonor.pricing-signup).
Tip
Use an id selector when possible (#cta-button) for precision. Class selectors (.btn-primary) may match multiple elements — which is fine if you want to track any of them.
Pageview
Pageview conversions fire when a visitor navigates to a specific URL. This works well for funnel tracking — if your signup flow ends at /welcome, a pageview conversion on that URL captures everyone who completes the flow.
Custom Event
Custom event conversions give you full flexibility. Send any event from your code and use its name as the trigger:
// Using the tracking snippet
window.apex.track("trial_started", { plan: "pro" });
// Using the SDK
import { track } from "@apex-inc/sdk";
track("trial_started", { plan: "pro" });
Best Practices
- One primary Metric per experiment. Multiple co-equal Metrics dilute statistical power. Pick the one Conversion that matters most as the primary; track the rest as secondary or guardrail.
- Use form submit for lead gen. It's the most reliable trigger since the snippet handles it automatically.
- Test your conversion before launching. Open the page, trigger the action, and verify the event appears in the dashboard's event stream.
- Name conversions descriptively. You'll reference them across multiple experiments and journeys — clear names save confusion later.
Next Steps
- Run an experiment using your new Conversion
- Learn about the tracking snippet and how it captures events
- Send custom events for advanced conversion tracking