Segmentation in reports
Creating a segment
You can use a segment to pull necessary data from a full set of statistics. A segment is formed from criteria that are used for selecting data.
A segment created in Yandex Metrica is recalculated daily. The user data is always up to date.
You can create a segment using:
The criteria are combined into groups in the list, and groups are combined into categories.
Segmentation can be done for multiple statistical objects:
Pageviews
- The report will only contain data on sessions that include views with the specified condition.
Sessions
- The report will only contain data on sessions with the specified condition.
Users
- The report only contains data on users whose sessions meet the specified condition at least once.
You can also create a segment for certain actions, such as outbound clicks or calls. Yandex Metrica provides reports designed for collecting statistics on such actions. For example, for file downloads. When generating a report on the specified segment, Yandex Metrica selects only actions that meet the specified condition from those taken during the user sessions.
Since the segment is based on different objects, but the same metrics are calculated (like the number of views), the totals in different reports may differ.
Example
You need to find out how often users view one of your site pages. Keep in mind that during a single session, a user can view a lot of other pages apart from the one being analyzed.
You can see this information in various reports, such as Traffic and Popular. As an example, we'll use reports for a demo tag.
The reports show a different number of views. This is due to the fact that, in the case of session-based segmentation, the report considers the number of views for other pages during the selected sessions in addition to the number of views for the specified page.
To create a segment for a row, click
in the row and then select Segment by row from the dropdown list.
The selected segment will be applied.
You can save the resulting segment to compare it with another one. For more information, see the actions with segments. You can also change the criteria.
Example
During analysis of landing pages, it was discovered that one of the pages had a high bounce rate. We can find out the traffic sources that brought visitors to this page:
-
In the Landing pages report, select a row and click
→ Segment by row.The value of the dimension will be used as the criteria for creating a segment. The report will only show data about the selected page.
-
Click Dimensions and add Sources → Traffic source.
-
Move Traffic source to the top of the list. The data shows that the high bounce rate is for traffic from search results.
-
To analyze the results more closely, click the Search engine traffic line. This opens a report for the created segment.
Configuring segmentation
Yandex Metrica offers a wide range of options for configuring segmentation. This includes multiple ways you can set up conditions.
You can select pre-configured values or those obtained from your site.
In this segmentation configuration type, all conditions are added with the OR operator, which means that the report will display all values that meet the selected conditions.
In this condition configuration type, you need to manually enter the values you want to use to configure segmentation.
Some segments may have additional settings in the panel above, which offer more detailed segmentation to fit your specific needs.
In this condition configuration type, you can also choose how to apply conditions:
- All conditions are met: The same as the
ANDoperator. - Any condition is met: The same as the
ORoperator.
In some segments, you can choose conditions from a pre-configured tree, either selecting values from end items or top-level items of the list.
Managing operators and regular expressions
When creating a segment, you can select equality condition settings.
|
Criterion |
Description |
|
|
Retains values that meet the segment conditions |
|
|
Excludes values that meet the segment conditions |
|
|
For numerical values, this will retain only values greater than the specified condition |
|
|
For numerical values, this will retain only values less than the specified condition |
|
|
For numerical values, this will retain only values greater than or equal to the specified condition |
|
|
For numerical values, this will retain only values less than or equal to the specified condition |
|
|
For numerical values, this allows setting a range |
For custom input, you can also use special operators. If you don’t want to specify a strict match, you can define the beginning, a substring, or more complex conditions using regular expressions.
|
Character |
Description |
Example |
|
* |
Matches any number of any characters |
Show data for all pages beginning with Using the * characterYou 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: *Alice in Wonderland*. The following queries will match this condition: |
|
@ |
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: |
|
~ |
The condition is a regular expression |
Show data for pages with a URL matching a regular expression |
|
! |
Negates condition |
Exclude data for pages with a URL that begins with the string https://example.com/tariff/: |
|
. |
Separate attribute levels |
Set attribute boundaries in segments using parameters |
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:
|
Operator |
Example |
|
!@ |
Exclude data for pages with a URL containing "tariff": |
|
!~ |
Exclude data for pages with a URL that matches the regular expression |
Segmentation by parameters
Yandex Metrica offers advanced modes for configuring segmentation, based either on parameters transmitted from your site or on e-commerce data.
-
Segment row toggle
If the configured segment and the dimension in the report belong to the same data array (for example, segmentation by session level 1 parameter and dimension by session level 1 parameter), an additional segment row toggle appears in segments built based on the parameters.
You can use it to specify what exactly you want to segment: the events based on the transmitted parameters or, for example, the sessions during which the events occurred.
-
Advanced segmentation configuration mode
With the advanced parameter-based segmentation configuration mode, you can specify more flexible conditions for a parameter-based segment.
With this mode, you can select a set and order of attributes (dimensions) for building a segment.
- Click Attributes in the segment configuration panel.
- Specify a set of attributes in the window that opens.
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
-
- Click Save as on the segmentation panel.
- Enter the segment name and click Save.
Saved segments can be accessed from the menu that opens after you click the Segment button and on the Segments page.
Alert
You can save 500 segments max.
Questions and answers
What are incompatible conditions?
- When you switch from report to report, the segmentation conditions are saved. If the supported conditions are different, a message about their incompatibility appears in Yandex Metrica. In this case, delete the conditions and set a new segment.
|
Useful links |
Online training |
Some of the sessions or pageviews, which are selected by a formal attribute (for example, the number of pages viewed).