Lesson 1 of 5 · 25 min

Write an Event Tracking Plan

Decide what to track before writing tracking code.

XDQ Tutor · AI guide

Hello. In this lesson I will take you through 4 ideas, one at a time.

  1. Why a plan
  2. Naming and properties
  3. Server or client
  4. Keep it clean

Why it matters: Decide what to track before writing tracking code. After each idea I will ask you one quick question.

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.

Quick check

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.

Quick check

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.

Quick check

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.

Key takeaways
  • 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
Try it

Write a tracking plan with 15 events for your product, including when each fires and its properties. Mark which must be server-side.

That is the lesson.
Mark it complete to track your progress on this device.
← CourseCourse overviewNext lesson →Define Activation: The Moment Users Get Value