Behavioral Cohorts allow you to create a custom definition of a group of users based on the events or sequence of events they have performed. You can create cohorts based on behavior and/or properties and view them as a segment on our graphs such as Event Segmentation, Funnel Analysis, and Retention Analysis.
Cohorts can be created in three ways:
- Cohort Tab: Creating your own definition of a user cohort.
- Cohort Tab: Uploading a CSV or text file of User IDs or Amplitude IDs into a user cohort.
- Microscope: Saving the users who make up a certain data point in a chart as a cohort.
When the cohort is created, it will be stamped with the last time it was computed. If you apply a cohort to a user segment it will automatically be refreshed whenever the chart is recomputed. You can re-compute the cohort at any time by pressing the icon. You can also download the complete list of users and their properties as a CSV file by clicking the icon.
IMPORTANT NOTE: Cohorts are auto-refreshed if they are applied as a segment for any chart whenever the chart is recomputed. Also, cohorts with a date range greater than 3 years will not compute.
Table of Contents
- Define a New Cohort
- "Count","Relative Count", and "Total Sum of Property" Clauses
- "AND" clauses and "OR" Clauses
- "Within" Clause
- "Most Recently" Clause
- "Any Time" Clause
- Group-Level Cohorts
- Inline Behavioral Cohorts
- Import Cohort From File
- Microscope Cohorts
- Cohort Comparison
- Managing Cohorts
- Sync to... or Export CSV
- Using Cohorts
- Transfer Ownership
- Refreshing cohorts
- Video Walkthrough
Note: This feature is available only to Enterprise, Growth, and Scholarship customers.
Define a New Cohort
Clicking on "New" --> "Cohort" will take you to the Create Cohort page where you can set the parameters of a new cohort or upload a CSV of users into a new cohort.
"Count", "Relative Count", and "Total Sum of Property" Clauses
"Count" will create a cohort based on the number of times an event is performed. The cohort below will include all users who performed 'FavoriteSong' greater than 5 times during the last 30 days.
Note that "count" will only work for a "performed event" clause.
"Relative Count" allows you to compare two different event frequencies. You are also able to create "where" clauses for both events being compared in the "Relative Count." The cohort below will include all users who performed 'Play Song or Video' at a greater frequency than 'Favorite Song or Video' during the last 30 days.
Note that "count" will only work for a "performed event" clause.
"Total Sum of Property" allows you to filter for users who performed events with a particular event/user property sum. These event/user properties must have numerical values. The cohort below will include all users in the last 30 days who performed 'Play or Search Song' with total 'Duration' greater than 60 seconds.
"Distinct values of property" allows you filter for event/user properties down to a specific value or set of values you are analyzing. The cohort below will include only those users who favored a song or video on more than one device.
"AND" clauses and "OR" Clauses
To use the OR clause, hover over the current segment in the cohort definition you are building. You can also add a NOT to the clause you are constructing by using the dropdown in the left corner.
In the example below, we create a cohort of users defined as those who have performed the ‘Play or Search Song’ event more than 8 times and also 'Favorited a Song or Video' event more than 4 times from October 1 to October 31 and are from the United States. For the most accurate results, we recommend putting a date range around a user property if you include one.
The Within clause allows you to look at a cohort within x days of first use. This clause is helpful when you are interested in the group of users that performed a specific event within X days of becoming a new user.
When using "within x days of first use" in the cohort definition you are only able to look at the last 90 days of data. If we calculated this cohort on June 1st, and then applied the cohort in Event Segmentation on November 1st, you will notice there are large decreases August-September and September-October. This is because as time goes on, there will be less and less new users from previous months that fit in the 90-day window allowed for a cohort using the "within" clause.
For example, if I re-compute the cohort on September 30th, new users on July 1st would have been included (because it is within 90 days). But if I run the query on October 1st, that cohort will be recomputed and users new on July 1st no longer belong to that cohort (because it is not within 90 days). So, the data point for July 1 on any graph with the above cohort will keep dropping until it reaches 0 users.
"Most Recently" Clause
The "most recently" clause allows you to select only users who had that certain property value as their most recent value. This clause is useful if you have a user property where the values change often for users and you only want the cohort definition to query on a user's most recent value (e.g. push notifications enabled where most new users in the first 30 days of use will have push notifications disabled at first and then later on enabled).
Please note that when looking at most recent numerical property value, we interpret a missing property as a value of "0".
"Any Time" Clause
The "any time" clause allows you to select from users who had a certain property value at any time in the selected time frame. This clause is useful if you want to include not just a user's most recent property value but all the values they've had for that property in the time interval. For example, the below cohort of users who had the 'Country' property of United States anytime during the last 30 days. Even if some of the users could no longer be in the United States (e.g. their most recent 'Country' property value is Canada), this cohort definition would still capture them.
If you have instrumented group types, you are able to create group cohorts from the cohort detail page (defining or uploading a cohort) or from Microscope. In the cohort definition, select your group name on the left side of the definition.
When applying the group cohort to a chart, change "users" to your group name ("company(s) in this example).
Note: It is possible to apply group cohorts in all charts except Personas and Compass. In addition, behavioral cohorts within behavioral cohorts are not supported.
Inline Behavioral Cohorts
You can create simple behavioral cohorts inline directly within the chart control panel for all charts except Compass. This will allow you to create a behavioral cohort in the context of a chart without having to navigate away into the Behavioral Cohorts tab. To do this, select the "+perform" button.
You can utilize this feature to filter your chart for users who have performed certain events. The clauses function in a similar fashion as the Behavioral Cohorts tab but there is an additional "in each" clause available for Amplitude's inline behavioral cohorts feature. The "in each" clause enables you to filter for users who have performed the selected event a certain number of times within the given interval, allowing you to create interval cohorts. For example, the following setup would filter this Event Segmentation chart for users in the last 4 weeks who performed 'Download Song or Video' greater than or equal to 3 times in a given week.
We can then see that of those users, 126,500 downloaded 3 or more songs during the week of Dec 9 to Dec 16th and fired the 'Purchase Ticket' event.
Inline cohorts can also be used to measure populations of cohorts over time. For example, say you have an important milestone in your product that is playing five or more songs in a day that are longer than 3 minutes. This definition represents your "Highly Engaged Cohort." You can add additional where filtering to your interval cohort to specify event properties and/or User property conditions. By looking at this behavior in each interval, you can measure the population of your "High Engaged Cohort" over time.
Import Cohort From File
You can create a static cohort of users or groups by uploading a CSV or text file of User IDs or Amplitude IDs. The file must contain one ID per line and if an ID does not exist in Amplitude, the ID will simply be skipped and the user will not be added into the cohort. File size needs to be under 50MB.
Once you select a file, you can select if the file contains Amplitude IDs or User IDs. Note: The CSV file must only contain Amplitude IDs or User IDs and cannot have any other text in the file. It cannot contain any commas or extra spaces.
Re-import Cohort From File
Manually uploaded cohorts can be re-imported so that you can update your cohort in place and not have to change all of your charts to point to a new cohort.
You can use the "Create Cohort" option in Microscope to create a cohort of users that make up the selected data point. Most cohorts created from the Microscope are static cohorts and these cohorts will not have the "The User who" section like a Behavioral Cohort would. For some chart types though like basic Retention and Funnel data points, a Behavioral cohort can be created and certain fields will be editable but others will not be. The editable fields will be the default blue but static fields will be grayed out. For example, let's say we create a cohort of the users who dropped off after step 2 of our funnel:
Once you have created the cohort, you can click on its name in the Behavioral Cohorts tab to see its definition. Note how certain fields are grayed out and are un-editable (as these were dropped-off users in a funnel), but you have the ability to change the time interval. You can also add new conditions to the cohort created from Microscope.
Using the Offset Feature
When in a Microscope created Cohort from a Funnel chart, you have the option to set an 'Offset' value when you modify the time range for the event in your Funnel. In the example below, the Cohort will compute users who 'dropped off' in the 2nd step of the Funnel within 7 days, anytime during the last 30 days offset by 5 days.
Assuming that the day this Cohort is created is November 11th, the 'Offset by 5' changes the date ranges from October 12th - November 11th to October 7th - November 6th, backing up the date of computation by 5 days, specifically for those users in that particular condition. This will provide a rolling date range at the time of computation for this Cohort for that specific condition.
If you add additional conditions using the 'And also' you would need to apply the same 'Offset' value to each respective condition's date range in order to keep them consistent.
Microscope can also create a group cohort from a data point with groups applied.
Cohorts created from Microscope will be static from these following scenarios:
- Composition with Cross Property Values
- Retention if you have multiple returning events
- Usage interval view in retention
- Funnels with exclusion events
- Funnels with constant property group bys
- Distribution views in Funnels (Time to Convert + Frequency)
- Event segmentation for properties (PropSum + PropAvg)
- Any chart depending on a different cohort (in the filters for example)
When you create a cohort, the Cohort Comparison feature automatically characterizes and compares this cohort to all Active Users for the last 30 days. You can then choose a pre-existing cohort to compare it with, look at the overlap between 2 cohorts, choose user properties for side-by-side composition, compare actives, retention, average events, and more. In the Behavioral Cohorts tab, click on the title of a cohort to open the comparison analysis.
Comparison By User Property
For more information about these charts, read our User Composition article.
Active Events per User
Here is more information about Event Segmentation average events.
Unique Active Users
Here is more information about creating the active user chart in Event Segmentation.
New User Retention
Read more about our Retention charts here.
You can mark cohorts you have ownership over as "Discoverable" or "Unlisted". Anything marked as "Discoverable" can be found by any other user in your organization. Anything marked as "Unlisted" can only be found by you, admins, managers, and people with a direct link to the cohort. "Discoverable" cohorts have a green globe icon while "Unlisted" cohorts have a grayed out toggle.
If you want to deprecate a cohort, then you can archive it. You can archive a cohort by clicking on "More" --> "Archive". If you accidentally archived the incorrect cohort, you can click on "More" once again and you will see the "Unarchive" option.
To delete a cohort, you will have to archive it first. Once you have archived the cohort, you must confirm that the cohort should be permanently deleted before it will be removed.
Sync to... or Export CSV
For Amplitude Engage customers, you can click on the "Sync to..." drop-down to sync a Behavioral Cohort with a partner integration. The exported cohort will have at most 1 million users. You can view the list of supported integrations and review more detail about Amplitude Engage via this help center.
Click the "Export CSV" button to export a cohort as a CSV file will allow you to receive via email a link to download a CSV file containing all users in a cohort and their most recent user properties.
Cohorts can be leveraged throughout the majority of our platform. To segment your data by cohorts, use the Chart Controls to add a segment, select '[Amplitude] Cohort', and then select the appropriate cohort. Note: For any chart or query that segments on a cohort, the segmented cohort will automatically recompute itself whenever the chart is generated.
You can transfer ownership of cohorts you own to other users in your organization. Additionally, admins and managers can transfer ownership of other people's cohorts. To transfer ownership of your own cohort, hover over the "More" section in the cohort and the option will appear in the list.
For admins and managers, click into the behavioral cohort and then click on "More" section in order to transfer ownership of their cohort. There is currently no way to transfer ownership of static cohorts that have all grayed out names in the Behavioral Cohorts tab (this only applies to cohorts created from some charts via Microscope).
You can manually refresh a cohort from the Cohort detail view, in the top navigation bar, in order to update the most recent user count.