• Product
  • Pricing
  • Docs
  • Using PostHog
  • Community
  • Company
  • Login

Table of contents

  • Overview
    • Quickstart with PostHog Cloud
    • Overview
      • AWS
      • Azure
      • DigitalOcean
      • Google Cloud Platform
      • Hobby
      • Other platforms
      • Instance settings
      • Environment variables
      • Securing PostHog
      • Monitoring with Grafana
      • Running behind a proxy
      • Configuring email
      • Helm chart configuration
      • Deploying ClickHouse using Altinity.Cloud
      • Configuring Slack
      • Overview
        • Overview
        • Upgrade notes
        • Overview
        • 0001-events-sample-by
        • 0002_events_sample_by
        • 0003_fill_person_distinct_id2
        • ClickHouse
          • Backup
          • Kafka Engine
          • Resize disk
          • Restore
          • Vertical scaling
          • Horizontal scaling (Sharding & replication)
        • Kafka
          • Resize disk
          • Log retention
        • PostgreSQL
          • Resize disk
          • Troubleshooting long-running migrations
        • Plugin server
        • MinIO
        • Redis
        • Zookeeper
      • Disaster recovery
    • Troubleshooting and FAQs
    • Architecture
    • Managing hosting costs
    • EU-only hosting
    • Overview
    • Ingest live data
    • Ingest historical data
    • Identify users
    • User properties
    • Deploying a reverse proxy
    • Libraries
    • Badge
      • Snippet installation
      • Android
      • iOS
      • JavaScript
      • Flutter
      • React Native
      • Browser Extensions
      • Elixir
      • Go
      • Java
      • Node.js
      • PHP
      • Python
      • Ruby
      • Docusaurus v2
      • Gatsby
      • Google Tag Manager
      • Next.js
      • Nuxt.js
      • Retool
      • RudderStack
      • Segment
      • Sentry
      • Slack
      • Shopify
      • WordPress
      • Message formatting
      • Microsoft Teams
      • Slack
      • Discord
    • To another self-hosted instance
    • To PostHog from Amplitude
    • Between Cloud and self-hosted
  • Tutorials
    • Overview
    • Actions
    • Annotations
    • Cohorts
    • Correlation Analysis
    • Dashboards
    • Data Management
    • Events
    • Experimentation
    • Feature Flags
    • Funnels
    • Group Analytics
    • Heatmaps
    • Insights
    • Lifecycle
    • Organizations and projects
    • Paths
    • Persons
    • Retention
    • Session Recording
    • Sessions
    • Settings
    • SSO & SAML
    • Stickiness
    • Subscriptions
    • Toolbar
    • Trends
    • UTM segmentation
    • Overview
    • Troubleshooting
      • Overview
      • Tutorial
      • TypeScript types
      • Developer reference
        • Amazon Kinesis Import
        • BitBucket Release Tracker
        • Braze Import
        • Event Replicator
        • GitHub Release Tracker
        • GitHub Star Sync
        • GitLab Release Tracker
        • Heartbeat
        • Ingestion Alert
        • Email Scoring
        • n8n Connector
        • Orbit Connector
        • Redshift Import
        • Segment Connector
        • Shopify Connector
        • Twitter Followers Tracker
        • Zendesk Connector
        • Airbyte Exporter
        • Amazon S3 Export
        • BigQuery Export
        • Customer.io Connector
        • Databricks Export
        • Engage Connector
        • GCP Pub/Sub Connector
        • Google Cloud Storage Export
        • Hubspot Connector
        • Intercom Connector
        • Migrator 3000
        • PagerDuty Connector
        • PostgreSQL Export
        • Redshift Export
        • RudderStack Export
        • Salesforce Connector
        • Sendgrid Connector
        • Sentry Connector
        • Snowflake Export
        • Twilio Connector
        • Variance Connector
        • Zapier Connector
        • Downsampler
        • Event Sequence Timer
        • First Time Event Tracker
        • Property Filter
        • Property Flattener
        • Schema Enforcer
        • Taxonomy Standardizer
        • Unduplicator
        • Automatic Cohort Creator
        • Currency Normalizer
        • GeoIP Enricher
        • Timestamp Parser
        • URL Normalizer
        • User Agent Populator
    • Overview
    • POST-only public endpoints
    • Actions
    • Annotations
    • Cohorts
    • Dashboards
    • Event definitions
    • Events
    • Experiments
    • Feature flags
    • Funnels
    • Groups
    • Groups types
    • Insights
    • Invites
    • Members
    • Persons
    • Plugin configs
    • Plugins
    • Projects
    • Property definitions
    • Session recordings
    • Trends
    • Users
    • Data model
    • Overview
    • GDPR guidance
    • HIPAA guidance
    • CCPA guidance
    • Data egress & compliance
  • Support
    • Overview
    • Code of conduct
    • Recognizing contributions

