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:
- Behavioral Cohort Tab: Clicking on the "Define New Cohort" button and creating your own definition.
- Behavioral Cohorts Tab: Uploading a CSV or text file of User IDs or Amplitude IDs.
- 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 New Cohort
- "Count" and "Relative Count" Clauses
- "AND" clauses and "OR" Clauses
- "Within" Clause
- "Most Recently" Clause
- "Any Time" Clause
- Group-Level Cohorts
- Import Cohort From File
- Microscope Cohorts
- Cohort Comparison
- Managing Cohorts
- Exporting Cohorts
- Using Cohorts
- Transfer Ownership
- Video Walkthrough
Note: This feature is available only to Enterprise customers.
Define New Cohort
Clicking on the "Define New Cohort" button will let you name and set the parameters of a new cohort.
"Count" and "Relative Count" 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 'PlayFromNotification' where 'push_enabled' = 'True' at a greater frequency than they performed 'PlaySong' where 'push_enabled' = 'True' during the last 30 days.
Note that "count" will only work for a "performed event" clause.
"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 called "Users Who Add > 7 Friends” and define this set of users as those who have performed the ‘AddFriend’ event more than 7 times from June 1 to June 30 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). The following cohort shows you the users who have performed 'AddFriend' greater than seven times during the last 30 days and also had the United States as their last known location.
"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 definition will create a cohort of users who performed 'AddFriend' greater than seven times anytime during the last 30 days and also were in the United States at any time during the last 30 days. Even if some of the users could no longer be in the United States (e.g. their most recent '[Amplitude] 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.
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.
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.
You can use the "Create Cohort" option in Microscope to create a cohort of users that make up the selected data point. For some chart types, 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.
Microscope can also create a group cohort from a data point with groups applied.
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 see/edit all of your saved cohorts as well as cohorts others are creating in your organization in the Behavioral Cohorts Tab. 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. You can change the discoverability of an object by moving the toggle.
If you want to deprecate a cohort, then you can archive it. You can archive a cohort by clicking on its name in the Behavioral Cohorts tab. Then, click "Archive". You can always unarchive your cohort at a later time.
To delete a cohort, you will have to archive it first. Once you have archived the cohort, you can delete it. To search for archived cohorts, click the "Archived" checkbox.
Click on the name of your archived cohort and then click the "Delete" button to delete your cohort permanently.
You can click on the "Export" button to export a Behavioral Cohort. You can choose to export your cohort to Urban Airship, Kahuna, or Appboy if you have those integrations set up. Otherwise, exporting 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 cohort in the Behavioral Cohorts tab and the option will appear to the right.
For admins and managers, click into the behavioral cohort and then click on the owner's name in order to transfer ownership of their cohort. There is currently no way to transfer ownership of static cohorts that have grayed out names in the Behavioral Cohorts tab (this only applies to cohorts created from some charts via Microscope).
Watch the video here.