Metrica

Segmentation in a report

To pull the desired data from the full set of statistics, you can create a segment
[no-highlight[

Some of the sessions or pageviews, which are selected by a formal attribute (for example, the number of pages viewed).

]no-highlight]
. A segment is formed from conditions that are used for selecting data. For convenience, Yandex.Metrica organizes all conditions in groups, and groups are assigned to categories.

Let's look at an example. A mobile provider has added a calculator for service rates on its website.

To evaluate the effectiveness of the new tool, we need to compare statistics for users who used the calculator with those who didn't (for example, over the first 14 days after introducing the tool). It would also be useful to evaluate traffic sources. Segmentation can help us do this. Let's assume that the counter already has a goal created for interaction with the rate calculator (“Calculator”).

In the Sources, Summary report, we'll select sessions for new users who completed the “Calculator” goal:

  1. Click .
  2. Choose the condition: HistoryNew/returning userNew user. Click Apply.
  3. Click .
  4. Select the sessions that had conversions for the “Calculator” goal: BehaviorGoals reached, and choose the appropriate goal from the list. Click Apply.

Then refine the data, leaving information about users who viewed the service rates pages with the calculator between March 1 and March 15. The rates pages are standardized on the site, and they all show the calculator. So the condition can specify the URL of the entire “tariff” directory by using the * symbol.

  1. Click .
  2. Choose the condition: BehaviorView URL. Enter the URL of the directory with the service rates.
  3. Choose the time period for pageviews: click For reporting period, then Choose period.
  4. Click Apply.

Now we have statistics on site visitors who used the rates calculator during a set time period in the past. Save the segment.

Next we'll get average data for site visitors. Delete the Goals reached condition and save the segment with a different name. Now we can compare the two segments.

Choosing conditions

When multiple conditions are selected:

  • For conditions from different groups, the service uses the “AND” operator.
  • For conditions from the same group, the service uses the “OR” operator by default.
Restriction. You can add up to 20 conditions.

Rules for conditions

Use rules to manage conditions. Conditions can be divided into the following types:

For example, conditions related to specifying a URL, page title, or search query. You can set these types of conditions in the text box. If you are setting multiple conditions, each condition must start on a new line.

You can choose one of the following rules for these conditions:

  • meet any condition (equivalent to the “OR” operator)
  • meet all conditions (equivalent to the “AND” operator)

String conditions can also use special characters. If you don't want to specify a strict match, you can define the beginning, a substring, or more complex conditions using regular expressions.

Table 1. Characters used for segmentation

CharacterDescriptionExample
*Matches any number of any characters

Show data for all pages beginning with https://example.com/tariff/, including the specified page: https://example.com/tariff/*

Using the * character

You can use the * character when setting conditions related to a search query.

For example, you can filter all the search queries that brought visitors to the site and select just the data for phrases that somehow contain the company name: *Horns and Hooves*.

The following queries will match this condition: Horns and Hooves company site; site Horns and Hooves; official Horns and Hooves site.

@The selected data contains the specified string (but doesn't have to match exactly)Show data for all pages with a URL containing the string: @tariff
~The condition is a regular expressionShow data for pages with a URL matching a regular expression
!Negates conditionExclude data for pages with a URL that begins with the string https://example.com/tariff/: !https://example.com/tariff/*

When using special characters, case is ignored.

The characters @, !, and ~ can only be used at the beginning of a string. You can use the following combinations:

OperatorExample
!@Exclude data for pages with a URL containing "tariff": !@tariff
!~Exclude data for pages with a URL that matches the regular expression

For example, the Location category provides a variety of conditions to choose from.

You can choose one of the following rules for these conditions:

  • include
  • exclude

Our report will contain data for the Moscow region, without Moscow itself.

Operations with segments

Comparing segments

Comparison lets you view data for two segments at once.

After getting a segment, you can compare it with:

  • A previous period
  • A segment specified manually
  • A predefined segment (for example, New users or Search traffic)
  • A saved segment (that you created previously)
Saving a segment

To save a set of conditions (a segment) that you like, click Save as and enter a name for it. You can find your saved segments in the menu under SegmentsSaved segments, and in the Segments section.

Restriction. You can save up to 500 segments.