Filters and actions
You can configure up to 30 filters and 30 actions per tag. This setting doesn’t affect the data collected prior to its activation.
Filters
With filters, you can customize reports to only show records that meet your criteria. Reports include data collected after the filter was applied.
Changes made by filters cannot be undone. If you don’t set up any filters, Yandex Metrica reports will contain all the data for all user sessions.
To prevent Yandex Metrica from counting your own sessions, select the Don't count my sessions option. When this setting is enabled, the service stores the cookies of users who have viewed reports or Settings for this tag, and does not count these users when calculating statistics.
Note
For the filter Don't count my sessions to work, make sure you access the website using a browser where you've logged in to Yandex Metrica with the tag owner's account at least once. The filter will start working 15 minutes after the first such login.
Filters can be applied to the following data types:
User IP addresses
The filter type can be refined with the following conditions:
-
equals
For example, if you select the filter type Only record traffic from and the IP address field, then set the criterion to equals with the value 192.168.0.2, the report will only display information about traffic from this address.
-
in the range
Example of setting ranges of IP addresses: 192.168.0.0/24; 192.168.*; 192.168.0.0–192.168.255.255.
Page URL
This filter type can only be applied to data collected by a tag. For example, you can use it to collect data from test pages on your website.
The filter type can be refined with the following conditions:
- contains
- begins with
- equals
- only website and additional domains — to only include pageviews for pages on the website and additional domains specified on the tag edit page (the General tab) in the report.
Page titles
The filter type can be refined with the following conditions:
- contains
- begins with
- equals
Actions
Actions are performed on raw data. They modify the addresses of the website pages that have the Yandex Metrica tag installed.
The following actions are available in the settings:
- Remove parameter: Removes a given parameter from a URL. For example, if you select the action Remove parameter and the name sort, reports will combine the URLs
https://example.com/?sort=by_price
andhttps://example.com/
into a single URL,https://example.com/
. - Remove all parameters: Removes all parameters from a URL.
- Remove anchor — Removes the anchor from the URL (
#anchor
). - Change from https to http: All webpages in reports shown as accessible over the HTTP protocol.
- Replace domain: Replaces the domain of all webpages in a report.
- Change to lowercase: All URLs will be shown in lowercase in reports.
Robots
By default, Yandex Metrica shows statistics without robots that have explicitly presented themselves. The data on such robots is shown in the Robots report. Statistics on robots detected by their behavior are available in reports in Data: with robots/without robots mode.
Using the Filter robots by behavior option, you can delete robotic sessions identified by behavior from the source data, but after that, you won’t be able to change the statistics display mode. Sessions of such robots won’t show up in statistics after you enable the option.
If you use Logs API of Yandex Metrica, and it’s important for you to work with data without robots, enable the option. In other cases, we don’t recommend using it. This action cannot be undone.
Useful links |
Online training |