> For the complete documentation index, see [llms.txt](https://docs.hackle.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hackle.io/en/cohort/usage.md).

# Using Cohorts

The Cohorts you create can be used for targeting across various Hackle features.

## Setting Up Targeting

This section covers how to target a Cohort in an **A/B Test**.

The method for setting up Cohort targeting in Feature Flags and Remote Config is the same.

#### Setting Up a Cohort Filter

![](https://143363954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAVlNQhS253reum0Ce94%2Fuploads%2Fgit-blob-348ca436d0f6804b660b481a5b558b562ff1f728%2Fe5af98a-_2023-10-24__4.44.42_f773102482619f41.png?alt=media)

#### Supported Operators

The Cohort filter currently supports two operators: `=` and `≠`.

![](https://143363954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAVlNQhS253reum0Ce94%2Fuploads%2Fgit-blob-f4e67b390c1ea35a9d69b8ecb36ed3aca84729bd%2F8ba1182-_2023-10-24__4.46.35_d04e0da689b18e93.png?alt=media)

#### Select the Target Cohort from the List

The User Identifier Basis of the experiment and the User Identifier of the Cohort must be the same.

If the experiment's User Identifier Basis is `deviceId`, the Cohort's User Identifier must also be `deviceId`.

![Experiment User Identifier - deviceId](https://143363954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAVlNQhS253reum0Ce94%2Fuploads%2Fgit-blob-3d1ffcafbefdc2ed81ce84c2efa818e85569fcf6%2F2fcaeaf-_2024-05-30__3.37.49_d262c09786e3af46.png?alt=media)

![Targeting - Cohort list](https://143363954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAVlNQhS253reum0Ce94%2Fuploads%2Fgit-blob-9ef4619ace54638ba5bd3be713a7ae24474644bb%2F8231ce2-_2024-05-30__3.39.22_9dcdcb868b05f2ea.png?alt=media)

Therefore, **only Cohorts with the same User Identifier as the experiment are shown in the targeting list**.

![The active user Cohort has deviceId.](https://143363954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAVlNQhS253reum0Ce94%2Fuploads%2Fgit-blob-62d9b7dbfd142efa1e591152a2d2235934d06621%2F49a7b65-_2024-05-30__3.40.16_d88bd132c0a424b7.png?alt=media)

#### Number of Target Users When Using a Cohort

When you use a Cohort for targeting or campaigns, the number of users actually included as targets from the Cohort varies depending on how it is used. **Except for schedule-based sending, only up to 1 million users** are included as targets.

| Usage Method                            | Number of Users Included as Targets |
| --------------------------------------- | ----------------------------------- |
| Schedule-based sending                  | **All** Cohort members included     |
| Event-based · API-based sending         | Up to **1 million** included        |
| In-App Message                          | Up to **1 million** included        |
| A/B Test · Feature Flag · Remote Config | Up to **1 million** included        |

{% hint style="warning" %}
For event-based sending, API-based sending, and In-App Messages, if the number of users included in the Cohort exceeds 1 million, **only up to 1 million users are included in the campaign audience**, and **the rest are dropped from the target**. Even if the campaign appears to work normally, note that the actual reach is limited to 1 million users.
{% endhint %}

***

## Analyzing with Cohorts

You can perform Cohort-level data analysis by setting a Cohort in the user group filter of Data Analytics.

![User Group > Add Filter > Select Cohort](https://143363954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAVlNQhS253reum0Ce94%2Fuploads%2Fgit-blob-c4cc1bddb2736344b1aa723c940d303003eedbbe%2Fea2086308cce6136040ed001a7a016dfc082ab26_c9ec2fcc5862d63b.png?alt=media)

![Data analysis at the Cohort level](https://143363954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAVlNQhS253reum0Ce94%2Fuploads%2Fgit-blob-5f375cb7725e5308481346d88b172354a9ab3aab%2F7e630af-_2024-05-14__2.09.43_b9224766c3bebbae.png?alt=media)

***

## Running CRM Marketing for a Cohort

You can send In-App Messages and Push Messages targeting a specific Cohort.

You can find various Cohort examples applicable to different situations in the Push Message recommended template guide.

![Send a Push Message to a specific Cohort](https://143363954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAVlNQhS253reum0Ce94%2Fuploads%2Fgit-blob-a2d484d49748ed7b38cf592a1e5cfada74adfd73%2F2025a03-_2024-05-14__2.12.04_4c3db5d00fd5f6f1.png?alt=media)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hackle.io/en/cohort/usage.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
