A conversion event is a tracked interaction that indicates a visitor has completed a goal you care about. It's implemented as a JavaScript event that fires when the action occurs — a form submission, a button click, a purchase confirmation, or any other measurable action.
Conversion events are the foundation of experimentation. Without them, there's no way to measure whether a variant is winning or losing.
How Conversion Events Work
A conversion event is typically a snippet of JavaScript that fires when a specific action happens:
// Example: track a signup conversion
document.getElementById('signup-form')
.addEventListener('submit', () => {
analytics.track('signup_completed')
})
When this event fires, your experimentation platform records it against the variant the visitor was shown. Over time, the platform compares conversion rates across variants to determine a winner.
Common Conversion Events
| Event | What It Tracks |
|---|---|
form_submitted | A lead form or signup form was completed |
purchase_completed | A transaction was finished |
add_to_cart | A product was added to the shopping cart |
cta_clicked | A call-to-action button was clicked |
demo_booked | A demo or meeting was scheduled |
trial_started | A free trial was activated |
Primary vs. Secondary Conversion Events
Most experiments track one primary conversion event — the main metric you're trying to improve. But it's good practice to also track secondary events to watch for unintended effects.
For example, a pricing page test might use:
- Primary event:
trial_started— Did more visitors start a trial? - Secondary events:
pricing_page_bounce,plan_selected— Did engagement change elsewhere in the funnel?
A variant might increase trial starts but reduce the percentage of users who pick a paid plan. Secondary events help you catch that.
Best Practices
- Fire events server-side when possible — Client-side events can be blocked by ad blockers or fail to fire on slow connections
- Use consistent naming conventions — A clear taxonomy (
category_actionformat) prevents confusion as you scale - Validate event firing — Always verify that events are triggering correctly before launching a test. A misconfigured event means invalid test results.
- Avoid duplicate events — Ensure the event fires once per conversion, not once per page load or interaction