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.
- Views
- For example, the Views that condition group. The report only contains data on sessions that include views with the specified condition.
- Sessions
- For example, the Sessions that condition group. The report will only contain data on sessions with the specified condition.
- Users
- For example, the For people with condition group. The report only contains data on users whose sessions meet the specified condition at least once.
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.
You need to find out how often users view one page on your site. 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”. Demo tag reports are given as an example.
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.
Point the cursor at a line in the report and click the appropriate icon:
— Create a segment in the report.
— Filter Session Replay recordings.
The value of the dimension is the criteria for the segment.
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.
In the Entry pages report, select the corresponding line and click .
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 .
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.
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:
Choosing conditions
If you add multiple conditions to a segment:
- 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.
Conditions are divided into several types that you can apply rules to:
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 (same as the “OR” operator).
- Meet all conditions (same as 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.
Character | Description | Example |
---|---|---|
* | Matches any number of any characters | Show data for all pages beginning with https://example.com/tariff/, including the specified page: 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: *Alice in Wonderland*. The following queries will match this condition: website of Alice in Wonderland; Alice in Wonderland site; official Alice in Wonderland 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 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/: !https://example.com/tariff/* |
Character | Description | Example |
---|---|---|
* | Matches any number of any characters | Show data for all pages beginning with https://example.com/tariff/, including the specified page: 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: *Alice in Wonderland*. The following queries will match this condition: website of Alice in Wonderland; Alice in Wonderland site; official Alice in Wonderland 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 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/: !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:
Operator | Example |
---|---|
!@ | Exclude data for pages with a URL containing "tariff": !tariff |
!~ | Exclude data for pages with a URL that matches the regular expression |
Operator | Example |
---|---|
!@ | 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
-
- Click.
- Enter the segment name and click Save.
After saving, the segment is available in the drop-down menu Segments.
, and on the pageRestriction. 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.