Segment builder

Create reusable subsets of users, sessions, and events.

This help center article is part of the App + Web Property Beta.

App + Web properties are not currently supported in the Analytics app.

 

A segment is a subset of your Analytics data. For example, of your entire set of users, one segment might be users from a particular country or city. Another segment might be users who purchase a particular line of products or who visit a specific part of your site or trigger certain events in your app.

Segments are a core feature of Analytics. If you are not already familiar with their basic functionality and why you'd want to use them, you can learn more about segments here.

Create a segment

To open the segment builder:

  1. Sign in to Google Analytics.
  2. Navigate to your property.
  3. In the bottom left, click Analysis and then Analysis Hub.
  4. Select an existing analysis or create a new one. Show me how..
  5. On the left, in Tab Settings, in the Segments section, click the plus sign

You have three options for creating a new segment:

  1. Create a custom segment by defining all the parameters yourself.
  2. Use a suggested segment. These are based on common use cases and allow you to modify and adapt them to your specific needs.
  3. Right-click a data point in your visualization to open the context menu, then select Create segment from selection.

Create a custom segment

  1. In the top panel, select the type of segment you want to create (see below for more information on the types of segments you can create).
  2. Enter a name and description for the segment. This lets you identify the segment elsewhere in Analytics.
  3. Click Add new condition to specify the selection criteria for this segment. You can create conditions that evaluate dimensions or events. For example:
    1. Age is one of 18-24 or 25-34
    2. app_exception
  4. You can also create segments based on a sequence of steps taken by the user. See below for more information about conditions and sequences.
  5. In the upper right, click SAVE.
The SAVE button is grayed out until you enter at least one complete condition.

Create a suggested segment

Suggested segments include pre-built and template segments you can use to get started quickly. Segments in the General tab can be used without modification (though you can change them if desired). Templates have conditions already included: you'll just need to provide the values for those conditions.

Types of segments you can create

User segments

User segments are subsets of users who engaged with your site or app: for example, users who have previously purchased; users who added items to their shopping carts, but didn’t complete a purchase.

Event segments

Event segments are subsets of events that were triggered on your site or app: for example, all purchase events made in a particular location; app_exception events that occurred on a specific operating system.

Sessions segments

Sessions segments are subsets of the sessions that occurred on your site or app: for example, all the sessions that originated from a particular advertising campaign.

Set up conditions and sequences

Conditions tell Analytics what data to include in or exclude from the segment. Sequences are conditions that must occur in a given order. To define a condition or sequence, you select a dimension, metric, or event you want to evaluate, choose a comparison operator, then provide a value or range of values. For example, for a segment of users in North America, you'd create a User segment and select the Country ID dimension, use the is one of operator, then provide the values "US," "CA," and "MX."

Segment builder example

Types of conditions

You can create conditions that evaluate dimensions, metrics, or events.

Dimension conditions let you build segments based on evaluating dimension values related to your users, such as demographics, geography, and technology.

Metric conditions are currently limited to evaluating your users' LTV.

Event conditions allow you to create segments based on particular details about one or more events. You can include any event parameters sent with the event when it is logged. For example, you can evaluate a level_start event's “level number” or “level name” parameters. (Learn more about logging events in this Firebase article).

Event parameters

You can create conditions for event segments based on the event_count parameter. This can optionally include a time window. This lets you filter the segments for events that exceed a certain threshold. Note that currently, you can only filter using the greater than operator (>).

Conditions that use the event_count parameter can't use any other parameters, and vice versa.

Before you can use custom parameters, you must register them for custom-parameter reporting. You can do this in the Firebase console, or in the segment builder using the Register option when specifying the custom parameter.

Condition scope

A condition's scope determines how broadly or narrowly the conditions are applied.

For user and session segments, you can select:

  • Within the same event: all conditions must be met within the same event.
  • Within the same session: all conditions must be met within the same session.
  • Across all sessions: all conditions must be met during the lifetime of the user. Learn more about how sessions in Firebase are calculated.

Conditions for event segments must all occur within the same event.

Condition timing

By default, User segments with metric-based conditions include users in the segment if they meet the condition at least once in the specified time period for the analysis.

Apply a time window: You can override this behavior by selecting the in any N day period option. When you select this option, users will be included in the segment if they meet the condition within a specified period in the past.

Dynamic evaluation

By default, User segments with dimension-based conditions include users when they currently meet the condition and then remove them when they no longer meet the condition.

You can override this behavior by selecting the At any point option. This includes users if they ever met the condition, even if they don't currently satisfy the condition criteria.

Here's an example:

Let's say one of your users visited Brazil in 2014 but is now currently in a different location. A segment with a condition for "Country = Brazil" will evaluate as follows:

  • With At any point selected, this condition will still be true today, and that user will be in the segment.
  • With At any point unselected, this condition will be false today, and that user will not be in the segment.

Condition groups

You can build segments that contain multiple conditions and arrange those into condition groups. Within a condition group, each condition can be evaluated with AND or OR logic. Using multiple condition groups lets you evaluate other conditions using a different scope. For example, you can mix conditions "within the same event" and "across all sessions."

Click Add condition group to add a new group to your segment definition. Condition groups are evaluated with AND logic.

To remove a condition group, hover over each condition in the group, then on the right, click X.

Segment builder example

Sequential conditions

For User segments, click Add sequence to define conditions that occur in a specific order. For example, these events must happen in the order listed:

  1. Step 1: first_open
  2. Step 2: in_app_purchase.

Optionally, you can require that the steps be completed within a specific time period:

  1. On the right, click Time Constraint.
  2. Click the toggle, then define the time period in which the whole sequence must occur (for example 30 Minutes).

Click Add step for each additional step you want to include in the sequence.

TIP: Condition groups always appear above sequences. If you add a condition following a sequence and it seems to disappear, scroll up to find it again.

Exclude conditions

By default, the conditions you define are "include" conditions: they define the users or events you want to include in your analysis. Click ADD EXCLUDE GROUP to create a condition that excludes users or events.

Select Temporarily exclude users when to exclude users from the segment during periods when they meet the condition.

Select Permanently exclude users when to exclude users from the segment if they've ever met the condition.

Segments first evaluate all your inclusion conditions, then apply any exclusion conditions you've defined.

A segment can have only one exclude group.

Differences between segments in Web vs. App + Web properties

You can use segments in both Web and App + Web properties. Fundamentally, segments work the same way in both products. However segments appear in different places, and have a few different features depending upon which kind of property you're using them in.

For App + Web properties, segments are only available in Analysis. (If you need to see subsets of data in your reports, you can use comparisons, which also let you focus on subsets of your data.)

You can create segments in Analytics based on sessions or users. In the new Analysis, segments can be based on users, events, or sessions.

Finally, segments in Web properties are subject to certain limits that don't apply in App + Web properties. Learn more about segments in Web properties.

Limits of the segment builder

  • You can create up to 10 segments per analysis.
  • You can apply up to four segments to an individual analysis technique at one time.
  • Dimension segments are limited to user dimensions.
  • Segment data is sampled. The sample size used is 100,000,000 rows.
Was this helpful?
How can we improve it?