How Yandex.Metrica works
To start working with Yandex.Metrica, create a tag — a code snippet embedded in web page content. When a tag is created, Yandex.Metrica simultaneously creates a data store associated with it.
Users interact with the webpages of a site where the tag is installed. The tag code is executed and it transmits data to Yandex.Metrica about the page itself and the events that occurred when the user interacted with it.
- Collecting and transmitting data
- Processing and storing data
- Receiving and displaying data. Metrics
Collecting and transmitting data
script element, and HTML code in the
script element runs. Otherwise, the content of the
noscript element is processed.
If the page is loaded by something other than a browser (for example, a robot), the interpretation of the tag code may be arbitrary.
With Yandex.Metrica you can get more information about users and their interaction with site pages than a tag can collect. For example, the browser doesn't have information about the user's gender, age, or locality. This information is detected by the service. Significant computing resources and large volumes of data are often used for this purpose.
In this way, data collected by a tag is processed on Yandex.Metrica servers and is supplemented with various information.
To ensure maximum service availability, Yandex.Metrica imposes limitations on the number of data requests from users (quotas). Quotas are used in the Yandex.Metrica API. The web interface, in turn, can use API methods, that is, exhaust the same quota. When the quota is exceeded, a message warning you about that appears in Yandex.Metrica:
- On the Dashboard page when displaying widgets. For example, if widgets are open on multiple browser tabs at the same time or multiple tag users are working with them.
- When displaying reports. For example, if several tag are viewing reports or working with the same report at the same time.
A similar situation can occur if you're simultaneously sending requests to the Yandex.Metrica API and working with the web interface.
A quota may also be exceeded due to browser add-ons or malware activity. In this case, we recommend disabling your browser add-ons and checking your OS for viruses.
- Under Sign in and device history, click Log out on all devices.
- Go to your account settings again and change your password. Then click Log out on all devices again.
Processing and storing data
The collected data is processed by the service. Statistical objects are formed in the tag's storage based on this data.
Yandex.Metrica works with several data levels and operates with the following types of statistical objects:
outbound link click
outbound link click
A statistical object is defined by a set of attributes.
Some of the attributes are shared by all types of statistical objects. For example, any type of object can have the operating system and user's country defined, if this information was detected.
Some attributes are specific to certain types of statistical objects. For example, a defining pageview attribute is the page URL of the click (), a session attribute is the session length, and a user attribute is the date of the user's first session.
These levels can be represented in a diagram:
You can transmit additional parameters to Yandex.Metrica while users are interacting with the site. However, it is important to differentiate between session or pageview parameters and user parameters. User parameters differ from session or pageview parameters in that they aren't tied to a specific time of the site session.
For example, the «send feedback» event belongs to a specific session, because the user could only submit the feedback once over the entire history of sessions. There isn't any point in making this event a user attribute, because the reports would make it look like this user submitted the same feedback once during every session.
To compare the behavior of users who have left feedback at least once with those who have never sent feedback, you need to configure sending this event via session parameters, and then create the appropriate segments. The user parameters should only transmit attributes that don't change from session to session, and that don't contain users' personal information. For instance, you can transmit the type of client — «retail» or «wholesale».
Receiving and displaying data. Metrics
Each object is defined by the start time of the corresponding event (or sequence of events).
So we can select statistical objects of a specific type within a certain time period. Then we can use attribute values to calculate a variety of absolute or average numbers. These numbers are called metrics. Examples are the overall number of pageviews, or the number of sessions with a depth greater than 5.
Metrics are always calculated for the same type of statistical objects.
A typical task when analyzing metrics is to determine how much one of the groups contributes to the total. For example, you may want to find out how many of a site's users are men, and how many are women. In Yandex.Metrica, you can define groups of objects using conditions placed on attribute values, and calculate the metric values for each group. This process of breaking up a total into its parts is called dimensions.
Often you don't need all the objects, but just those that match the specified criteria. For example, you want to analyze the behavior of users who click through from ads. In Yandex.Metrica, you can form a sample of desired objects using conditions placed on attribute values. This process is called segmentation, and the selected set of objects is a segment.
Segmentation and dimensions can be used together. For example, you can select a segment of sessions that came from search engines, and group the sessions by keyword.