Creating and setting up a Yandex Metrics counter. Yandex.Metrica - what kind of beast and how to tame it

Hello dear readers of the blog site. Today I want to talk in more detail about how to create a Yandex Metrics counter. On the pages of my blog I have already touched on the topic of the need, and also told, but this article will be devoted specifically to the collection of visit statistics using Yandex.

Thanks to the installed Yandex counter, you can analyze information on the number of visitors, the time a user spent on your resource, the age of visitors, and much more. The Yandex search engine has created a specialized service for this called Yandex.Metrica, and the metric counter is a specific tool that allows you to collect this information. In addition to this service, the search engine has a service that allows each webmaster to track the number of indexed pages, view indicators such as, number backlinks to the site and a lot of other important information. I highly recommend registering your project with this service.

Let's return to the topic of our article and first register in the search engine. In order to register, just create your Mailbox, and this account will allow you to use all Yandex services.

Creating a Yandex metrics counter

The first thing we need is to add a Yandex counter. To do this, follow the link http://metrika.yandex.ru/list? and click the “Add counter” button, after which we get to the creation page, where you need to enter basic information. In the figure below I have shown an example of filling out all the required fields with fictitious information.

After you enter the information and accept the terms of the agreement, you must click the “Create” button. This action will take you to new page, where we will further configure the main functions.

How to set up a Yandex metrics counter

The settings page contains several sections, I will try to talk about each of them in detail.

Basics

In the main section, information will be visible, including number, name, site domain and time zone.

You can change the information, but whenever you change, be sure to click the “Save” button. a thread"

You also have the ability to add additional domains, which are used to monitor resource availability, filter persistent data from reports, and collect statistics on internal clicks.

Counter code

Here you can configure the main functions of the Yandex Metrica counter by changing the code. I’ll tell you about the main parameters without going into unnecessary ones:

Webvisor – Allows you to analyze the behavior of project visitors.

Hash – Hash tracking in the browser address bar.

A hash is a unique file name, independent of how it was named.

Asynchronous code – Allows the installed Yandex metrics counter not to affect the site loading speed.

Informer – When installing the code on a site with basic settings, he will be invisible to everyone. Checking the box next to this item will make it visible and the function for setting up the graphical display of the informer will appear (can be seen in the figure below).

Webvisor

In this section, you can enable a web viewer that allows you to record the contents of pages along with the actions of visitors, which will later allow you to view which links were followed by internal navigation, and view all the actions of the visitor on the pages of your project. This section has several settings, the description of which you can read by clicking on the question mark next to each parameter.

Webvisor is a very convenient function that allows you to analyze the usability of your resource and evaluate how interesting and convenient it is for your visitors.

Goals

You can add up to two hundred goals, indicating what number of visits is a successful result. In fact, this section makes it possible to set certain goals and inform about their achievement. At the initial stage of creating a site, it is not very interesting, since the webmaster tries to pay attention to filling the site, setting up usability and promoting search engines. When the number of visits reaches at least fifty people per day, then you can begin to set certain goals for the future.

Filters

This section remained a mystery to me. I tried to find information on the Internet, but really didn’t find anything. I believe that it is not worth filtering any data, since you will not see a complete analysis. Apparently that’s why, when creating the Yandex metrics counter, I didn’t bother studying this section too much.

Notifications

Thanks to notifications, you can receive messages from Yandex.Metrica if problems arise with resource availability via e-mail, or via messages to your phone.

In fact, we have figured out how to create a Yandex Metrics counter, all that remains is to install it and start receiving statistics on visits.

Installing a Yandex metrics counter on a website

After all the settings have been made, return to the “Counter Code” section and re-check that all the necessary functions have been enabled and the visual display is configured to suit the design of your project. If you are sure that you are not going to make any more changes, then click the “Save” button and copy the code to the clipboard.

That's the whole description. In fact, there shouldn’t be any problems in creating and setting up a Yandex Metrics counter, but if you have any questions or add-ons, please let me know in the comments.

