---
title: Segments
description: Analyze and understand segments of your user base.
breadcrumbs: Docs > Product Analytics > Segments
---

# Segments

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

## Overview{% #overview %}

Segmenting helps you focus on specific groups of users or accounts based on characteristics or behaviors. This allows you to uncover insights, identify trends, and make data-driven decisions about your product.

For example, you can segment users by purchase amount, by activity within a specific country, or by trial status. You can also segment accounts by attributes like annual recurring revenue (ARR) or start date.

After creating a segment, you can reuse it across charts and dashboards to compare how different groups behave.

## Build a segment{% #build-a-segment %}

To create a segment:

1. Navigate to **[Digital Experience Monitoring > Product Analytics > Users > Segments](https://app.datadoghq.com/product-analytics/segments)** and click **Create Segment**.

1. Under **Define your audience**, select the type of profiles to include in the segment:

   - **Users**: Create a segment of individual users.
   - **Accounts**: Create a segment of accounts (organizations).

   {% image
      source="https://docs.dd-static.net/images/product_analytics/segmentation/segments_define_audience.2d468e4b82528b85abaf986e54cb3f20.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/product_analytics/segmentation/segments_define_audience.2d468e4b82528b85abaf986e54cb3f20.png?auto=format&fit=max&w=850&dpr=2 2x"
      alt="The Create A New Segment page showing the Define your audience section with Users and Accounts options, and the Define your segment section with Filter Builder and Importing with CSV tabs." /%}
Important alert (level: info): A segment returns either user or account profiles, not both.

{% collapsible-section #segment-pana %}
#### Using Product Analytics data

To create a segment using Product Analytics data:

1. Select **Product Analytics** on the **[segment creation page](https://app.datadoghq.com/product-analytics/segments/create)**.

1. Select a **condition** for the users in the segment:

   - **performed event(s)**
   - **have attribute(s)**: includes any custom attributes you've imported. To import custom attributes, see [User and Account Profiles](https://docs.datadoghq.com/product_analytics/profiles.md).

{% alert level="info" %}
You can also define a segment that includes both conditions.
{% /alert %}

Add **filters** to focus on specific users, like those in a particular country or who signed up in the last 30 days.

The following image shows a segment filtered to users from Brazil. The segment captures users who were on the `/cart` page and clicked the checkout button within the same session in the past week:

{% image
   source="https://docs.dd-static.net/images/product_analytics/segmentation/pana_example_users_brazil_3.6bd04ddad55742ce0786b6091cb885e8.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/product_analytics/segmentation/pana_example_users_brazil_3.6bd04ddad55742ce0786b6091cb885e8.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Segment page filtered to all users from Brazil who were on the `/cart` page and clicked on the checkout button." /%}

{% alert level="info" %}
Example: See users who dropped before buyingThe **Users & Segments** page lets you determine which users almost bought an item but dropped before checking out.  To begin, filter your users on the [User Profiles](https://app.datadoghq.com/product-analytics/profiles) page, then add additional event properties using the **Create Segment** button:
{% image
   source="https://docs.dd-static.net/images/product_analytics/segmentation/segment_create_button_0.3670d45260c1d0035fcd461a635a77ea.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/product_analytics/segmentation/segment_create_button_0.3670d45260c1d0035fcd461a635a77ea.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Definition of a segment grouping people who almost bought an item." /%}

Or, directly click **Create Segment** to select your data source:

{% image
   source="https://docs.dd-static.net/images/product_analytics/segmentation/segments_data_source.25ff22b3aad2c78aa2fecfcf585a4445.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/product_analytics/segmentation/segments_data_source.25ff22b3aad2c78aa2fecfcf585a4445.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="A view of the Users and Segments page with the option to select Product Analytics or a CSV file as a data source." /%}

On the [segment creation page](https://app.datadoghq.com/product-analytics/segments/create), add the properties specifying the users: 

- who **viewed** the `/cart` page

- **then** `did not`

- perform the **action** of `click on CHECKOUT`

  {% image
     source="https://docs.dd-static.net/images/product_analytics/segmentation/user_profile_example_1.4775daca4515e8dbea7753312924d325.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/product_analytics/segmentation/user_profile_example_1.4775daca4515e8dbea7753312924d325.png?auto=format&fit=max&w=850&dpr=2 2x"
     alt="Definition of a segment grouping people who almost bought an item." /%}

You can define additional attributes, such as the Device Type, to further specify your users.
{% /alert %}

{% /collapsible-section %}

{% collapsible-section #segment-csv %}
#### Importing CSV files

If you have a list of users from a survey, experiment, or CRM, upload it as a CSV file to turn it into a segment.

To create a segment using an uploaded list of users from your own file:

1. Select **CSV File** on the **[segment creation page](https://app.datadoghq.com/product-analytics/segments/create)**.

1. Click **Browse files** to upload your CSV file.

The file needs a column with user IDs or user emails to map with the `usr.id` or `usr.email` attributes in Product Analytics.

The following example maps the Product Analytics attribute `@usr.id` to the column named `id` in the CSV file.

{% image
   source="https://docs.dd-static.net/images/product_analytics/segmentation/segment_link_csv.4c096f1786eaa4f48889718282da05f4.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/product_analytics/segmentation/segment_link_csv.4c096f1786eaa4f48889718282da05f4.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="A view of the CSV import page showing the options for mapping your file to Product Analytics attributes." /%}

{% /collapsible-section %}

{% collapsible-section #segment-accounts %}
#### Account segments

Account segments group accounts—such as organizations or companies—based on their attributes or the events their users performed. Use them to analyze groups like accounts with ARR over a specific amount or accounts that adopted a specific feature.

To create an account segment:

1. Select **Accounts** under **Define your audience**.

1. Under **Define your segment**, select a method:

   - **Filter Builder**: Add conditions to filter accounts by attributes or events.
   - **Importing with CSV**: Upload a predefined list of account IDs.

**Filter Builder**

Add one or both conditions:

- **Performed events**: Matches accounts where at least one user performed the specified event.
- **Have attributes**: Filter by account properties such as ARR, start date, account IDs, or any imported account attributes. To import custom attributes, see [User and Account Profiles](https://docs.datadoghq.com/product_analytics/profiles.md).

**Importing with CSV**

Upload a CSV file with a column containing account IDs. The account IDs map to the account ID attribute in Product Analytics.
{% /collapsible-section %}

## Use segments across Product Analytics{% #use-segments-across-product-analytics %}

### In Pathways{% #in-pathways %}

Filter the Pathways visualization to focus on a specific segment and see how those users navigate your product. The following example shows paths taken by the "Premium Shopist Customers" segment.

{% image
   source="https://docs.dd-static.net/images/product_analytics/segmentation/segmentation-pathways-1.129f538cbdac414866bc6daefde27afa.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/product_analytics/segmentation/segmentation-pathways-1.129f538cbdac414866bc6daefde27afa.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Filter down the Pathways visualization to reflect the journey taken by the Premium Shopist Customers segment." /%}

### In Analytics Explorer{% #in-analytics-explorer %}

Filter the Analytics Explorer visualization to see how a segment uses your product. The following example shows users in the "Premium Shopist Customers" segment who were active in the last month, organized by total events.

{% image
   source="https://docs.dd-static.net/images/product_analytics/segmentation/segment-analytics-explorer-3.c00224154d156f6c88cd68c6565f9ecd.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/product_analytics/segmentation/segment-analytics-explorer-3.c00224154d156f6c88cd68c6565f9ecd.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Show a list of users in the Premium Shopist Customers segment who were active in the last month, organized by the total number of events" /%}

### In Funnels{% #in-funnels %}

Filter a funnel to a specific segment, or compare multiple segments side by side to see how conversion rates differ between groups.

- To filter a funnel by segment, select **Filter by** and choose your segment.
- To compare segments, select **Compare**, then choose **By property or segment** and select the segments you want to compare.

{% image
   source="https://docs.dd-static.net/images/product_analytics/segmentation/filter_by_segment.595adf439d095dce8074fecd9909bf3a.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/product_analytics/segmentation/filter_by_segment.595adf439d095dce8074fecd9909bf3a.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="A funnel analysis filtered by a user segment." /%}

### In Retention{% #in-retention %}

Apply a segment to a retention analysis to measure how well a specific group of users returns to your product over time. When building a retention graph, select a segment under **Define users** to scope the analysis to that group. You can also use the `group by` function to break down retention across event attributes, such as device type or country.

{% image
   source="https://docs.dd-static.net/images/product_analytics/segmentation/retention_analysis_segments.7907286aa6d5b8838b922f4b71c0d069.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/product_analytics/segmentation/retention_analysis_segments.7907286aa6d5b8838b922f4b71c0d069.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="A retention analysis scoped to a user segment." /%}

## Further reading{% #further-reading %}

- [Product Analytics](https://docs.datadoghq.com/product_analytics.md)
