Naming events
A handful of well named events answers more than a hundred vague ones. Start with five to eight.
Track outcomes that mean something
Page views and clicks are already captured. Custom events are for what datacub cannot see: that something worked. Good first events for most products:
| Event | When it fires | Properties |
|---|---|---|
signup_completed | the account was created | method |
onboarding_step_completed | each onboarding step, as one event | step |
project_created | the first moment someone gets value (yours may differ) | template |
checkout_completed | the server confirmed the payment | plan, currency, value |
subscription_started, subscription_cancelled | the subscription changed | plan |
invite_sent | a teammate was invited | role |
The rules
object_action, snake case, past tense:invoice_paid,report_exported. NotClicked Pay ButtonorpaymentSuccess.- One event with a property beats many events:
onboarding_step_completedwith{ step: 'profile' }, notonboarding_profile_done,onboarding_team_done. - Names never change: a renamed event is a new event, and old charts stop matching. Pick carefully, then keep it.
- No values in names: never
plan_pro_selectedor anything with an ID. Values go in properties. - Properties are few, flat and repeatable: plan names, steps, counts, true or false. Not free text, not who the user is.
- English names, any UI language: names are for your team and your code. Reports show them as written.
// one event, the step as a property
datacub.track('onboarding_step_completed', { step: 'profile' })
datacub.track('onboarding_step_completed', { step: 'invite_team' })Where to put the call
Next to the code that does the action, after it succeeded. Then the event stays right when the button moves, the copy changes or a second screen does the same thing.
export async function inviteTeammate(email: string, role: 'admin' | 'member') {
await api.createInvite({ email, role })
// the email stays in your system; datacub only needs the fact
datacub.track('invite_sent', { role })
}For funnels built from these events, see funnels and retention.