DocsData StructureGroup Analytics

Group Analytics: Group users together as an aggregated unit of measurement

Customers on an Enterprise or Growth plan can access Group Analytics as an add-on package. See our pricing page for more details.

Overview

Mixpanel Group Analytics allows behavioral data analysis at a customized group level (such as account, device—or any other way you want to assess your business).

Historically, Mixpanel grouped events by a single identifier called the distinct_id. This ultimately grouped events by the individual user. Group Analytics allows you to establish an event property other than the distinct_id, such as company ID, account ID, project ID, or billing ID, as an identifier by which to analyze your data.

Group By a Custom Identifier

Mixpanel Group Analysis allows you to select alternative unique identifiers in reports.

By default, Mixpanel counts unique users by distinct_id. Group Analytics allows you to uniquely count events by an alternative identifier, such as company ID, invite ID, or another value shared by a group of individuals with different distinct_ids.

This allows behavioral analysis from a business or group level, as opposed to an individual level. You can answer questions such as:

  • What companies are engaging the most with a product?
  • In instances where there are more than one user per account, such as a video streaming service, how are events triggered at an account level?
  • What groups convert through a funnel to a goal event (as opposed to what individual users convert)?

Group Profiles

Much like a user profile, Group Profiles are a collection of properties and event history specific to a group.

Group Profiles have an activity feed that shows the events performed by users in a group. Only the events attributed to the group with a defined group key will appear in the group’s activity feed.

The Group Profile also displays the properties unique to that group - here’s an example of it:

image

To access a group profile:

  1. Go to Users.

  2. Click the Analyze Uniques by dropdown above the query builder.

/Screen_Shot_2022-06-22_at_5.40.43_PM.png

3. Select the group identifier.

/Screen_Shot_2022-06-22_at_5.39.06_PM.png

  1. Groups profiles will populate the Users report.

Change the Group Identifier in a Report

By default, Metrics aggregates at the user-level. To change the identifier used for aggregation in a metric:

  1. Go to a report
  2. Click the “Users” dropdown within the Metric
  3. Select a Group. The report will now display results grouped by the newly selected group identifier.

When your Insights report includes multiple Metrics, you can individually toggle the identifier for each one.

For example, you can create an Insights report that shows Signups by unique Users and by unique Companies.

Similarly, you can build a report that displays Conversion Rates per User and per Company.

B2B Company Analytics

Company Analytics is a feature within Group Analytics tailored to B2B SaaS Companies. Here we focus on the idea that users ‘belong’ to a company, and that company behavior is dependent on user behavioral activity. For instance, if you have 2 accounts, each worth $50M but with 5 and 20 users respectively, the account with 20 users is considered more healthy and likely to renew compared to the other account.

Company Analytics enables you to understand such account health and activation metrics, which are derived from the underlying user activity.

To use these features, you must designate the group key as a company key when setting up the group.

Company Profiles

The Company Profiles page gives you a holistic view into your company health, which includes key metrics and company profile properties (i.e, company attributes).

Company Health Metrics on the page include KPIs on usage (DAU, WAU, MAU, new users), users’ engagement level (activity per user, life cycle of user), and their retention (Day 1, Week 1, and Month 1).

You can view the definition of each metric by clicking on the metric card, which will open the underlying Mixpanel report.

To access this page, click on Users/ Companies → Company Profile.

Note: This is only available if you have set up a B2B Company Key, an option available in the Group Analytics package.

image

Activation Metrics

SaaS companies often have use cases that require them to segment companies based on the number of users and the quality of users.

For example, a question you may have is ‘What is the number of trial accounts that have more than two active users?’. The hypothesis is that these accounts will convert faster.

We have a computed property in both breakdown and filter, called the “Number of users who did…”, available in the Group Analytics add-on, which enables you to answer these types of questions as it allows you to break down account activity by the number of active users.

image

When using “Number of users who did…” as a breakdown, we show you how many downloads came from different types of account health. For example, 605 downloads came from accounts with zero active users. ~1.5 downloads in the last 30 days came from accounts with two active users. Where an “active user” is defined by both the activity (e.g., event as such document created) and frequency of the activity (e.g., performing the event ≥1 time).

In a line chart, we look for activity per interval.

For example, in the below daily chart, we’re looking for activity qualification per day (i.e., an active user is one who has created at least one document on that day). The chart below shows that on Aug 19th, 35 accounts downloaded a document. Of the 35 accounts, 32 had one active user, 2 had two active users, and 1 had twenty-eight active users. Since most downloads originated from accounts with only one active user, we can conclude there is no correlation between account document downloaded activity and account health.

image

Implementation

Establish the group identifier with an event property as the Group Key, where the property value is the Group ID. As event property:value is group key:group id.

Group Keys in Project Settings

Group keys are project specific, and the group key must be set up before group data is sent.

To administer group keys, navigate to your Project Settings. Click +Add Group Key under the Group Keys section.