Hello, dear friends. Today we will talk about such a useful tool as Yandex.Metrica. This tool is provided absolutely free of charge to everyone who has registered an account in the Yandex search engine. This tool, just like Yandex.Webmaster, should be available to every website owner and webmaster.

But first, let's figure out why it is so necessary to use Yandex statistics on your website.

For the impatient, a video tutorial is at the bottom of the article.

As you already understand, working on a website requires constant attention and analytics. On the one hand, you need to fill your website or blog with articles and various materials. And at the same time monitor indexing results in search engines, sources external links and bug fixes. And the tools in your office will help you with this. On the other hand, you need to track site traffic statistics and behavioral factors your visitors. And this is where Yandex.Metrica comes to the rescue - a tool for assessing website traffic, analyzing behavioral factors and the effectiveness of sales pages and advertising. It also allows you to track statistics of clicks on social buttons

How does Yandex.Metrica work?

  1. First of all, you need to create an account in the Yandex search engine. You can see how to do this.
  2. Create a counter for the site in the Yandex.Metrica service.
  3. Place the counter on all pages of your website.

Once the counter starts working and collecting statistics, huge statistics will become available to you, according to which you will literally be able to observe every action of your site visitors.

How to create a Yandex.Metrica counter?

1. Go to home page Yandex.Metrica. And if you have not yet logged into your account, do so using the login form or by clicking on the “Get counter” button.

2. After you have logged into your account using your name and password, you can begin adding a counter. To do this, click on the “Add counter” button.

3. Now you need to fill out the first tab. Fill out the fields in the form. And click the “Continue” button.

4. The next step is to select the necessary meter settings and one of the design options. That is, the counter may be visible on the pages of your website, for example, like mine. Or maybe invisible to site visitors. But this will not affect its performance in any way.

Having selected the desired settings, click on the “Save” button. If some parameter is not clear to you, read the hint by clicking on the question mark next to this item.

By the way, if you decide to use a counter with an informer, you can customize the appearance of this informer. To do this, just click on the “Configure informer” link.

Let's say - your counter is ready. The only thing is that you can put a filter on your own visits. For more reliable statistics.

5. To do this, open the “Filters” tab and check the “Ignore my visits” checkbox. And click on the “Save” button.

How to Insert Counter Code into WordPress Template Source Code

Manual method

We will consider an example of inserting code based on my blog created on the WordPress platform. By the way, this method is suitable for absolutely all dynamic sites.

As you remember, to accurately calculate statistics, the counter code must be inserted into all pages of your site. But in order to save ourselves from a lot of unnecessary work, let’s look at a simplified model for building a dynamic website template. Including those based on WordPress.

Modern websites and blogs have approximately the same structure; this can be simplified as follows:

There may be several sitebars, or there may not be any at all. But the point is that the main elements of the template are executed in separate files. And this is very convenient, since you can change the header of your site in one file, and these changes will be applied to all pages of your site. No matter how many there are. Therefore, the counter code should be placed in the footer of the site. The file responsible for the site footer is called footer.php.

1. Copy the meter code created by the service. Ctrl+A – select all. Ctrl+C – copy to clipboard. Or through the right mouse button.

2. Open the WordPress control panel – section “ Appearance" - "Editor".

2. Open the footer.php file and paste the code you copied earlier from the clipboard (Ctrl+V) before closing the body tag. Click “Update file”.

The code is inserted and everything is ready to work, if the meter has an informer, you can look at the informer on the website.

Automatic method

For those who don’t like to tinker with code, there is a very convenient plugin for WordPress. It allows you to insert the counter code into the template quickly and without unnecessary steps.

1. Open the “Plugins” section - click the “Add new” button.

2. In the search field, enter search query"Yandex metrics". Exactly on English language. And install the Yandex Metrica plugin (already written in Russian).

4. Open the “Settings” section - “Yandex Metrika” - insert the counter code into a special field and click the “Save changes” button.

To see if the code works. That is, whether it is inserted. You can click the right button on the site page and select the menu item “View page code” or “ Source pages" depends on the browser.

We are looking for the “metrics” code. It's very easy to do in the comments.

