Cohorts

Last updated:

Cohorts enable you to easily create a list of users who have something in common, such as completing an action or having the same property.

Here are a few examples of the cohorts you can create:

  • Users who work at the same company.
  • Users who used your app in the last week.
  • Users who have churned from your product.
  • Users who signed up recently.
  • Users who viewed the signup page, but didn't convert.

You can also use cohorts in trends, insights, and dashboards. This enables you to understand:

  • "Are people at company X using our app frequently?"
  • "What percentage of the users who signed up last week are still using our app?"
  • "Which features are our power users using?"

Cohorts vs. groups

Cohorts are often confused with groups, but they each serve different purposes:

  • Cohorts represent a specific set of users – e.g., a list of users that all belong to the same company.
  • Groups aggregate events based on entities, such as organizations or companies, and do not necessarily connect to a user. They enable you to analyze trends, insights, and dashboards at an entity-level, as opposed to a user-level.

Groups require additional code in your app to set up, while cohorts are created in PostHog and don't require additional code. This makes cohorts easier to use and quicker to get started. If your only goal is to create a list of users with something in common, we recommend cohorts instead of groups.

How to create a cohort

There are two methods to create a new cohort:

Method 1: Create a new cohort directly from an insight

You can create cohorts using data from insights such as trends, funnels, user paths and lifecycles.

Step 1: Go to insights and open any insight. Click a data point on the visualization to view the persons represented in the underlying data.

Step 2: In the modal popup, click 'Save as cohort' in the bottom right.

The video below shows how to create a new cohort from a trend, although you can similarly create a cohort from a funnel, user path, or any other insight.

Method 2: Create a new cohort from the cohorts page

Step 1: Navigate to the Cohorts page in the sidebar:

Step 2: Click '+ New Cohort' on the top right.

left hand navigation for cohorts

Static vs. dynamic cohorts

When creating a cohort, you'll choose between a static or dynamic cohort:

two types of cohorts: static and dynamic

Static cohorts

Static cohorts are lists of users that do not change over time. For example, all users who signed up for your app in January 2023.

Static cohorts are created from insights, or by uploading a csv of users. The CSV file only requires a single column with the user’s distinct ID. The very first row (the header) will be skipped during import.

To update the list, you can either upload another CSV to add more users, or use the interface to remove users.

Dynamic cohorts

Dynamic cohorts are defined by a continuously evaluated condition. This means that the members of the cohort can change over time. For example, a dynamic cohort could be all users who have have used a certain feature in your app.

Dynamic cohorts are created by matching users who meet a certain criteria. You can define this criteria by combining any number of the following conditions:

  • Users who have performed a specific event or action within a certain time frame.
  • Users who have certain properties.
  • Users based on their lifecycle event. For example, users who have recently stopped performing an event.
  • Users matching other cohorts.

Different criteria options for creating a dynamic cohort

Further reading

Want to know more about what's possible with Cohorts in PostHog? Try these tutorials:

Want more? Check our full list of PostHog tutorials.

Questions?

Was this page useful?

Next article

Data Management

Data Management lets you keep events and properties organized. Managing your data becomes especially helpful in situations where: It is hard to understand events, actions, and properties that you yourself didn't set up. Data decays quickly, and most of the time fails to stay up-to-date with instrumentation. Event-level context in insights and dashboards is difficult to share with external people and new team members. What is a definition? Definitions are the basic building blocks for how you…

Read next article