Table of contents

  • Overview
    • Quickstart with PostHog Cloud
    • Overview
      • AWS
      • Azure
      • DigitalOcean
      • Google Cloud Platform
      • Hobby
      • Other platforms
      • Instance settings
      • Environment variables
      • Securing PostHog
      • Monitoring with Grafana
      • Running behind a proxy
      • Configuring email
      • Helm chart configuration
      • Deploying ClickHouse using Altinity.Cloud
      • Configuring Slack
      • Overview
        • Overview
        • Upgrade notes
        • Overview
        • 0001-events-sample-by
        • 0002_events_sample_by
        • 0003_fill_person_distinct_id2
        • ClickHouse
          • Backup
          • Kafka Engine
          • Resize disk
          • Restore
          • Vertical scaling
          • Horizontal scaling (Sharding & replication)
        • Kafka
          • Resize disk
          • Log retention
        • PostgreSQL
          • Resize disk
          • Troubleshooting long-running migrations
        • Plugin server
        • MinIO
        • Redis
        • Zookeeper
      • Disaster recovery
    • Troubleshooting and FAQs
    • Architecture
    • Managing hosting costs
    • EU-only hosting
    • Overview
    • Ingest live data
    • Ingest historical data
    • Identify users
    • User properties
    • Deploying a reverse proxy
    • Libraries
    • Badge
      • Snippet installation
      • Android
      • iOS
      • JavaScript
      • Flutter
      • React Native
      • Browser Extensions
      • Elixir
      • Go
      • Java
      • Node.js
      • PHP
      • Python
      • Ruby
      • Docusaurus v2
      • Gatsby
      • Google Tag Manager
      • Next.js
      • Nuxt.js
      • Retool
      • RudderStack
      • Segment
      • Sentry
      • Slack
      • Shopify
      • WordPress
      • Message formatting
      • Microsoft Teams
      • Slack
      • Discord
    • To another self-hosted instance
    • To PostHog from Amplitude
    • Between Cloud and self-hosted
  • Tutorials
    • Overview
    • Actions
    • Annotations
    • Cohorts
    • Correlation Analysis
    • Dashboards
    • Data Management
    • Events
    • Experimentation
    • Feature Flags
    • Funnels
    • Group Analytics
    • Heatmaps
    • Insights
    • Lifecycle
    • Organizations and projects
    • Paths
    • Persons
    • Retention
    • Session Recording
    • Sessions
    • Settings
    • SSO & SAML
    • Stickiness
    • Subscriptions
    • Toolbar
    • Trends
    • UTM segmentation
    • Overview
    • Troubleshooting
      • Overview
      • Tutorial
      • TypeScript types
      • Developer reference
        • Amazon Kinesis Import
        • BitBucket Release Tracker
        • Braze Import
        • Event Replicator
        • GitHub Release Tracker
        • GitHub Star Sync
        • GitLab Release Tracker
        • Heartbeat
        • Ingestion Alert
        • Email Scoring
        • n8n Connector
        • Orbit Connector
        • Redshift Import
        • Segment Connector
        • Shopify Connector
        • Twitter Followers Tracker
        • Zendesk Connector
        • Airbyte Exporter
        • Amazon S3 Export
        • BigQuery Export
        • Customer.io Connector
        • Databricks Export
        • Engage Connector
        • GCP Pub/Sub Connector
        • Google Cloud Storage Export
        • Hubspot Connector
        • Intercom Connector
        • Migrator 3000
        • PagerDuty Connector
        • PostgreSQL Export
        • Redshift Export
        • RudderStack Export
        • Salesforce Connector
        • Sendgrid Connector
        • Sentry Connector
        • Snowflake Export
        • Twilio Connector
        • Variance Connector
        • Zapier Connector
        • Downsampler
        • Event Sequence Timer
        • First Time Event Tracker
        • Property Filter
        • Property Flattener
        • Schema Enforcer
        • Taxonomy Standardizer
        • Unduplicator
        • Automatic Cohort Creator
        • Currency Normalizer
        • GeoIP Enricher
        • Timestamp Parser
        • URL Normalizer
        • User Agent Populator
    • Overview
    • POST-only public endpoints
    • Actions
    • Annotations
    • Cohorts
    • Dashboards
    • Event definitions
    • Events
    • Experiments
    • Feature flags
    • Funnels
    • Groups
    • Groups types
    • Insights
    • Invites
    • Members
    • Persons
    • Plugin configs
    • Plugins
    • Projects
    • Property definitions
    • Session recordings
    • Trends
    • Users
    • Data model
    • Overview
    • GDPR guidance
    • HIPAA guidance
    • CCPA guidance
    • Data egress & compliance
  • Support
    • Overview
    • Code of conduct
    • Recognizing contributions
  • Docs
  • Manuals
  • Cohorts

