> ## Documentation Index
> Fetch the complete documentation index at: https://tinyanalytics.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Behavioral Cohort Analysis

> Build behavioral cohorts from what users did over time, then apply those groups as filters across every tinyanalytics report.

A behavioral cohort is a group of users defined by **what they did over time** — "checked out at least twice in the last 30 days but never opened support", "viewed pricing but didn't sign up". Unlike a saved segment (which filters on attributes like country or device), a cohort is computed on the server from your event history, then applied as a filter across every report — so you can see how that group of people behaves everywhere.

## How do I build a cohort?

You define a cohort from one or more **criteria**, each describing something a user did — or didn't do — in a recent window:

<Steps>
  <Step title="Add a 'performed' criterion">
    Choose an event or page, how many times, and over how many days — for example, "did `checkout` **at least 2 times** in the last **30 days**".
  </Step>

  <Step title="Add a 'not performed' criterion (optional)">
    Exclude users who did something — for example, "did **not** view `/support` in the last **30 days**".
  </Step>

  <Step title="Combine and save">
    Combine criteria with **AND** or **OR**, name the cohort, and save. tinyanalytics computes who's in it.
  </Step>
</Steps>

## Verify

<Check>
  Your cohort is ready when it appears in the cohort picker and shows a last-refreshed time after tinyanalytics computes its membership.
</Check>

## What are the two criterion types?

A cohort in tinyanalytics is built from two building blocks, which together express "did X, not Y, over time":

| Criterion         | Means                                                                                                                                |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| **Performed**     | Did events matching your filters a number of times (at least / at most / exactly / more than / fewer than) within the last *N* days. |
| **Not performed** | Did **not** do events matching your filters within the last *N* days.                                                                |

Each criterion uses the same filter vocabulary as the rest of the dashboard, so you can match on event name, page path, or any event property — "did custom event X", "visited page P", or "did X with property Y" are all expressible.

## How is cohort membership kept up to date?

Membership is **recomputed on a schedule** (about hourly) rather than the instant you open a report, because working out who did what over the last *N* days is a query across your history, not a live lookup. Each cohort shows when it was last refreshed, so membership can be up to about an hour behind — which is fine for "last *N* days" behavioral groups.

Cohorts are keyed on your **identified users** where you've called `identify()`, so a signed-in person stays in the right cohort across visits and devices. See [Identify users](/docs/user-identification-analytics).

## How do I apply a cohort?

Apply a cohort from the filter bar, the same way you apply a [segment](/docs/saved-analytics-segments). It scopes every report to that group of users, and you can combine it with other filters. Because a cohort is a filter, "how much revenue came from users who bought twice last month" is just that cohort applied to your revenue view.

<Note>
  **Limits per cohort:** up to 10 criteria per cohort, up to 100 cohorts per site, and windows up to 365 days. Cohorts share the same **personal** and **site** scopes as segments — personal cohorts are yours alone; site cohorts are shared with your organization and managed by admins.
</Note>

## Frequently asked questions

<AccordionGroup>
  <Accordion title="How many behavioral cohorts can I create in tinyanalytics?">
    Up to 100 cohorts per site, with up to 10 criteria in each cohort and windows up to 365 days. Cohorts use the same personal and site scopes as segments: personal cohorts are yours alone, and site cohorts are shared with your organization and managed by admins.
  </Accordion>

  <Accordion title="Why doesn't my cohort update immediately after someone qualifies?">
    Cohort membership is recomputed on a schedule of about once an hour, not the instant you open a report. Working out who did what over the last *N* days is a query across your history rather than a live lookup. Each cohort shows when it was last refreshed, so membership can be up to about an hour behind.
  </Accordion>

  <Accordion title="What's the difference between a behavioral cohort and a saved segment?">
    A behavioral cohort groups users by what they did over time — "checked out at least twice in the last 30 days" — and is computed on the server from your event history. A [saved segment](/docs/saved-analytics-segments) filters on attributes such as country or device and applies instantly. Both apply as a filter across every report.
  </Accordion>
</AccordionGroup>

## Related

<Columns cols={2}>
  <Card title="Saved segments" icon="bookmark" href="/docs/saved-analytics-segments">
    Filter by attributes instead of behavior over time.
  </Card>

  <Card title="Identify users" icon="user-check" href="/docs/user-identification-analytics">
    Give users a stable ID so cohorts follow them across devices.
  </Card>

  <Card title="Funnels" icon="filter-circle-dollar" href="/docs/funnel-analytics">
    See where people drop off on the way to converting.
  </Card>

  <Card title="Filter your data" icon="filter" href="/docs/analytics-filters">
    The vocabulary cohort criteria are built from.
  </Card>
</Columns>


## Related topics

- [Privacy-Friendly Web and Product Analytics](/docs/index.md)
- [Saved Analytics Segments](/docs/saved-analytics-segments.md)
- [AI Referral Traffic Analytics](/docs/ai-referral-traffic-analytics.md)
