How to set a metric on a site

How to set a metric on a site

The most popular traffic and traffic analysis tool is Yandex.Metrica, but how to install it on the site?
alt
Julia SEO marketer


Printed 2002-07-20

The most popular traffic and traffic analysis tool is Yandex.Metrica, but how to install it on the site? The answer depends on your management system. 

If the site is without CMS

In the event that your site is made with bare HTML, you will have to manually install the Metric on each page. To do this, copy the counter code from the “Settings” section of the metrika.yandex.ru service and paste it into the code of each page within the or tags. 

For sites with a management system

In this case, there are two options. Firstly, some CMS and site builders have built-in modules for setting the metric. In them, it is usually sufficient to indicate only the counter number. 

Secondly, you can open the main site template and place the code manually in the header or footer of the site. 


It is advisable to place the counter code higher, closer to the beginning of the page code. Otherwise (especially on mobile devices or with poor Internet), the code will load only after the main blocks of the site, which can be quite "heavy". And if the user leaves the site before the code loads, the visit will not be registered at all. It turns out that, for example, in Yandex.Direct you have much more clicks than as a result of visits to Yandex.Metrica. 

In general, there are no other tricks when installing the metric on the site. Remember to set goals :)

Our services