Cohorts

Last updated: Aug 10, 2022

On this page

  • Demo video
  • Creating a new cohort
  • Creating a new cohort from the cohorts page
  • Creating a new cohort directly from an insight
  • Cohort types
  • Static cohorts
  • Dynamic cohorts
  • Match users who performed action or event
  • Match users who have properties
  • Adjusting time frames
  • Viewing users in a cohort
  • Differentiating team vs. users traffic
  • Further reading
Where is this feature available?
Self-hosted plans
  • Restriction applyOpen-source
  • AvailableSelf-Serve
  • AvailableEnterprise
Cloud plans
  • Restriction applyFree
  • AvailableStartup
  • AvailableSelf-Serve
  • AvailableEnterprise

Cohorts are PostHog's way of letting you easily create a list of users who have something in common.

You can use the cohorts to:

  • View a list of users who all did the same action or have the same property. A few examples of how you might use this are:
    • "Which users used the app today?"
    • "Which users work at the same company?"
    • "Who used the app once but never came back?"
  • Segment other statistics. For example, to view user paths or action trends. This let's you understand things like:
    • "Are people at company X using the app much?"
    • "Is the number of Daily Active Users going up or down over time?"

Demo video

Creating a new cohort

There are two ways to create a new cohort:

Creating a new cohort from the cohorts page

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

left hand navigation for cohorts

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

Creating a new cohort directly from an insight

It is also possible to create a cohort using data from a trend. Currently, this feature is only available from within trends, but funnels and other insights will soon offer this as well.

Step 1: Go to insights, create a new trend, and click any data point on the graph to view persons represented in the underlying data.

click data point on trend to show persons

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

create cohort from trend modal

Cohort types

When creating a cohort from scratch, you'll first choose between two type of cohorts, static and dynamic:

two types of cohorts: static and dynamic

Static cohorts

You might want to batch users together based on the value of some mutable property at a certain point in time. So, for example, if you wanted to save a cohort of users you experimented on, and selected them based on usage at a given point in time, you might want to 'freeze' that list and have it accessible to track them at a later point in time. To do so, you can upload a csv of users. Unlike a dynamic cohort, a static cohort will not change as user properties/events change.

Dynamic cohorts

Match users who performed action or event

