Prompt
How do I track in-app behavior for B2B accounts?
Latest observation
To track in-app behavior for B2B accounts, you usually want to go beyond user-level analytics and identify activity at the account / company / workspace level. The goal is to answer questions like:
- Which accounts are active or at risk?
- Which features drive expansion?
- What actions correlate with conversion, retention, or churn?
- Which users belong to the same company and how do they behave together?
1) Define the unit you want to analyze
For B2B, track behavior at three levels:
- User: individual person
- Account / Company / Workspace: the customer organization
- Event: actions taken in the product
A good B2B analytics setup connects each event to both:
user_idaccount_id
So if a user logs in, clicks a feature, invites a teammate, etc., the event should be attributed to their company as well as them individually.
2) Identify accounts in your product
You need a way to map users to accounts. Common methods:
- Login domain matching:
alice@acme.com→acme - Explicit workspace selection: user belongs to a selected org/workspace
- Billing/customer records: account IDs from your CRM or database
- SSO / SCIM: strong enterprise identity mapping
Best practice: use a stable internal account_id, not just company name.
3) Instrument events with account context
Every important event should include:
user_idaccount_idtimestampevent_name- optional properties like:
planroleseat_countfeature_nameresource_idintegration_type
Example event schema:
{
"event_name": "feature_used",
"user_id": "u_123",
"account_id": "a_456",
"timestamp": "2026-10-23T12:00:00Z",
"properties": {
"feature_name": "report_export",
"plan": "business"
}
}
4) Track account-level events too
Some behaviors belong to the account, not just the user:
- account created
- user invited
- seats added
- plan upgraded/downgraded
- integration connected
- SSO enabled
- admin settings changed
These are often the strongest signals of account health and intent.
5) Build account-level metrics
Useful B2B metrics include:
- Active accounts: accounts with any meaningful event in a period
- Product-qualified accounts (PQAs): accounts meeting usage thresholds
- Feature adoption by account: % of accounts using a feature
- Team expansion: number of active users per account
- Time to value: time from signup to first key action
- Retention by account cohort: account-level retention curves
- Breadth of usage: how many distinct features a company uses
- Depth of usage: how often they use core features
6) Segment by company attributes
To make behavior useful for sales, success, and product teams, enrich accounts with metadata like:
- industry
- company size
- ARR / contract value
- plan tier
- sales segment
- region
- customer lifecycle stage
- owner / CSM / AE
This lets you compare behavior across segments, like:
- SMB vs enterprise
- trial vs paid
- high-ARR vs low-ARR
- churned vs retained accounts
7) Use account-based funnels and cohorts
Instead of only user funnels, build funnels like:
- account created → invited teammate → connected integration → used core feature → upgraded
- first login → admin setup → team adoption → renewal
And cohort by:
- signup month
- sales segment
- first feature used
- industry
- plan type
This helps identify which behaviors predict conversion or retention.
8) Make sure identity resolution is solid
Common pitfalls:
- same person using multiple emails
- one company having multiple workspaces
- subsidiaries or parent-child accounts
- shared logins or generic emails
- users changing companies
You’ll want rules for merging and associating identities. In some products, a single customer account may contain multiple workspaces or sub-accounts.
9) Use the right tools
Typical stack:
- Product analytics: Amplitude, Mixpanel, Heap, PostHog
- CDP / event pipeline: Segment, RudderStack
- Warehouse: Snowflake, BigQuery, Redshift
- BI: Looker, Tableau, Mode, Metabase
- CRM/CS tools: Salesforce, HubSpot, Gainsight
For B2B, it’s especially helpful if your analytics tool supports:
- account-level grouping
- user-to-account association
- custom properties
- cohorts and retention
- sync with CRM
10) Start with the key business questions
A practical way to design tracking is to ask:
- What behaviors indicate activation?
- What behaviors indicate expansion?
- What behaviors indicate churn risk?
- What behaviors show multi-user adoption?
- What features are sticky at the account level?
Then instrument only the events needed to answer those questions.
A simple implementation pattern
At login or signup:
- create/identify
user_id - map user to
account_id - send an identify call with both
- include
account_idon all future events - sync account metadata regularly from your source of truth
If you want, I can also give you:
- a recommended event schema for B2B SaaS,
- an example tracking plan,
- or a Segment/Mixpanel/Amplitude implementation example.