Group analytics
Contents
Group analytics is getting a makeover! Sign up for the customer analytics feature preview to get a sneak peek, and share your feedback.
Overview
Group analytics aggregates events by entities like organizations or companies instead of individual users. This is useful when you need to track behavior at the company, team, or project level.
With groups, you can:
- Track how companies progress through onboarding and activation
- Deploy feature flags to entire organizations
- Run experiments at the company level
- Measure metrics like daily active companies or company churn rate
Key concepts
Group types are categories you define - like "company" or "project". You can create up to 5 group types per project.
Groups are the individual entities within each type. For example, if your group type is "company," each group would be a specific company like "Acme Corp" or "Tech Solutions Inc." You can have unlimited groups within each group type.
How it works
- Define group types - like "company" or "channel"
- Assign group keys (unique identifiers) to each group
- Link events to groups in your code
- Analyze data by group instead of by user
Use cases
B2B product activation
Create a "company" group type to track how companies progress through your B2B product's onboarding with funnels:
- Calculate number of daily active companies, company churn rate, or feature adoption by company
- See how many companies signed up this month
- Track what percentage completed onboarding
- Measure what percentage of new companies used specific features
Channel retention
Create a "channel" group type for Slack-like apps to measure retention of features by channel:
- Track average messages per channel, monthly active channels, or channel participants
- See which channels consistently use video calling
- Measure how many channels stay active month over month
- Compare feature adoption rates by channel type
Project-level feature flags
Create a "project" group type for collaborative apps like Jira, Notion, or Figma:
- Track project pageviews, users per project, and project engagement
- Target feature flags at the project level
- Roll out refactored code to a few projects first, measure performance and errors, then expand based on results
Cross-product analysis
Group analytics works across PostHog's entire platform. Here's how you can use group types with different products:
| Product | Functionality | Example |
|---|---|---|
| Product analytics | Aggregate trends, funnels, retention, and stickiness by group | Track how many companies completed onboarding |
| Feature flags | Configure release conditions based on groups | Ensure all users of a company see the same feature flag variant |
| Experiments | Evaluate experiment results based on group aggregations | Run an A/B test to improve activation rate for new companies |
| Data warehouse | Join tables or enrich queries with groups data | Write SQL queries that calculate usage across different company sizes |
Groups vs cohorts
Groups and cohorts serve different purposes:
- Groups aggregate events and don't have to be connected to users. They require code in your app to set up.
- Cohorts represent specific sets of users with something in common. They're created in PostHog without additional code.
Use cohorts if you only need to analyze a list of users. They're simpler and faster to implement.
Set up group analytics
Create group types
Create group types before you associate events with them. Call the group identify method to create a group type and set properties.
In this example, we create a "company" group type. For each individual group (company), we set the group key like an ID or domain:
- Use singular names for group types - "company" not "companies"
- Use unique IDs as keys for individual groups, not names because names can duplicate
- Each project can have up to 5 group types
- You can have unlimited individual groups within each type
Set group properties
Every individual group can have properties associated with it, just like persons. For example, for a "company" group type, you might add company_name, date_joined, and subscription as properties for each individual group company.
You must include at least one group property for an individual group to appear in the people tab in the PostHog app.
Properties on individual groups work the same way as properties on people. They can be used in experiments and feature flags to roll out features to specific groups.
The PostHog app identifies an individual group using the name property. If the name property isn't found, it falls back to the group key.
Link events to groups
How you link events to individual groups depends on your SDK:
- JavaScript Web SDK: Call
posthog.group()once and all session events link to that individual group automatically. - Other SDKs: Pass the group information in the
groupsparameter for every event you capture.
Events must be identified to link to individual groups. If $process_person_profile is set to false, the event won't link to the group.
Multiple groups per event
You can't assign one event to multiple individual groups of the same group type, but you can assign it to individual groups of different group types.
Capture events for individual groups without a user
If you want to capture events for an individual group without linking them to a specific user, use a single static string as the distinct ID:
Using groups in PostHog
View individual groups
To view individual groups and their properties, go to the people tab in the PostHog app and select the group type you want to view. Group types are listed under the Groups section.


Analyze insights by group type
Use insights to view trends aggregated by group type.
For example, to see how many organizations signed up recently:
- Create an insight with your signup event.
- Expand the menu next to the event.
- Select Unique with your group type.
This shows total individual groups that signed up instead of individual users.


Use group types with funnels
Track how individual groups organizations move through conversion steps by setting Aggregating by to your group type.
This shows how many individual groups completed each step, the drop-off percentage, and which specific individual groups dropped off.


Use group types with feature flags
Create a feature flag and select your group type in the Match by dropdown under Release conditions.
Update your code to pass group information when checking feature flags:
Rename group types
Change how group types display in PostHog in Settings > Customer analytics.


Delete group types
To delete a group type:
- Go to the people tab in the PostHog app.
- Select Menu options > Delete group type.


- Event data remains unchanged. Group data is filtered from queries based on a deletion timestamp.
- Deleted group types don't count toward your 5 group type limit.
- If new events arrive with the same group key, the group type reappears with a new creation timestamp. Historical events (before the new timestamp) won't appear for the recreated group type.
Limitations
Group analytics has a few limitations to be aware of:
- Maximum of 5 group types per project
- You can delete group types, but not individual groups
- Multiple individual groups of the same group type can't be assigned to a single event
- Group types aren't supported for lifecycle insights or user paths
- Only individual groups with known properties appear in the people tab