Step-by-step instructions for setting up. Yandex.Metrica - what kind of beast and how to tame it

"We talked in detail about ways to track visitors on your own and someone else's website. In this article we will talk in detail about how to connect a Yandex Metrica counter.

Yandex Metrica is a modern tool for tracking resource traffic. For statistics to work, you need to set the counter code.

How to get a counter in Yandex Metrica

In order to add a site to Yandex Metrica, you need to go to the management console using the link and click the “Add counter” button.

However, you must remember that you must be logged in to your Yandex account. If you don't have an email account, get one - it will be useful to you.

The next step is to enter all the required data:

  • counter name - site name;
  • site address - the url of your site;
  • time zone - select the time zone of your region;
  • web viewer, scroll map, form analytics - enable these services, they will be very useful in analyzing behavioral factors.

By clicking on the “Create counter” button, you will be taken to the second installation step.

Here we are asked to choose one of the options for installing the code.

The service offers several installation methods:

  • HTML code - you need to add the counter code to all pages of the site;
  • CMS website builders - the method depends on the management system, somewhere plugins are installed, somewhere through special blocks;
  • Tag management system - if you use Google Tag Manager, create a new tag with a Custom HTML template and paste the Metrica counter code into it.
Where to put the metric counter

If the site does not have a CMS, then add the code to the HTML code of all pages of the site. The code should be placed within the tags or as close to the top of the page as possible, so it will load earlier and be able to send viewing data to Metrica, even if the visitor closes the page almost immediately.

When adding a counter, you must remember that when installed in the site header, the counter will load earlier and send data to the metric faster, but this can significantly slow down the site. Therefore, we recommend installing the counter code in the footer; this will not significantly affect its performance. Where to insert it is up to you.

Now for instructions on adding metrics to different CMSs.

Wordpress is a free management system. It is quite popular due to the fact that it is very easy to use as an article site and has a large number of built-in free templates. It is for bloggers that we will tell you how to install a metric counter.