Which method you use is up to you. The counter will work the same. But if you use the plugin, it is better not to use the counter informer. Since it will be displayed at the very bottom, as if it does not fit into the design of the site.

Traffic analysis in Yandex.Metrica

You now have many tools available for analysis. To do this, you need to go to Yandex.Metrica and select the counter that you created earlier.

But keep in mind that you should not count on comprehensive statistics immediately after creating the counter. But the more you work on your blog, the more interesting statistics you will get.

An example of such statistics could be traffic analysis:

It's always useful to know where people are coming from and what interests them. And of course, each of you will find something for yourself useful information. As additional sources of statistics and receiving incoming links to the site, I recommend installing counters and .

And finally, let’s look at another useful Yandex.Metrica tool. Namely, the ability to set goals and track their achievement.

How to set goals in Yandex.Metrica

For a regular blog, goals may not be needed. But for a selling site or, say, for a site on which you promote affiliate products, goals still need to be set. It is possible to pick up 100 targets per counter, but detailed statistics are available for only 10 targets to choose from. For others, only the number of goal achievements is available.

So, let's look at a few examples:

Let's say, when assessing behavioral factors, you are interested in how many pages a visitor views, how long he stays on your site.

1. First, open the list of counters and click on the “pencil” icon.

2. Go to the “Goals” tab, click the “Add goal” button. Enter the name of the target and indicate the viewing depth. That is, the number of site page views. And don't forget to save.

Visiting a specific page

1. Click the “Add target” button and select the “Page URL” tab. And using the condition, enter part of the address or the full address of the desired page.

Examples of such pages could be sales pages, subscription confirmation pages, and so on.

Performing an action on the site

Let's say you're interested in tracking a specific action on a website. Let's say clicking on a link. This is especially interesting with affiliate sites, when the final subscriber is not visible, but you can find out by the target whether the “Subscribe” or “Buy” button was clicked.

1. To do this, create a goal, the type of which will be “Event”. And we indicate the code word as the target identifier. Only Latin letters are used. This word will be needed later.

Note: the code word must be unique and under no circumstances appear in site addresses.

Making changes to the analyzed object:

Setting the identifier to the form:

onsubmit="yaCounter23000269.reachGoal("SOB"); return true;">

Setting an ID on a button:

onclick="yaCounter23000269.reachGoal("SOB"); return true;">

Important! Don't forget to change my counter ID 23000269 and code word SOB to your data. If the question arises, where can I get the meter ID? Look carefully at the counter code and everything will become clear.

This goal allows you to track every step from the moment you go to the site, fill out the subscription form and click on the “Get” button. And if at least one of the steps is not completed, the goal is not considered achieved.

1. Create a goal whose type is “Composite”. For one goal you can take no more than 5 steps. Set the conditions for each step according to the examples above.

And don’t forget about adding special parameters to forms and buttons, described a little above.

This concludes the analysis of the main, useful Yandex.Metrica tools. Try it, implement it, this is a very useful tool. If you have any questions or suggestions, write in the comments. We'll discuss.

I also advise you to watch the video tutorial for the article, which clearly shows all the methods and solutions described in the article.

I wish you all good luck! See you later, friends. And be sure to read the article about, there you can also set up goals and track traffic paths through such invisible links. And of course, I advise you to understand the links if you want to know in detail where high-quality traffic comes from.

Best regards, Maxim Zaitsev.

IN . This is very, very commendable. However, there are special people who think that there is no need to analyze traffic from various channels (,). Like, everything works and is fine. Honestly, I myself was like that at first (what a fool I was then, horror).

Yandex.Metrica is an analytics service provided to everyone without exception free of charge. In addition, it has extensive functionality with which you can not only analyze a certain traffic channel, but also see what each visitor did on your web resource.

Advantages

Before we start talking about installing an analytics system, I would like to list a number of advantages that this web analytics service has:

  1. Made in the “Russian” style, that is, simply. It is absolutely easy to learn;
  2. Makes it possible to observe the behavior of visitors: You can see where visitors click most often (click map), to what level they scroll the page (scrolling map), and generally see what they do, right down to the movement of the cursor (webvisor);
  3. A large number of reports for analyzing the effectiveness of Direct;

