zero gravitySOLUTIONS
← All insightsPRODUCT DATA / IDENTITY GUIDE

Account identity in B2B product analytics.

QUICK ANSWER

Keep person identity separate from the account associated with each event. Use immutable internal keys, capture account context when the business action occurs, and test switching, support activity, and identity merges before trusting account-level metrics.

Inside this article 5 sections

B2B product analytics needs separate identities for the person performing an action and the account receiving its value. Use stable internal identifiers for both, attach the active account to each relevant event, and preserve that historical context when memberships change.

A person can belong to multiple customer accounts, switch workspaces in one session, or act on behalf of a customer through a support tool. Treating their email address or current account property as the whole identity model makes adoption reports ambiguous before any chart is built.

Separate the actor from the business context

Imagine a consultant, person P17, who belongs to customer accounts A20 and A84. On Monday they publish a report in A20. On Tuesday they switch to A84. Monday's report belongs to A20 even if their profile now lists A84 as the active account. An event should retain its own account identifier instead of depending on a mutable profile lookup.

Use a stable person ID after authentication and an immutable account ID from the application database. Emails change; company domains can represent several subsidiaries or shared service providers. Human-readable names are useful properties, but they should not silently become join keys. Keep names and identifiers separate in the event contract.

Original identity fixture · two accounts, one actor
EventActorAccount at occurrenceExpected attribution
Report published MondayP17A20A20 adopts reporting
Workspace switched TuesdayP17A84Navigation only
Report published TuesdayP17A84A84 adopts reporting
Support correction WednesdayStaff P03A20Excluded from customer adoption
The same actor can contribute to two account histories. Support activity remains visible without being counted as customer activation.

Capture context where the event becomes true

For business events, prefer the server that authorizes and commits the operation. It knows which account owned the resource and whether the action succeeded. A browser event can explain user intent, but a click on “Publish” should not establish that a report was published if validation later failed.

Include an event ID, person ID, account ID, occurrence time, schema version, and actor type. Use the authenticated request and authorized resource to establish context. Do not accept an arbitrary account identifier from the browser as proof that the person may act there. Analytics attribution and application authorization should agree, while remaining separate responsibilities.

PostHog group analytics supports account-level analysis by associating events with a group key. Configure the account group and send the intended association consistently. Browser SDK group state can affect subsequent events, so workspace switching and logout deserve explicit handling and tests. A correct backend integration does not repair browser events that carry stale group context.

Handle membership changes without rewriting history

A person leaving an account does not mean their earlier activity belongs nowhere. Keep historical event attribution and track membership periods separately when analysis needs to distinguish members from former members. Current access checks should still use current permissions; an analytics record never grants access to a former workspace.

Account consolidation is another distinct operation. If A20 and A84 merge commercially, preserve original account IDs in the raw events and maintain a documented reporting mapping to the new parent. This allows both historical operational reporting and a consolidated customer view. Blindly replacing old IDs destroys the ability to explain what the product knew at the time.

Person merging needs similar care. Anonymous sessions may become associated with a signed-in person, but shared browsers and support impersonation can create false joins. Only link identities when the application has a valid identity transition. Avoid merging people just because their email domains match.

Include an account with no human activity but a scheduled integration job. Decide whether that job qualifies as product adoption or only operational usage. An explicit actor type prevents an automated sync from being mistaken for a newly engaged customer.

Test the reporting grain with a small fixture

Create synthetic events for one person in two accounts, two people in one account, an anonymous visit followed by login, a workspace switch, a logout followed by another login, and a support action. Write the expected number of active people and active accounts for each case before running the pipeline.

Check both destinations and queries. A warehouse table may store every account ID correctly while a dashboard still counts people. Conversely, a group-based chart may be correct while lifecycle messaging chooses the person's most recently visited workspace. Trace one event through the complete product event architecture to find where the grain changes.

Name the business metric after its unit

“Active users” and “active customer accounts” answer different questions. Define whether an account needs one qualifying action by any member, several collaborating members, or a particular completed workflow. For account activation, a person-level funnel can undercount collaboration when different people complete different stages.

Once the identity fixtures pass, use them as regression checks for SDK upgrades and workspace changes. The activation funnel definition can then focus on value rather than identity repair. Software implementation can connect application identity, event contracts, and account-level reporting around the same rules.

FROM INSIGHT TO ACTIONCustom software development

Build account analytics on reliable identity.

We can implement actor and account mapping, group associations, and regression fixtures across your product and data destinations.

Explore software developmentDiscuss your build

Start with your goals.
We’ll work through the next step together.