So, in order to add metrics code to Wordpress, you need to:

  • Go to the administrative panel and select " Appearance" - "Editor".
  • On the right, select the files of the current theme and find footer.php there.
  • Find the tag and paste the code in front of it.
  • The traffic counter code on the Wordpress website has been installed. Now you can see visit statistics.

    1C Bitrix is ​​the most common management system for online stores and corporate websites. When developing websites, we recommend using it. As part of the framework, we install counters and prescribe metric goals ourselves. For everyone else, we offer instructions below.

    For sites using the Bitrix CMS, there are several ways to set metrics. One of them is to install a plugin and use it to add a counter. We will tell you how to do this in the administrative part without installing plugins.


    Thus, you can add a metric counter to Bitrix. With its help, you can collect statistics of visits and visits to the site on 1C Bitrix.

    Joomla is a free management system. We don't use it, but many people still use it. So for them we will tell you how to install a metric counter on Joomla (Jumla).

  • Create a module of the “HTML code” type, add the contents of the code into it.
  • Select module position.
  • Turn off title display.
  • Enable display on all pages.
  • If you do everything correctly, you will be able to track visit statistics on the Joomla website.

    Wix is ​​a shareware management system that allows you to create blog sites and online stores. It is quite common in Russia.

    In order to add a metric counter to Wix sites you need to:

    Ready! A counter for tracking visitors via Yandex metrics for Wix sites is connected.

    Tilda is a free designer that is perfect for blogs and stores that are not designed for SEO promotion. It’s very easy to connect a counter to Tilda websites. To do this you need:


    Yandex Metrica user visit statistics counter for Tilda sites has been added.

    MODx is a free management system. To install a metric counter on MODx sites you need to:

    All! The metric counter for sites on MODx is enabled.

    Opencart is another free management system. It does not have a template code editor, so to add a counter to the site you need to go to file manager site via FTP connection. After connection:


    This way the metric counter code will be installed on all pages of the site on Opencart.

    How to find out if a site has been assigned a Metrics code

    It is important to remember that site statistics begin to be taken into account only at the moment when the counter code is installed on the site. Data on old visits are not taken into account. In this regard, if a counter code is already installed on the site, it is better to request access to this counter from its owner rather than making a new one. This way you can save data on old visits.

    This way you can find the metric counter.

    How to delete site metrics

    In order to delete or change a metric counter on a website, you can use the instructions above for adding counters.

    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 Metrica, Yandex will collect additional information about your site and its visitors, thus, the site’s position in search engines can 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 the installation, go to 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 site 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. Enable 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 this, 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. We find 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.

    Using an FTP connection or through the 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.

    In Soviet times, there was such an educational mini-series for children, “I Want to Know Everything,” which simply and clearly told about everything in the world (the secrets of the universe, etc.).

    And when I look at any site, the same thoughts arise in me: “I want to know everything.” How many visitors were on the site, from what sources, how many of them left a request, what keywords these people came.

    WE ARE ALREADY MORE THAN 29,000 people.
    TURN ON

    What you need as desired

    Cache tracking in the browser address bar. A function that allows you to optimize the collection of statistics for AJAX sites.

    Asynchronous code.

    Since I'm not a programmer myself, I don't even know what it is. So I looked. Thanks to this checkbox, you activate asynchronous code.

    That is, when the site is loaded, all codes are loaded sequentially, and if something does not work, then the turn may not come to load the metric. Thanks to this checkbox, Metrica will always work.

    For XML sites. A function that allows you to optimize the collection of statistics for XML sites.

    One line.

    In fact, this one checkmark turns a huge code into some kind of text. If you are not well versed in programming, but will insert the code into the site yourself, then feel free to click on this checkbox.

    Prohibition of sending site pages for indexing. Don't want your site to be shown in Yandex Search? Just check this box and you can do your shady business (just kidding).

    Informer. I think you have often seen such a thing on the pages of various news sites

    Informer

    This is the same informer. Shows information (hence the informer) how many visitors there were on the site in the last 24 hours.

    After clicking the checkbox, you will see it in a preview, and you can also customize it as you wish (make it beautiful graphically). Frankly, if you have a one-page website on which you sell goods or services, you don’t need it. But if you have

    informational portal

    and , which you constantly need to show to advertisers, then yes, you need to check the box.

    - Sending e-commerce data to Metrica. Relevant if you have an online store. Check the box, set up goals for e-commerce and your applications, orders, purchases are in full view.

    In theory. Because if you take it seriously, it’s better to set up an end-to-end analytics system. There will be an article on this topic, but later.

    All you have to do is select the functions you need (if you don’t want to bother, click all the checkboxes, it’s not explosive) and click the “Save” button.


    If you forgot to copy the code and you were redirected to another page, do not worry, you can always return to it.

    So, all the settings have been made, the Metrica code is available, now you can take the code. This is how it will look like normally

    Code in normal form

    And this option is to embed it on your website. I think if you know the html programming language at least a little, then installing the Yandex Metrica counter will not be difficult for you.

    The main thing is to insert it between the tags... If this is difficult for you, then you can hire a freelancer on the Kwork website and pay 500 rubles for it.

    As soon as it is installed, a green circle will light up (previously it was a tick).

    Verifying the installation

    And if you need to change it or add something (for example), then all you need to edit is to click the gray pencil.

    Briefly about the main thing

    That's all, now you know how to install Yandex Metrica on a website. But just in case, briefly once again how to embed the Yandex Metrica code yourself:

  • Create an account in Yandex;
  • Go to the Metrica tool and click “Add counter”;
  • Add all the parameters you need (name, time zone, etc.);
  • Save it (it is assigned a unique number);
  • Set all the necessary technical settings;
  • Save the counter;
  • You embed it on your site.
  • But I’ll warn you just in case. If you decide to change the settings of the counter (forgot to connect the web viewer, etc.), then you will have to insert it into the site again, so as I wrote above, check all the boxes, it won’t be superfluous.

    Lifehack.

    If you are determined to attract clients from contextual advertising, then I recommend the Rush Analytics service. The speed of its work is amazing, it works online. And using this link you will be given 200 rubles to test the service 😉 This article is intended primarily for beginner webmasters. We will consider installing a Yandex Metrica counter on the website - free system

    • web analytics.
    • Data importance 100%
    • Data accuracy 98%
    • Ease of installation 85%
    Reporting capabilities 95%

    Why do you need Yandex Metrica? The Yandex Metrica analytics system shows the site owner full information

    about the state of the resource, about visitors, page loading speed, conversions and much more. Using this analytics system, you can fully manage your site and understand the most important current indicators. Therefore, I recommend that everyone install a Yandex Metrics counter on their website (I’ll tell you how to do this later). Moreover, the system is completely free! Initial setup

    counter


    To start installing the counter, we need a Yandex account. Let's assume that we already have it. Go to the page https://metrika.yandex.ru and connect to the system.


    Add your first counter now!

    Click on “Add a counter” and move on to the most important process - the initial setup of the Yandex Metrica counter for your website.


    There are several important points at this step:

    • We register the domain name without a protocol (http or https)
    • You can try changing the visit timeout to a lower value. This parameter affects the number of visits. If you set a lower value, you will receive slightly more visits. Whether this influences site behavior is unclear, but it's a topic worth experimenting with.
    • You must agree to the terms of service

    • Check the box “Webvisor, scrolling map”;
    • In one line;

    DO NOT check the “Informer” (I’ll tell you why below)

    A code will be generated at the bottom of the page that needs to be inserted into the site.


    Metrics code for embedding on a website Installing Yandex Metrics on a website

    Installing a counter on your website is very simple. The recommendations say that it is better to place the counter closer to the top of the page. I put it after the tag. The recommendation to “put it higher” has a very obvious advantage: counter data begins to arrive earlier, despite asynchronous loading. And the sooner the data starts arriving, the better.

    Installing Yandex Metrics on WordPress

    There are several ways to install a counter on WordPress:

    • using a plugin (so-so method), suitable for a beginner
    • directly into the template code (suitable for advanced users)

    The plugin can be downloaded directly from the WordPress repository (use the search bar in the “Plugins” - “Add New” tab directly in the admin panel of your site). By searching “Yandex Metrica” you can easily find a suitable plugin. The installation is standard. In the settings you will need to specify either the counter number (it is written in the metric next to the counter domain) or the entire generated code.

    At manual installation For the metric code, we will need the header.php file of the active theme. We find a tag in it and immediately after it we put the generated code.

    How to install metrics on Joomla

    For Joomla the situation is similar. You can select a plugin (which is not practical), or you can install it manually. To do this, you will need the index.php file of the current template. You need to find the tag in it and immediately after it insert the code generated by the metric.

    Installing Yandex metrics on 1C-Bitrix

    Subscribers often ask about how to add metric code to Bitrix. In fact, the installation in 1C-Bitrix is ​​similar. The only difference is that the header.php file we need may not be in one place (depending on how much the developer follows the Bitrix development rules). If the site is developed in accordance with the internal standards of 1C-Bitrix, then you need to check only 2 places:

    • local/templates/your_template
    • bitrix/templates/your_template

    In the header.php file we look for the tag, after which we insert the generated Yandex Metrica code.

    Installing Metrica on ModX

    With the ModX system the situation is somewhat different. For correct installation You must first create an appropriate chunk in which to place the metric code.


    Creating a Yandex Metrics chunk in ModX

    Then this chunk is displayed on the site. In this example, in the footer of the pages (footer.php file)


    Outputting a chunk with Metrica in ModX

    After this, the metric will begin collecting data.

    How to install Metrica on Opencart?

    Installing a metric counter on opencard is very simple. Let's go to the directory /catalog/view/theme/default/template/common,(if the template is standard) and there we find the header.tpl file and insert the code generated by the metric into it after the tag. Installation completed!

    Installing a Yandex Metrics counter on WIX

    Installing an analytics system on WIX is very simple. You need to select the domain in your account for which we will set the metric, then the “Web Analytics” section, insert the counter number into the field that opens and save the changes. All!


    After this action, analytics will begin collecting data from your site.

    Question answer

    Q: How can I check if the data is being received?
    A: In the list of counters the icon should turn green

    Q: I installed the counter, but the data is not received
    A: Most likely, your site is caching pages. Clear the site cache, as well as the browser cache (Ctrl+F5). This will also be useful

    Q: How to configure widgets in Yandex Metrica?
    A: We will have a big article on this topic.

    Q: What are the most important reports in Yandex Metrica?
    A: Follow the site, an article on this topic is already being written!

    If you have already created your website and it is open for indexing search engines, then soon you will want to receive information about traffic statistics, traffic sources, etc. To do this, you will need to install a traffic counter on all pages of the resource. Let's try to figure out how and where to install such counters.

    Yandex.Metrica Creation

    To create a Yandex.Metrica counter, follow the link while logged in to your account and click the “Add counter” button:

    Then you need to fill in the “Counter Name” and “Site Address” fields, select the time zone, accept the terms of the user agreement and click “Create counter”:

    After this, you will immediately be taken to the counter settings panel, where you can select certain parameters for its operation, for example, enable a web viewer, track a hash (for ajax sites) or install a widget:

    As shown in the screenshot, the counter code with all its settings is presented in the field at the very bottom. Now all that remains is to copy the code and place it on the site.

    Installation

    It is best to install counters on all pages of a resource, so you need to place the code in a common template.

    IN general view it will look something like this:

    In this case, the informer does not have to be placed together with the main counter code; for example, it can be placed in the footer of the page, before the closing tag:

    Google Analytics Creation

    Creating a counter begins with registering a new one Google account Analytics. To do this, follow the link and click “Registration”.

    Then click “Get Tracking ID” and accept the user agreement:

    Immediately after this, you will be taken to a page with a new counter, the code of which must also be placed on all pages of the site.

    ABOUT detailed settings Google Analytics counter can be read.

    Installation

    The installed counter looks something like this:

    Installing counters in various CMS Bitrix

    To install counters in Bitrix, you just need to open the general template and paste the code.

    To do this, being on any page (provided that one template is used for all pages), you need to expand the administrative panel (or, in other words, the Development Panel), select the “Site Template” tab, the “In Control Panel” subtab and click “Edit” sample":

    Then insert the necessary counters according to the examples given above:

    WordPress

    There shouldn’t be any problems when installing counters on WordPress either.

    Just select the “Appearance → Editor” tab in the administration panel, open the header.php file for editing (signed as “Header”) and insert counters:

    OpenCart

    There is a special field for adding a Google Analytics counter to OpenCart.

    You need to go to the “System → Settings” section, opposite your store, select the “Change” action, then select the “Server” tab:

    At the bottom of the page, paste the counter code into the “Google Analytics Code” field and save:

    The installation of the Yandex.Metrica counter and any others can be done in a general template, according to the examples given above. To do this, you will have to connect to the site via FTP and find the template files. Typically, the path is something like this: /catalog/view/theme/your_theme/template/common files footer.tpl or header.tpl

    Joomla

    As with all the systems described above, counters are placed directly in the template files. But if using FTP access is not very convenient, or you are afraid of doing something wrong, you can place counters directly in the admin panel.

    To do this, you will need to create an HTML module (tab “Extensions → Module Manager”, click “Create” and select “HTML code”) and configure it.

    So, let's create a new module:

  • Let's give it a name
  • Insert the counter code
  • Hiding the header display
  • Choosing a position
  • Link to all pages
  • We rejoice!
  • If you are using a framework, then most likely it already provides the ability to place counters on all pages (you will have to look carefully in the settings).

    Other counters

    All other counters, for example Mail.Ru Rating, LiveInternet, etc., are recommended to be inserted before the closing tag. First of all, this is necessary so that the code does not interfere with the page loading. If you still want to place the code somewhere else, then you can use asynchronous loading (the “async” attribute for the tag). This will allow the counter to load simultaneously with the html page.

    If you have problems creating, configuring or installing meters, you can order these services.



    Loading...
    Top