---
title: "Using cohorts"
date: "2024-02-14T06:18:38+00:00"
summary: "Discover how to build, manage, and analyze cohorts in Customer Data Platform. Learn to create audience segments, execute campaigns, and purge outdated cohort data for efficient analytics and campaign management."
image:
type: "page"
url: "/customer-data-platform/using-cohorts"
id: "0e900096-6a8e-4e40-bfe3-bc7bc142583f"
---

In the **Analytics** module, you can analyze the audience of a campaign if the Cohort Analysis feature is enabled for your account.

The following procedures list the steps to build, manage, and analyze cohorts and audience segments within Customer Data Platform (CDP):

Building cohorts
----------------

Use the following steps to build a cohort in CDP to capture an audience in Actions for further analysis in Metrics, Interactive Queries, or Snowflake Data Share:

1.  [Sign in to your CDP user interface](/customer-data-platform/getting-started/signin-cdp).
2.  Click **Actions** > **Campaigns+**.
3.  Create a campaign and define your audience.
4.  (Optional) Divide the audience into:
    *   Rule-based segments
    *   Random variants
    *   Both segments and variants on the segments
5.  In **Destination**, enable the **Cohort Analysis** toggle bar.
    
    ![Cohort analysis - toggle](https://acquia.widen.net/content/arzdaybqkc/jpeg/cdp_cohort-analysis-toggle.jpeg?position=c&color=ffffffff&quality=80&u=lcfvma)
    
    *   The **Cohort Analysis** toggle bar is available only if the Cohort Analysis feature is enabled for your account.
    *   The campaign creation process requires you to select an output destination, although the actual destination is irrelevant if you are creating a cohort for analysis only. You can select SFTP output to fulfil this requirement. 
6.  Click **Save**.
7.  Click **Send Now** to execute the campaign.
    *   Cohort is available for analysis only after completion of campaign execution, which typically takes 10-15 minutes.
    *   The same cohort can be executed multiple times by running the campaigns manually or by using the schedule feature in **Actions**. You can analyze different snapshots in **Metrics** based on the **Execution Date** dimension or the **ExecutionID** attribute in **Interactive Queries**.

Purging cohort executions
-------------------------

Use the following steps to delete any saved cohort executions that are no longer needed for analysis:

1.  [Sign in to your CDP user interface](/customer-data-platform/getting-started/signin-cdp).
2.  Click **Actions** > **Campaigns+**.
3.  Edit the campaign and go to the **Destination** section.
4.  Enable the **Purge cohort executions before** toggle bar.
    
    This option permanently deletes data for all prior cohort executions of the selected campaign based on the specified date and time.
    
5.  Click **Save**.
    
    ![cdp_purge-cohort.png](https://acquia.widen.net/content/6be66207-9857-4d0c-8516-43e4fe7c030a/web/cdp_purge-cohort.png)
    

This is an irreversible action. After you save a campaign, cohort data before the specified date and time is removed from **Metrics** and **Interactive Queries** during the next pipeline run. To prevent future executions of this campaign to be saved as cohorts, disable the **Cohort Analysis** toggle bar.