Action Keys and Experiment Goals
Track meaningful website actions and use those same keys as conversion goals for sticky variants.
Action keys are the measurement language for a custom website. They name things that happened: a page was viewed, a lead was submitted, a product was added, a checkout started, a booking was requested.
Keep the terms separate: action measures outcomes, experiments assign sticky variants, and the experiment goal points at the action key that counts as success.
Track an Action
Use key for action calls. The key is the action identifier used by SDK calls, filters, reports, and workflow logic.
await arky.action.track({
key: "hero.cta.clicked",
payload: {
placement: "homepage",
},
});Assign a Variant
Experiments are created in Admin under Experiments. A running experiment has:
- an experiment key, such as
homepage_hero - variants with keys and weights
- a goal action key, such as
hero.cta.clicked
The storefront call returns a sticky variant for the current contact and records that the variant was shown.
const experiment = await arky.experiments.use("homepage_hero");
if (experiment.variant_key === "agency") {
renderAgencyHero();
}
Track The Goal
When the visitor performs the goal action, track the goal action key. Include experiment metadata in the payload so downstream analytics can explain why the action happened.
await arky.action.track({
key: "hero.cta.clicked",
payload: {
experiment_key: experiment.experiment_key,
experiment_version: experiment.experiment_version,
variant_key: experiment.variant_key,
placement: "homepage_hero",
},
});Read Results
Admin shows the current winner from first-party ClickHouse analytics:
shown: contacts that used the experiment variantwins: contacts that later produced the goal action keyconversion_rate:wins / shownwinning_variant_key: the variant with the strongest current rate
This keeps normal action tracking useful on its own while allowing experiments to reuse the same event vocabulary.