I have listed only the main advantages, but as you work you will find others. Of course, there are shortcomings, but they are not significant.

Registration

To use Yandex services, including Metrica, you need to go through a simple registration procedure. If you already have an account, then scroll down, and if not, then register.

It’s so simple, you didn’t even have to write about it. Anyway. Now you have access to all services.

Setting up Yandex Metrics

So we smoothly approached the solution to the question - how to set up Metrica. Fortunately, this is done very, very simply and only on two pages. Follow the following instructions:


As you can see, it’s again simple, no more difficult than registering an account.

Now let me explain about the checkboxes:

  • Asynchronous code. Simplify the counter code, reducing the load on the site;
  • Web viewer, scroll map, form analytics. Activates these functions in your counter. It will be useful to us.

This completes the setup of the counter, it’s time to install it.

Meter installation

We all know that any website presented on the Internet consists of a certain set of characters - HTML code (). Therefore, to add a counter to the site, you need to understand at least a little HTML. If you don’t know a single tag and have no idea what HTML is, then it’s better to entrust it to some professional.

Let's look at how to create and add a Yandex Metrica counter to a website.

For the successful development and promotion of a resource, it is important to always be aware of the latest trends in the field of web development and content creation.

You can attract more users to the site using the main source of content, the age of the audience, what readers are doing on the site, how long they view the page and other behavioral parameters.

Why use a metric?

First of all, Yandex Metrica allows you to adapt the site to user requests.

Secondly, by tracking reader actions, you can find out how well the advertising campaign is going and how the audience finds your resource (search engines, social networks, forums, other sources).

After adding Metrics to the site, you can not only track all the above indicators, but also view the effectiveness of innovations and receive recommendations for attracting people to the resource.

Note! You can use Yandex Metrica only if you have the right to view and edit the site code. The method of creating a resource is not important - it can be any programming language, development environment, or working with ready-made engines.

Features of the service

The main feature of Yandex metrics is the versatility of the service.

It is suitable for both a small blog and large news portals, online stores, business sites and resources of large companies.

Advantages:

  • Access to heat maps – charts and graphs of indicators in which all changes and their effectiveness are highlighted in different colors. This simplifies the analysis procedure;
  • Free distribution. Anyone can register and create a metric for free. There are no paid functions within the service;
  • Ability to set conversion based on the specified goal. In total, you can configure no more than 200 targets for one created counter;
  • View the actions of one specific user;
  • Can track offline data.

Adding analytics

Creating a metric can be divided into several stages.

Let's look at how to quickly create effective analytics for a website.

Login to your account

To work with any of the Yandex services, you need to be registered in the system.

To obtain statistics from Ukrainian users, follow these steps:

  • Install the most on your computer (functions may not work correctly in older versions);
  • Enable using any plugin or program (for webmasters from Ukraine);
  • In order for the metric to work on the website without problems, replace the lines shown in the figure in its code. Essentially, you are simply changing the library's location address. This does not affect the functionality or resulting analytics in any way.

Installing a counter code on the website

Analytics will work only after adding the code to the site.

After copying the code of the created counter, you need to paste it into the resource.

Recommendation: the higher the code is located on the page, the more effective the analytics will be. This is because the script runs faster. Even if the user leaves the page after a few seconds, his actions will still have time to be added to analytics.

Below are several options for implementing program code, depending on the type of site creation.

Via FTP

If your resource is located on an FTP server, you need to open the site's administrative panel and go to the root file named header.php.

Copy the code into it. It should be placed between other tags, as a separate script.

Example code for a page with a connected metric:

For sites that are written from scratch and FTP servers, you need to add metric code to each page whose data you want to track.

Using Plugins

Many CMSs give developers the opportunity to use special plugins that make their work easier. The list also includes Yandex Metrica.

An example of such a plugin for WordPress: https://ru.wordpress.org/plugins/yandex-metrika/.

Using the extension, you can easily implement informer options and create analytics without having to understand the program code.

Just download the plugin and install it. Then go to the administrative panel of the site (Settings - Yandex Metrica), insert the piece of code that you received from the Metrica service and save the changes.