Sometimes, you'll want to group users that have performed a certain event or actions within a given time. For example, you might want to track 'daily active' or 'weekly active' users, based on the frequency of them performing a given action. For this, you'll want a list that dynamically updates, moving users in or out as they meet criteria or not.

Match users who have properties

Or, you might select a user property to filter on, and then update that property, and with a dynamic cohort, the user could be filtered in or out. Commonly, this used to combine users at a certain team, from a certain marketing campaign (via their UTM tags), email, etc.

Three key cohort settings

'Add matching criteria' adds another group of filters that a user must match to be a part of the cohort, as an OR operation. This means that if a user matches any of the groups you add, they will be added to the cohort.

Adjusting time frames

You may only want users who have performed a certain action within a certain timeframe.

On setting the cohort to match users who 'performed action or event', you will be presented with the following:

cohort - user action date range selection

You can match users on actions/events performed within the last day, week, 2 weeks, or month.

Viewing users in a cohort

Go to 'Cohorts' in the left-hand navigation (as shown here and select the cohort you want to view by clicking it, and you'll be presented with a list.

Differentiating team vs. users traffic

From the initial setup, PostHog is tracking various events from all users. However, you may want to differentiate between traffic from your team and traffic from your users.

To do so, you can identify your team members in PostHog either through a posthog.identify (e.g. by setting an email as the ID) call or by associating properties with your team member users (e.g. is_team = true).

With that done, you can then create a cohort of your team and/or a cohort that does not include any of your team members, so that you can continue to gather data on all users, but can differentiate between them when performing your analytics processes.

This is the recommended method for differentiating between team and user traffic if you want to keep receiving events. However, if you wish to stop receiving events on your team altogether, you should consider using posthog.opt_out_capturing.

Further reading

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

  • Analyzing user behavior with cohorts
  • How to filter our internal users
  • How to segment users

Want more? Check our full list of PostHog tutorials.

Questions?

Was this page useful?

Next article

Correlation Analysis

What is Correlation Analysis and what is it good for? Correlation Analysis is a feature within Funnels that will automatically highlight significant factors that affect the conversion rate of users within the funnel. The Funnels has the ability to directly compare conversion rates of users for a specific property via the breakdown feature. An example usage for the breakdown feature might be to see how the user's Operating System affects the conversion rate. However, this requires you to…

Read next article

Authors

  • Cory Watilo
    Cory Watilo
  • Joe Martin
    Joe Martin
  • paolodamico
    paolodamico

Share

Jump to:

  • Demo video
  • Creating a new cohort
  • Cohort types
  • Static cohorts
  • Dynamic cohorts
  • Adjusting time frames
  • Viewing users in a cohort
  • Differentiating team vs. users traffic
  • Further reading
  • Questions?
  • Edit this page
  • Raise an issue
  • Toggle content width
  • Toggle dark mode
  • About
  • Blog
  • Newsletter
  • Careers
  • Support
  • Contact sales

Product OS suite

Product overview

Analytics
  • Funnels
  • Trends
  • Paths

Pricing

Features
  • Session recording
  • Feature flags
  • Experimentation
  • Heatmaps

Customers

Platform
  • Correlation analysis
  • Collaboration
  • Apps

Community

Discussion
  • Questions?
  • Slack
  • Issues
  • Contact sales
Get involved
  • Roadmap
  • Contributors
  • Merch
  • PostHog FM
  • Marketplace

Docs

Getting started
  • PostHog Cloud
  • Self-hosted
  • Compare options
  • Tutorials
  • PostHog on GitHub
Install & integrate
  • Installation
  • Docs
  • API
  • Apps
User guides
  • Cohorts
  • Funnels
  • Sessions
  • Data
  • Events

Company

About
  • Our story
  • Team
  • Handbook
  • Investors
  • Careers
Resources
  • FAQ
  • Ask a question
  • Blog
  • Press
  • Merch
  • YouTube
© 2022 PostHog, Inc.
  • Code of conduct
  • Privacy
  • Terms