Write an Event Tracking Plan
Decide what to track before writing tracking code.
Hello. In this lesson I will take you through 4 ideas, one at a time.
Why it matters: Decide what to track before writing tracking code. After each idea I will ask you one quick question.
In this lessonFollows you as you read
Why a plan
The short version: Without a plan, teams track everything with inconsistent names and then cannot answer basic questions.
Without a plan, teams track everything with inconsistent names and then cannot answer basic questions. A tracking plan lists each event, when it fires, its properties and the question it answers. It becomes the contract between product and engineering.
Start with 15 to 30 events that map to key user actions.
What does a tracking plan define?
Naming and properties
The short version: Use a consistent pattern such as object then action in past tense: project created, report shared, plan upgraded.
Use a consistent pattern such as object then action in past tense: project created, report shared, plan upgraded. Add properties that explain context: plan, source, size, feature variant. Avoid putting personal data in event properties.
Keep user and workspace identifiers so you can analyse both people and accounts.
Where should payment events be tracked?
Server or client
The short version: Track important business events on the server, where they cannot be blocked or faked, such as payments and record creation.
Track important business events on the server, where they cannot be blocked or faked, such as payments and record creation. Use client events for interface behaviour such as clicks and views.
Make server events the source of truth for revenue and activation.
What should event properties avoid?
Keep it clean
The short version: Review new events in pull requests against the plan, and deprecate unused events.
Review new events in pull requests against the plan, and deprecate unused events. Test tracking in staging. A small, trustworthy dataset beats a large messy one.
Assign an owner for the tracking plan.
- Write the plan before the code
- Name events as object plus past-tense action
- Add context properties, not personal data
- Track business events on the server
- Review and prune events regularly
Write a tracking plan with 15 events for your product, including when each fires and its properties. Mark which must be server-side.
Mark it complete to track your progress on this device.