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

# Segments

## Overview{% #overview %}

Segmenting helps you focus on specific user groups 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, by trial status, or by users who started a trial and later converted to paying customers.

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

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

To create a segment:

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

1. Then, select a data source:

   - Product Analytics data: Define users based on their activity in your product.
   - CSV file: Upload a predefined list of users.

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

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

To create a segment using Product Analytics data:

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

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

   - **performed event(s)**
   - **have attribute(s)**

{% 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.

In the following image, the segment is filtered to all users who were on the `/cart` page and then clicked the checkout button (and did so from Brazil) 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"
   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 buyingWith the filtering and segmentation capabilities on the **Users & Segments** page, you can determine, for example, which users almost bought an item, but dropped before checking out.To begin, you can first 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"
   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"
   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 [Create a new segment](https://app.datadoghq.com/product-analytics/segments/create) page, 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"
   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 already have a list of users, for example, from a survey, experiment, or CRM, you can upload it as a CSV file and 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 **[Create a new segment](https://app.datadoghq.com/product-analytics/segments/create)** page.

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

The file needs a column containing either user IDs or user emails so the data can be mapped with the `usr.id` or `usr.email` attributes in the Product Analytics platform.

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"
   alt="A view of the CSV import page showing the options for mapping your file to Product Analytics attributes." /%}

{% /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"
   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 a list of users in the "Premium Shopist Customers" segment who were active in the last month, organized by the total number of events.

{% image
   source="https://docs.dd-static.net/images/product_analytics/segmentation/segment-analytics-explorer-3.c00224154d156f6c88cd68c6565f9ecd.png?auto=format"
   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" /%}

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

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