Blog / Measuring in PostHog and Stripe
SaaS tracking plan: the events to set up in PostHog, stage by stage
A SaaS tracking plan fits in about fifteen events, two or three per AAARRR stage. Which ones, how to name them, and the three PostHog settings that decide data quality.
A tracking plan is the list of events your product sends to PostHog, each with the exact moment it fires, its properties and the question it answers. For a SaaS, about fifteen well-chosen events are enough to read the six stages of the AAARRR funnel. This article gives them one by one, with naming conventions, the properties to attach, and the three PostHog settings that decide whether the numbers can be trusted: identification, actions and groups.
Why a plan before the code
An event added without a plan answers today's question and no other. Three months later you discover that "signup" fires on the button click rather than on account creation, that the plan property is called plan here and tier there, and that nobody knows whether "activated" was ever sent. The plan prevents that because it forces four things to be written down for each event: the name, the trigger, the properties, the question.
The funnel provides the structure: one stage, one question, two or three events. Here is the minimal plan.
The events, stage by stage
Names follow PostHog's recommendation, the object then verb format, in lowercase.
Awareness: who sees us
$pageview: provided by autocapture, with the URL, referrer and UTM parameters. Nothing to add, everything to use: it is the event that gives unique visitors by channel.
Question: how many unique visitors, by channel, this week?
Acquisition: who signs up
signup form submitted: browser side, when the form is sent. Properties:method(email, Google),plan_intentif the visitor picked a plan first.account created: server side, when the account exists in the database. This event, not the previous one, counts acquisition: a submitted form can fail.
Question: what share of unique visitors creates an account, by channel?
Activation: who reaches first value
onboarding step completed: once per step, with astepproperty (data source connected, first invite, first project). One event with a property beats five events.activation reached: server side, when the account crosses the milestone you defined as first value (first report generated, first message sent, first data received). It is the most important event in the plan and the most often missing, because it requires having decided what value is.
Question: what share of accounts created reaches activation within seven days, by weekly signup cohort?
Retention: who comes back
- The recurring value event: the one a customer performs every time they genuinely use the product (
report viewed,message sent,export downloaded). Not the login, which measures the habit of opening a tab. workspace member invitedandworkspace member joined: in a collaborative tool, a second user arriving is the best predictor of retention, and an expansion signal.
Question: what share of the January cohort performed the value event in March? PostHog's Retention insight computes it from a start event and a return event, by day, week or month, and distinguishes first-time from recurring occurrences.
Revenue: who pays
trial started,subscription created,subscription upgraded,subscription downgraded,subscription canceled: server side, from billing webhooks, withplan,interval(monthly, annual) andmrr_delta.
Revenue itself is read in Stripe, which remains the source of truth for MRR. Sending these events to PostHog lets you cross them with usage: which behavior precedes an upgrade, which cohort cancels before the third month.
Question: what share of activated accounts becomes paying, and how long after activation?
Referral: who tells others
invite sent: withinvite_type(colleague in the same account or outside person). The two mean different things: the first is expansion, the second acquisition.account createdcarries, when applicable, areferrer_idproperty to link the new account to the inviter.
Question: how many accounts created each month come from an invite?
The table to maintain
| Stage | Event | Trigger | Properties | Side |
|---|---|---|---|---|
| Awareness | $pageview | Autocapture | URL, referrer, UTM | browser |
| Acquisition | account created | Account written to the database | method, referrer_id, original UTM | server |
| Activation | activation reached | Value milestone crossed | days_since_signup | server |
| Retention | value event | Real usage | product-specific | product-specific |
| Revenue | subscription created and variants | Billing webhook | plan, interval, mrr_delta | server |
| Referral | invite sent | Invitation sent | invite_type | server |
The full document has one more column, the question the event answers. If you cannot fill it in, the event does not belong in the plan.
The three PostHog settings that make the difference
Identification. An anonymous visitor and a logged-in user are two people to PostHog until you link them. The docs say to call identify "as soon as you're able to, typically when a user logs in or creates an account", with a stable identifier (your database ID, not an email that can change); PostHog then "merges the anonymous person into the identified person", and the pre-signup journey joins the account. On logout, call reset, otherwise two people on the same browser become one. A cost detail: PostHog bills anonymous events up to four times cheaper than identified ones, so the marketing site stays anonymous and the application is identified.
Actions. An action combines several events, or autocaptured elements, into a single analyzable entity, and applies retroactively to past events. It is how you repair an imperfect plan: three signup buttons become one "signup" action, and the history is kept.
Groups. A SaaS sells to companies, not to people. Group analytics attaches each identified event to a group (type "company", key = your account ID), which lets you count activated accounts rather than activated users, and compute retention per company. It is a paid add-on, limited to five group types per project, and it earns its cost as soon as several people share one account.
Setting up the plan in a day
- Write the table above, adapted to your product, with the "question" column. Decide the activation milestone first: it is the only hard decision.
- Add
identifyat login and account creation,resetat logout, and the "company" group if several users share an account. - Send the server events from billing webhooks and from the code that writes to the database. Check in PostHog's event explorer that they arrive with their properties.
- Build three insights: a funnel from Awareness to Activation, a retention on the value event, a trend of new MRR. If a question stays unanswered, an event or a property is missing: add it to the plan, then to the code, in that order.
What to remember
A SaaS tracking plan is about fifteen events named object then verb, an activation milestone decided before anything else, facts sent from the server and intents from the browser, identification at login and accounts modeled as groups. The plan lives in a document that changes before the code, never after.
Frequently asked questions
What is a tracking plan?
The document that lists the events a product sends to its analytics tool, each with its name, the exact moment it fires, its properties and the question it answers. It is the contract between whoever instruments the code and whoever reads the numbers. Without one, every insight starts with an archaeology of event names.
How many events does a SaaS tracking plan need?
About fifteen are enough to read the six funnel stages: two or three per stage, plus the properties that let you slice them (plan, acquisition channel, account size). A fifty-event plan written on day one is never kept up to date. Add an event when a specific question requires it, not before.
Should I use PostHog autocapture or custom events?
Both, for different jobs. Autocapture records pageviews, clicks and form submissions with no code and suits the marketing site and exploration. The funnel steps that matter (account created, activation, invite) deserve a named custom event, sent from the server where possible, because a button click is not proof that the action succeeded.
How should I name events?
PostHog recommends an object then verb format, such as project created or user signed up. Pick one casing and keep it everywhere, put variants in a property rather than a new event (one plan upgraded event with a plan property, not three events), and write every name in the plan before it goes into the code.
Sources
- PostHog docs, Capturing events: https://posthog.com/docs/product-analytics/capture-events
- PostHog docs, Identifying users: https://posthog.com/docs/product-analytics/identify
- PostHog docs, Actions: https://posthog.com/docs/data/actions
- PostHog docs, Retention: https://posthog.com/docs/product-analytics/retention
- PostHog docs, Group analytics: https://posthog.com/docs/product-analytics/group-analytics