A lot of product analytics advice assumes one person equals one customer. In a B2B product that is wrong in a specific way: an account signs up, activates and pays, and inside it are five or fifty people who each do a small part. Count people, and the numbers for signup, activation and payment come out skewed.
This guide is the last part of the series. It builds on the tracking plan and the signup funnel from the earlier parts.
Key takeaways
- Send the account id on every event, from the browser and the backend.
- Count funnels by account when the outcome belongs to the account: activation, payment.
- Plan, seats and industry are account properties. Role is a user property.
- A property filter reads the current value. Use an event property for what was true at the time.
- Billing webhooks often know the account and not the user. Those funnels must be counted by account.
The account is the unit
Take a signup-to-paid funnel counted by person. One founder signs up, connects the product and starts a plan. Then she invites four colleagues. Each of them signs up too, into an account that already pays, and none of them ever reaches the payment step.
Counted by person, that is five signups and one conversion: 20%. Counted by account, it is one signup and one conversion. The product did nothing wrong, and the first number says four people were lost.
The same distortion runs through activation and retention. An account is active when anyone in it is. It has churned when nobody is. Both are questions about the group.
Send the account
Every event needs to say which account it belongs to. In Maple that is the group id: your own id for the account, workspace or organization.
In the browser, pass it when you identify the user. Every event after that carries it:
app.ts
import { MapleBrowser } from "@maple-dev/browser"
MapleBrowser.identify({
id: user.id,
groupId: org.id, // the account this user belongs to
groupName: org.name,
traits: { role: "admin" },
})
On the server, send group_id next to user_id on every event, or maple.product_event.group_id on an annotated span. Use the same id in both places. An event with no group id is left out of everything counted by account.
Maple has one group per event. If your product has two levels, such as an organization with several workspaces, pick the level that pays.
User and account properties
An id says which account. Properties say what kind: its plan, how many seats it has, its industry. Users have properties too, such as a role. Both are written with three operations:
| Operation | Effect | Use for |
|---|---|---|
set | Sets the value. A later set replaces it. | State that changes: plan, seats, role |
set_once | Sets the value only if there is none yet. | Facts about the start: signup_channel, first_plan |
unset | Removes the property. | State that ended: trial_ends |
On the events API, set, set_once and unset apply to the user, and group_set, group_set_once and group_unset to the account. Any event can carry them. $identify and $groupidentify are events that exist only to carry them.
POST /v1/events
{"name":"$identify","user_id":"user_123","set":{"role":"admin"},"set_once":{"signup_channel":"newsletter"}}
{"name":"$groupidentify","group_id":"org_456","group_set":{"plan":"pro","seats":12,"industry":"fintech"}}
{"name":"plan_started","user_id":"user_123","group_id":"org_456","attributes":{"plan":"pro","seats":12},"group_set":{"plan":"pro"}}
The third line does two things. It records the plan as an event property, the plan chosen at that moment, and it updates the account's plan to its new current value. In the browser, the traits passed to identify() become user properties.
What goes where
| Property | Belongs on | Why |
|---|---|---|
plan, seats, mrr_band | Account | Everyone in the account shares it |
industry, company_size | Account | Describes the company |
role, team | User | Differs per person |
signup_channel | User or account, with set_once | A fact about how they arrived |
| Plan chosen at checkout | Event | True at that moment only |
Update the account's properties from the place that owns the truth. The plan changes in your billing webhook, so that is where group_set belongs.
Count by account
In a Maple funnel, Count by decides who is counted. Group counts accounts: several users of one account are one, and the steps can be done by different people in it.
In a team, one person signs up, another connects the data source and a third enters the card. By person, nobody completes that funnel. By account, it is one conversion.
| Question | Count by |
|---|---|
| How many accounts that sign up start a plan? | Group |
| How many accounts reach activation in their first week? | Group |
| Do invited teammates finish their own onboarding? | User |
| How many visitors to the pricing page sign up? | Person |
The first step of an account funnel has to carry a group id. signup_started from an anonymous visitor does not have one yet, so start account funnels at the first event after the account exists, such as signup_completed.
Break down by plan
Break down by lists user properties and account properties next to the session and event dimensions. Choosing one splits the funnel into a row per value.
This table is the problem from the start of the guide, in numbers. 414 of the people who started signing up are on a paid plan today: 318 on pro and 96 on team. Only 57 of them started a plan themselves within the window. Most of the other 357 joined an account that someone else pays for. Counted by person, every one of them is a drop-off.
The other two rows have their own explanations. The 4 conversions on free are people who started a plan and have since gone back to free: the table shows the plan they have now. Not set is people who never got a plan property at all, mostly because they did not finish signing up.
For a breakdown that says something about the product, split by a property the funnel does not change: the account's industry or company_size, or the user's role. "Fintech accounts activate at twice the rate of the rest" is a finding. "Paying accounts have paid" is not.
Current value, not past value
A filter or breakdown by a user or account property reads the property's current value and applies it to all of that user's or account's events, including earlier ones. Filter by plan = pro and you get everything today's pro accounts ever did, including what they did while on the free plan.
That is the right behaviour for some questions and the wrong one for others:
- "What did accounts that are now on pro do in their first week?" Use the account property. You want today's pro accounts and their history.
- "How do people on the free plan use exports?" Use an event property. Send
planon the event, and it records the plan at that moment. - "Which signup channel produces accounts that pay?" Write the channel on the account with
group_set_onceat signup, then break the account funnel down by that property. It keeps the first value and never changes.
Properties are kept for a year past their last write. Setting them again on a regular event, such as sign-in, keeps them fresh.
Events without a user
Some of the most important events have no user. A billing provider's webhook says which account started a plan. It does not say who clicked. Send the event with the account alone:
curl -X POST https://ingest.maple.dev/v1/events \
-H "Authorization: Bearer YOUR_INGEST_KEY" \
-H "Content-Type: application/x-ndjson" \
--data-binary $'{"name":"plan_started","group_id":"org_456","attributes":{"plan":"pro"},"group_set":{"plan":"pro"}}\n' An event with only a group id is stored and counted, but it cannot be linked to a person. A funnel counted by Person that ends on such an event shows 0%, however many accounts paid. Count that funnel by Group. If your billing provider lets you attach metadata to a checkout, pass your user id through it and send both.
The numbers to watch
With accounts and properties in place, the standard B2B questions become funnels and charts:
- Account activation rate. A funnel by Group from
signup_completedto your activation event, within seven days. - Trial or free to paid. The same funnel extended to
plan_started, with a window as long as your trial or sales cycle. - Time to value. The time to convert of the activation funnel: the median, and the time 90% finish within.
- Team adoption. A funnel by Group from
plan_startedtoinvite_sent. Single-user accounts are worth watching as their own group. - Active accounts. A dashboard chart over product events that counts distinct accounts per week.
When one account's numbers look wrong, the Users page opens a single user with their sessions, errors, traces and events in one place.
Coming from PostHog
| PostHog | Maple |
|---|---|
posthog.group("company", id, props) | groupId in identify(), group_set for the properties |
| Several group types per project | One group per event |
Person properties, $set and $set_once | User properties, set and set_once |
| Group properties | Account properties |
| Funnel aggregated by a group type | Count by Group |
Two differences matter when moving a setup over. Maple has a single group level, so a project that uses both a company and a workspace group type has to choose one. And Maple always reads a property at its current value, where PostHog by default reads person properties as they were when the event happened. That changes the result of any filter on a property that moves. Use event properties in Maple for anything that must be true at the time.
Maple
Accounts, users and their traces in one place
The same user and account ids sit on product events, session replays and traces. When an account's funnel stalls, the sessions, requests and errors of its users are in the same tool. See product analytics in Maple.