Product analytics 8 min read

B2B product analytics: accounts, plans and seats

In a B2B product the customer is a company, and a company has many users. How to count accounts, describe them with properties, and stop invited teammates from looking like drop-off.

David Granzin By David Granzin

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:

OperationEffectUse for
setSets the value. A later set replaces it.State that changes: plan, seats, role
set_onceSets the value only if there is none yet.Facts about the start: signup_channel, first_plan
unsetRemoves 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

PropertyBelongs onWhy
plan, seats, mrr_bandAccountEveryone in the account shares it
industry, company_sizeAccountDescribes the company
role, teamUserDiffers per person
signup_channelUser or account, with set_onceA fact about how they arrived
Plan chosen at checkoutEventTrue 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.

The Steps panel of a funnel in Maple with four steps from signup_started to plan_started. The Count by control offers Person, Visitor, User, Group and Session, and Break down by is set to the plan property.
Count by sets the unit. Group counts each account once, whoever in it did the step.

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.

QuestionCount 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.

A signup-to-paid funnel counted by person and broken down by the user property plan: free 702 entered, 4 converted, 0.57%; pro 318 entered, 43 converted, 14%; team 96 entered, 14 converted, 15%; Not set 90 entered, none converted.
The signup funnel on example data, counted by person and split by each person's current plan.

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 plan on 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_once at 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_completed to 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_started to invite_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

PostHogMaple
posthog.group("company", id, props)groupId in identify(), group_set for the properties
Several group types per projectOne group per event
Person properties, $set and $set_onceUser properties, set and set_once
Group propertiesAccount properties
Funnel aggregated by a group typeCount 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.

FAQ

よくある質問

How is B2B product analytics different from B2C?
In a B2B product the customer is an account with several users, and the account is what signs up, activates, pays and churns. Counting individual users overstates drop-off, because most users of a paying account never start a plan themselves. B2B analytics counts accounts and uses account properties such as plan and seat count.
What is group analytics?
Group analytics attaches each event to a group, usually the account or workspace, as well as to the user. Charts and funnels can then count distinct accounts instead of distinct users, and filter or break down by properties of the account.
What is the difference between a user property and an account property?
A user property describes one person: their role, their signup channel. An account property describes the company: its plan, seat count, industry. Plan belongs on the account, because everyone in the account shares it.
Should a funnel count users or accounts?
Count accounts when the outcome belongs to the account, such as activating or starting a paid plan. Count users when the question is about individual behaviour, such as whether invited teammates finish their own onboarding.
Why do invited users look like drop-offs in my funnel?
Because they sign up into an account that already pays, so they never reach the payment step themselves. Counted by user they never convert. Counted by account they belong to an account that already did.

今日、最初のトレースを。

SDKを追加し、OTLPエクスポーターをMapleに向ければトレースが届きます。

maple.dev:OpenTelemetryの上のオブザーバビリティ