How to configure and install Yandex Metrica?

Yandex Metrica is the same tool as Google Analytics. Yandex Metrica is one of the two largest systems in the world of web analytics.

The interface, functions and other settings are different from Google Analytics, but still the competitive product in the field of web analytics.

What is Yandex Metrica?

Metrica this is a web analytics service for e-Commerce, websites. It is completely free and allows advertisers or online marketers to analyze:

  • the audience of the website and visitor behavior (you will be able to view reports about how behaved user on your website using the Session Replay);
  • revenue and conversion rates;
  • analyze advertising campaign;
  • traffic sources;

How does work code Yandex Metrica?

The code consists of two parts: JavaScript code found in the script element and an HTML code included in the noscript element.
A code can be transformed when you make edits to the configuration system web analytics. In this case, you will need to update the code on the website.
If the page is loaded by the browser, the default behavior is the following. If the browser supports the execution of JavaScript code and its enforcement are not blocked, runs the JavaScript code included in a script element.

How to configure Yandex Metrica for the website?

  • You need to create a mailbox (Yandex Mail/Yandex account)
  • Create an account in Yandex Metrica

Fill in the required fields. Site name, specify the domain of the website and choose your time zone, and currency.

Refer to the “Сounter сode” -> I recommend to select in settings: 

  • Session Replay
  • scroll map
  • form analytics
  • Asynchronous code

  • Next, save the changes and copy the counter code

 How to install Yandex Metrica using GTM?
We can use Google Tag Manager (GTM) to install the code Yandex Metrics on your website:
1. copy your code from Metrica
2. create a new tag in GTM
3. paste the code in Custom HTML
4. choose the trigger
5. All Pages -> Save

How to send events/conversions in Yandex Metrica using Google Tag Manager? Or how to set up conversion in Yandex Metrica

To transfer events from GTM in Yandex. The metric we need to create a tag type “Custom HTML code” and add this  code:

Here “1771222” represents the number of counter Metrica (you need to insert your), “target name” — the name of the event.

Go to settings Yandex metrics (your site) -> Add goal -> JavaScript event     -> fill in the name field of our events -> Add goal


When properly configured, the events will be transmitted in Yandex Metrica.

If you have any questions, you can find me at Contacts!