Saved Cohorts: The What, Why, and How

Being able to group a set of users or companies based on their behaviors or traits can be extremely useful. In Moesif, we have a feature called Saved Cohorts which allows you to do exactly this. Saved Cohorts can help businesses power marketing campaigns and other sales initiatives, help engineers and customer success teams manage ongoing issues, and a host of other use cases.

What are Saved Cohorts?

Saved Cohorts are essentially a grouping of users or companies which fit specific criteria. As a condition is met, a user or company can be added to the cohort. When a user or company no longer fits the cohort definition, they are removed from the cohort. In order to use Saved Cohorts in Moesif, you must have user and/or company tracking enabled. This functionality will not work for anonymous users or companies.

In Moesif, a User Cohort will add or remove individual users from a Saved Cohort. This can be useful when trying to identify when an individual or group is having an issue or error, new users, or another specific grouping. For instance, it may be useful to the Customer Success team to know when new users are experiencing a specific error, such as an HTTP 401 Unauthorized response when trying to access an API. A cohort could be created to keep track of all of the users that fit this condition.

A Company Cohort is similar to a User Cohort with the exception that it looks at all of the users within a company as a single unit. Going back to our previous example, we could set up a Company Cohort which would monitor companies that have received an HTTP 401 Unauthorized response. This means that any user within that company that received a response fitting this criterion would mean that the company is then added to the cohort. Using both user and Company Cohorts can be useful depending on what types of insights you are trying to derive from your data.

What are Cohort Notifications?

Unless you are constantly refreshing your cohort list, it may be useful to be notified when a new user or company is added to a specific cohort you’ve set up. For this, you would use a Cohort Notification. Using a Cohort Notification will allow you to know exactly when a new user or company has fit specific criteria without the need to constantly monitor your cohort list manually.

Cohort Notifications are supported across a few different channels and can be created when you create a new cohort or can be added to an existing cohort. Channels supported for Cohort Notifications include Email, Slack, or a Custom Webhook. Having a few options gives the flexibility to deliver notifications to the most effective channel for your team, or even multiple channels if needed. When a user or company is added to the cohort, the selected channels will then have notifications delivered to them to help make your team aware.

Why use Saved Cohorts?

Using Saved Cohorts is great for viewing groupings of users that have similar traits or trends in product usage. Saved Cohorts can be used for reporting purposes, as well to quickly see which users belong to the specific segment or criteria you have outlined. In Moesif, beyond just reporting or viewing the members of a cohort, many of our most powerful features are driven by Saved Cohorts. For instance, features such as Behavioral Emails and Governance Rules are powered by the use of cohorts.

For Behavioral Emails, when a user is added to a cohort they may automatically be sent an email. A simple example may be when a user makes their first API call or signs up for your platform, you may automate an email to be sent to them as part of an onboarding email flow. You may also do the same with users experiencing specific errors. By creating a cohort for them, you may then sending an email to them when they experience that specific error condition.

As in the Behavioral Email scenario above, using Governance Rules, entails creating a cohort that outlines a specific behavior that you may want to block. A great example of this would be if you had a monetized API and wanted to block users with overdue invoices. You could simply create a cohort to add users who have an invoice that is more than 7 days overdue. Once the users join this cohort, the Governance Rule could return an HTTP 402 Payment Required status back to the user, including a request body telling users to pay their invoice.

Cohorts can also be used for Dynamic Sampling. By having traffic be associated with a Saved Cohort, you can choose to customize or down sample the amount of traffic that gets logged in Moesif. By doing this, you can help to make sure your most important traffic is being logged in Moesif while excluding your less important traffic. You may want to make sure that 100% of calls which return an error response make it into Moesif, while only sampling 20% of the successful calls. To do this, you’d simply set up a Saved Cohort for each condition as part of your sampling criteria.

As you can see, cohorts in Moesif extend far beyond just simply being used as a reporting tool but can also drive some really great functionality within the platform.

How to create a Saved Cohort in Moesif

Now that you’ve learned what Saved Cohorts are and what they can do. Let’s take a brief look at how to set up a User Cohort. First, you’ll want to navigate to the Users screen in Moesif.

Moesif Users Screen

After this, we will set up a criterion. In this example, I will filter on users who have received an HTTP 401 Unauthorized response at least 5 times in the past few months. That will look like this:

Moesif Cohort Filter

Now that my filter is created, I will click Create Cohort in the upper right corner of the screen.

Moesif Create Cohort Button

From here, enter your Cohort Name and then click the Create Cohort button in the bottom right of the modal.

Create Cohort Modal

You can also click Receive Cohort Notifications as well to set up notifications at this point. Alternatively, you can also set this up later once the cohort is created as well.

Now, you will see that the cohort has been created. You can leverage some other features, like Behavioral Emails and Governance Rules, by clicking on the entries on the right side of the screen. You can also configure Cohort Notifications through this panel as well.

Cohort Notifications

If you need to edit or want to check out the cohort in the future, it is available through the User Cohorts menu item on the left-side navigation.

Create Cohort in List

The same steps should be taken if you need to create a Company Cohort. You can follow these same steps to create a__Company Cohort__ by going to the Company screen instead of the Users screen as we did above.

Try it out!

Interested in trying out Saved Cohorts for yourself? If you’re already signed up with Moesif, simply log in and follow the instructions above or check out our guide that goes a step further. If you’re new to Moesif, sign up for an account today and unlock all of our advanced features including Behavioral Emails and Governance Rules that are all powered by Saved Cohorts.