image

Enter an event property to attribute the group key to. You can also enter a display name for the group key. Click Save.

/Screen_Shot_2022-06-22_at_6.18.38_PM.png

Setup B2B Company Key

  1. Choose which group key will be used as the B2B Company Key. This is the key for which Company Profiles (B2B Company Analytics) will be generated.
  2. Specify the property that should be referenced as the Company name (identifier) throughout the Mixpanel interface.

You can change which group key should be used as the Company Key. To change, first unset the current group key set as Company Key in the project settings, and then set a new group key as the Company Key.

image

Group Keys Tracked as Event Properties

Group keys must be event properties. All events need to have a defined group key on them in order to be attributed to a group. Property names and values are case-sensitive so be sure to track the group key on your events exactly as you’ve established them in Project Settings.

Note: Mixpanel does not backfill historical data to groups before the group key was implemented. This means that Mixpanel is only able to attribute group data from the date that the group key was set up in your Project Settings. Historical events that contain the group key as an event property sent prior to the implementation of the group key in Project Settings will not be attributed to a group.

Attribute Events to Multiple Groups

An event can be attributed to multiple groups. To attribute to multiple groups, track the group event property’s value as a list of string-valued group ids.

mixpanel.track("Some Event", { company_id: ["01234", "56789", "55555"] });

Not all of a user’s events will be attributed to a group. Only the events with a defined group key will be attributed to the group and appear in the group’s profile’s activity feed.

Implement Using the Groups API

Mixpanel’s SDKs have methods to help you implement Groups Analytics.

Because the client has persistence, only client-side SDKs have methods for adding and removing a user’s events to a group (registering and de-registering the <group_key>: <group_id> as a super property to be tracked on all events).

Without persistence on the server, you will need to track <group_key>: <group_id> on all events that should be attributed to a group (or multiple groups).

Both client- and server-side SDKs have methods for creating and updating Group Profiles.

To view the setup guides for implementing Groups using the Groups API, follow the instructions connected to the SDK you are using found in Mixpanel’s Developer Documentation.

Upload Group Profiles Using the Users Report

It is possible to create Group Profiles by CSV upload as an alternative to the Groups API. Follow the instructions here to learn how to upload Group Profiles using the Users report.

Add Group Key to User’s Profile

Adding <group_key>: <group_id> to user profiles connects user profiles to group profiles. This allows you to view user group profile properties when analyzing by Users in reports; for example, when creating user cohorts based on group profile properties.

This relationship is one-way, meaning that you cannot use user profile properties when analyzing by a Group in reports.

Because a user can be part of multiple groups within a group key, set the value of the user property as a list of string values, i.e., "company_id": ["1", "2"]

FAQ

Limits

The limits below ensure group analytics works correctly in Mixpanel:

Events Missing from Groups

The group key property must be present as an event property on an event in order to attribute them to a group profile.

Having the group key present as a user profile property does not automatically attribute the events by that user to the group.

Mixpanel does not backfill historical data to groups before the group key was implemented. This means that Mixpanel is only able to attribute group data from the date that the group key was set up in your Project Settings. Historical events that contain the group key as an event property sent prior to the implementation of the group key in Project Settings will not be attributed to a group.

Group Analysis in Reports

Group properties are supported when analyzing by users, but user properties are not supported when analyzing by groups.

Exporting Group Profiles via API

Use the Engage API endpoint to export Group Profiles by adding data_group_id in the data param of the request.

curl --request POST \
  --url https://eu.mixpanel.com/api/2.0/engage \
  --header 'Authorization: Basic <redacted>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'filter_by_cohort={"id": <cohort_id_here>}' \
  --data data_group_id=<data_group_id_here>

The <data_group_id> for the respective group key’s profile can be found under Group Keys within Project Settings:

image

Alternatively, the <data_group_id> can also be seen as part of the URL of the Group Profile page:

https://mixpanel.com/project/<project_id>/view/<workspace_id>/app/profile#distinct_id=<distinct_id>&data_group_id=<data_group_id>

Here’s an actual example with data_group_id = -1405123841946871899:

image

How is B2B Company Analytics different than Group Analytics?

Company Analytics is an advanced offering ‘within’ group analytics.

Group Analytics focuses on the concept of there being multiple entities on which analysis can be done ‘independently’ (eg. user ID, restaurant ID, driver ID, company ID, etc.)

Company Analytics is specific to B2B Companies where you are likely to have a user ID and company ID. Here we focus on the idea that users ‘belong’ to a company, and that company behavior is ‘dependant’ on user behavioral activity. For instance, in SaaS companies, the health of an account is determined by how active the users of that account are.

What are the unique features of B2B Company Analytics?

There are two features unique to B2B Company Analytics being set up, which aren’t available with the generic group analytics setup.

  • Company Profiles - this is an advanced version of group profiles that shows you the health of a company
  • Company Activation filters & breakdowns

Was this page useful?