Google Tag Manager

If you use Google Tag Manager, to activate Yandex Metrics, log in to your .

Open the Add New Tag window. This must be an HTML tag.

Adding Yandex metrics to a ready-made engine

Depending on the site engine, there are several other ways to add metrics.

WordPress

Go to the tab "Site Appearance" and find footer.php in the list of files.

Open it and copy the metric code to the beginning of the tagsBODY And .

Don't try to place code inside another script or add only individual lines.

It is important to copy the entire piece of code generated on the Yandex website and add it to your website in exactly the same form:

OpenCart

As you know, CMS OpenCart does not have a built-in site template editor, so you need to go to it using FileZilla.

Find tags in the editor DIV And BODY. You need to add a metric between them:

Wix

In Wix, the option to connect metrics is only available to those who have paid premium subscription.

In your account, go to the "Domains" tab. Click on your website address.

Then click on the “Web Analytics” line and write the metric counter number (it can be viewed on the Metrika.Yandex.Ru website).

Bitrix

Open the window "Web-sites' templates" and go to edit mode.

Paste the metric code before any other tag and save your changes.

Analytics performance test

To check if your meter is actually working and collecting data, follow these steps:

So that you never have a question, after or several months of SEO promotion, how to find out the effectiveness, you need to install Yandex.Metrica on the site in advance.

In addition, after installing Metrics, Yandex will collect additional information about your site and its visitors, thus the site’s position in search engines may improve. The instructions are relevant for 2019 and take into account everything Latest updates Metrics. In general, there are only advantages, so let’s move from words to action.

Installing a Yandex.Metrica counter on a website

To start installation, go to the website metrika.yandex.ru, and log in through your Yandex account. If you don't have an account, just register new mail, it will take no more than a minute.

Creating a counter

Step 1. After you have visited the Metrica website, click “Add counter”. Next you need to decide on the name of the counter. If in the future there will be many projects, in order not to get confused in them, it is better to name the counter with the website address or the name of the company.

Settings

Step 2. Indicate the address of the website where the counter is installed, the time zone in which you are located or in which it is more convenient to receive data.

If you need to collect data from subdomains, click the plus sign next to “Additional addresses” and add the address of the site on the subdomain. But it’s better to create a separate counter for each subdomain.

Step 3. We include the collection of additional data about site visits. Webvisor, scroll map and analytics of forms on the site. Turn the switch to the “On” position.

Afterwards, check the box to accept the user agreement (read it first by opening the link). And click the “Create counter” button.

Step 4. Additional settings. The counter installation window will open, where we click on the “Advanced settings” item.

A list will open additional settings counter. Let's briefly look at each of them.


How to install Yandex.Metrica code on a website

Step 5. After that, copy the Metrica code. To do this, click the “Copy code” button or select the code manually and copy it by pressing the “ctrl+c” key combination. Next, we’ll look at how to install the Yandex.Metrica code on different types sites.

HTML

You will receive a code that needs to be placed on all pages of the site, between the tags . To do this, open file system site on its hosting, we find all the files of the site pages. If you have a one-page site, then most likely this is a file index.htm l or index.php.

Open the file for editing. Finding the section - it is always at the very beginning of the page. Set the course and press paste “ctrl+v”.

Save the changes made.

Installing Metrica on WordPress, Joomla and other CMS

Or any other CMS. If you use any of the popular CMS, such as WordPress or Joomla, to manage your site, the installation process will not differ fundamentally. On the contrary, it will become a little simpler; you will only need a superficial understanding of how your engine works.

Via FTP connection or via file manager In the administrative panel, you need to find the file responsible for the page title. For example, in all WordPress themes this file is called header.php, which actually contains the section of the site containing . And then everything is simple - insert the counter code there. The advantage is that you will not need to insert code manually on each page of the site; the management system will do it for you.

Congratulations! We have successfully figured out how to install Yandex Metrica on a website, now you can see everything that happens on your website! We will talk about analyzing standard reports, setting goals and other ways to work with web analytics in the following publications.