Overview
If you’re building a B2B product, you’ll want to track data at both the user level and the company level. Mixpanel’s Group Analytics allows you to analyze behavior by company, team, workspace, or any other group entity.Company Analytics requires Group Analytics, which is available on Growth and Enterprise plans. Learn more about pricing.
Why Track Company Data?
Tracking at the company level allows you to:- Understand which companies are most engaged
- Track account-level metrics like total users, activity, and health scores
- Build reports showing company-level adoption and usage
- Identify expansion opportunities
- Monitor churn risk at the account level
Setting Up Company Analytics
Step 1: Define Your Group Key
First, decide what identifier you’ll use for companies. Common choices:company_id- Your internal company identifieraccount_id- Account ID from your databaseorganization_id- Organization identifier
Step 2: Send Group Data with Events
When tracking events, include the group identifier:- JavaScript
- Python
- Node.js
Step 3: Set Group Properties
Just like user profiles, you can set properties on groups:- JavaScript
- Python
- Node.js
Common Company Properties to Track
Company Info
- Company Name
- Industry
- Company Size
- Location/Country
- Website
Account Details
- Plan Type
- MRR/ARR
- Contract Start Date
- Renewal Date
- Number of Seats
Engagement Metrics
- Active Users Count
- Last Activity Date
- Feature Adoption Score
- Health Score
Success Metrics
- Account Manager
- CSM Assigned
- NPS Score
- Support Tickets
Example: Complete Company Setup
Here’s a complete example of setting up company analytics:Analyzing Company Data
Once you’re sending company data, you can:1. View Company Profiles
Navigate to Users > Groups in Mixpanel to see all companies and their properties.2. Build Company-Level Reports
In any Mixpanel report, you can:- Group by company properties (e.g., Plan Type, Industry)
- Filter by company attributes
- View metrics aggregated at the company level
3. Create Company Cohorts
Build cohorts of companies based on:- Activity levels
- Feature usage
- Plan type
- Health scores
Best Practices
Use Cases
Track Account Health
Monitor Feature Adoption by Company
Track Expansion Revenue
Next Steps
Learn More About Group Analytics
Dive deeper into Group Analytics features and capabilities
FAQ
How many group keys can I have?
How many group keys can I have?
Each Mixpanel project supports up to 3 group keys. Common setups include:
company_idfor B2B companiesworkspace_idfor workspace-based productsteam_idfor team-based features
Can I change group keys later?
Can I change group keys later?
While technically possible, changing group keys requires re-sending historical data. It’s best to plan your group structure carefully from the start.
How do I handle users in multiple companies?
How do I handle users in multiple companies?
Users can belong to multiple groups. You can update the active group with
set_group() based on which company context they’re currently working in.What's the difference between group properties and event properties?
What's the difference between group properties and event properties?
- Group properties: Attributes of the company itself (name, plan, size) that persist over time
- Event properties: Context about a specific event occurrence (which feature, what value, etc.)