Conversions
A Conversion is the definition of a valued action — "Purchase", "Signup", "Activated" — that you want to measure and optimize toward. It's the thing you define; what happens to a person when they complete it is their commercial state. One Conversion definition powers your experiments, journeys, funnel metrics, and scoring.
Info
"Goal" is retired as a product noun. The thing you define is a Conversion. What an experiment optimizes toward is a Metric. What a journey optimizes toward is a conversion event + window. The aggregate KPI number you commit to by a date is a Target.
What Is a Conversion?
A Conversion is a specific user action that represents value. When a visitor performs that action, Apex records it as a conversion event and attributes it to the right experiment variant, journey arm, or marketing source.
Conversions are reusable. Define one once, then reference it from as many experiments and journeys as you need. Exactly one Conversion per workspace is flagged primary — experiments without an explicit objective default to it, and the headline funnel + scoring use it.
Conversion Types
A Conversion is observed from an owned event — a signal the snippet or SDK sees directly. Apex supports four owned-event types:
| Type | What it tracks | Example |
|---|---|---|
form_submit | A form submission on the page | Newsletter signup, contact form, checkout form |
click | A click on a specific element | "Buy Now" button, CTA link, pricing toggle |
pageview | A visit to a specific page | Thank-you page, confirmation page, onboarding step |
custom_event | An event you send via the SDK | Video watched, file downloaded, feature activated |
Tip
form_submit and click conversions work automatically with the tracking snippet — no code changes needed. Use custom_event when you need to track something the snippet can't see, like a server-side action.
A Conversion can also carry platform links (Meta, Google, LinkedIn) for ad-ROAS reporting, but those attributed counts are never blended with the owned-event count and are never usable as an experiment or journey objective. See the measurement invariant below.
Creating a Conversion
Navigate to Conversions
Open the Conversions section in the Apex dashboard.
Choose a conversion type
Select the owned-event type that matches the action you want to track: form submission, click, pageview, or custom event.
Configure the target
Each type has different configuration options:
- Form submit: Select the form by CSS selector or let Apex auto-detect forms on the target page
- Click: Provide a CSS selector for the element (e.g.
#cta-button,.pricing-link) - Pageview: Enter the URL path that counts as a completion (e.g.
/thank-you) - Custom event: Define the event name that your code will send (e.g.
video_complete)
Name and save
Give the Conversion a clear, descriptive name. Good names describe the action and location: "Pricing page — Plan upgrade click" is better than "Conversion 1." Mark one as primary if it's the headline action for the workspace.
The Conversion Configurator
When you create a Conversion, the configurator helps you target the right element. For click and form_submit types, you can:
- Enter a CSS selector directly if you know it
- Use the visual selector to point-and-click on the element you want to track
- Test the selector to verify it matches the right element on the page
Info
CSS selectors should be as specific as possible. Prefer IDs (#signup-form) or data attributes ([data-conversion="signup"]) over generic class names that might change.
Connecting Conversions to Experiments
An experiment optimizes toward a Metric — and a Metric references a Conversion's owned-event source. When you create or edit an experiment, you pick which Conversion defines success (its primary Metric); you can add secondary and guardrail Metrics too.
The flow works like this:
- A visitor lands on the experiment's target page
- Apex assigns them to
controlorvariant_b - If the visitor completes the Conversion, Apex records it
- The completion is attributed to whichever variant the visitor was assigned to
This attribution is automatic. The snippet tracks both experiment assignment and conversion completion, then connects them using the visitor's anonymous ID. Because the owned event is the only signal observable for both the exposed and holdout cohorts, only the owned-event source of a Conversion may serve as a Metric.
Tracking Custom Events
For custom_event conversions, send events from your code using the tracking snippet's API or the SDK:
// Client-side (snippet API)
window.apex?.track("video_complete", {
videoId: "intro-demo",
duration: 120,
});
// Client / Node (SDK)
import { init, track } from "@apex-inc/sdk";
init({ workspaceKey: "YOUR_KEY" });
track("video_complete", {
videoId: "intro-demo",
duration: 120,
});
For backend signals (Stripe webhooks, CRM-driven conversions), use the Server Events API:
import { sendServerEvent } from "@apex-inc/sdk";
await sendServerEvent(
{ apiKey: process.env.APEX_API_KEY! },
{ type: "purchase_completed", email: "user@example.com", data: { value: 99, currency: "USD" } },
);
The event name in your code must exactly match the eventName configured on the Conversion.
Conversion Metrics
For each Conversion, the dashboard shows:
- Total conversions — How many times the Conversion was completed
- Conversion rate — Conversions divided by unique visitors
- Per-variant breakdown — Conversion rate for each experiment variant
- Trend — How the conversion rate is changing over time
These metrics update in real-time as the snippet collects data, and every number binds to exactly one source — never a blended total.
The measurement invariant
A Conversion may carry multiple sources (an owned event plus platform links), but no surface ever counts a blended total. Every measured number binds to exactly one (source, attribution-window, counting-method) tuple:
- Used as an experiment Metric or a journey conversion event → resolves to the owned-event source only.
- Platform-attributed counts (Meta/Google/LinkedIn) are valid for ad-ROAS and breakout reporting, and forbidden as lift or calibration denominators.
This is the discipline that keeps "the numbers don't match" tickets from ever appearing.
Targets
A Target is an aggregate KPI number you commit to by a date — MRR, pipeline, "1,000 signups by Q3." Bind a Target to a single owned-event Conversion to auto-count progress from its completions; otherwise it's a manual number you update yourself. See the Targets & Conversions API for the programmatic surface.
Best Practices
- One primary Metric per experiment. Multiple co-equal Metrics make it hard to declare a winner. Track the rest as secondary or guardrail Metrics.
- Name conversions descriptively. You'll reuse them across experiments and journeys — future-you will appreciate clear names.
- Prefer specific selectors.
#signup-ctais more reliable than.btn.primarywhich might match multiple buttons. - Test before activating. Use the configurator to verify your selector or event name works before running an experiment against it.