Yandex.Metrica - what kind of animal and how to tame it. Step-by-step instructions for setting up. Where is the best place to insert the Yandex metric code and why? Where to place the Yandex metric code

Viewing 6 replies - 1 through 6 (of 6 total)

  • found several articles ... Someone advises to write the code in the footer, and someone - in the header

    Read less seo nonsense. Seo is a pseudoscience, invented by the SEOs themselves, so that they have something to do and how to make money. Some of them are engaged in seo nonsense to cut the dough. Others - simply because of nothing to do, or as they say - is "woe from the mind."
    Where to insert the counter code is not a question to think about a lot. It doesn't matter where to insert it. The only criterion is what would be convenient for you and that it would be on every page.

    Metrica has instructions for installing a meter

    Installation
    Add the counter code to the HTML code of all pages on your site. It is advisable to place the code closer to the top of the page: this way it will load faster. If you installed the code on the site, and then changed the counter settings, the code will need to be updated on all pages.

    Seo is a pseudoscience, invented by the SEOs themselves, so that they have something to do and how to make money.

    CEO is not science at all. This is a set of measures aimed at improving the visibility of the site in the PS and, as a result, getting users from them. If users with PS are not interested, then it can be considered pseudoscience 🙂

    And the fact that in this case 90% of speculation, stupidity and outright lies (because "SEOs" cannot even read the documentation and analyze the issue) is another question.

    It doesn't matter where to insert it.

Good afternoon, readers of the iklife blog!

You are probably very interested in how many people visit your resource, from where and for what requests. You can find out all this information using special tools - metrics. The script is installed into the code of your site, and you can see almost all the actions that your guests take. Today I will tell you how to install Yandex Metrica on a website with WordPress or any other CMS.

With this tool, you can track the behavior of your visitors on the resource. But these are not all the pros that can await you after installation.

There is one bike among SEOs. Its meaning is that sites with established analytics from Yandex rank better in the search engine. The code, which is present directly on the project, can inform the search engine of certain information. The release of new materials, some changes in the work of the resource itself, or something else like that.

Yandex Metrica can track user behavioral factors. If they are good, then the search engine puts your site higher in the search results. In the opposite situation, naturally, problems may arise. For this reason, some webmasters are in no hurry to put analytics on young projects. They think that it will only be harmful and try to use alternative ways to track attendance.

Nevertheless, using Yandex Metrica can significantly affect the development of your project. If you are using analytics for a commercial site, then you can set up so-called “goals”.

Goals are a way to track specific user actions. For example, how many people out of the total number of visitors paid attention to the "Submit request" button, and how many actually sent it.

If we are talking about landing pages, then goals can show the time that users spend reading each block. That is, is it interesting to them or not? Such information will allow you to adjust the content and design of your project in order to achieve greater conversion.

It may take some skill to set goals correctly. Therefore, many project owners are in a hurry to contact freelancers on various popular exchanges.

If you master the correct setting of goals, then you can even earn some money by offering your services to resource owners.

Also Yandex Metrica has a webvisor. This is a really extensive option that will allow you to see literally everything. Up to the movement of your visitor's cursor. Now almost all webmasters install the webvisor code.

Webvisor can help you:

  • See which pages are user-friendly and which aren't.
  • Find out about errors in the structure of the site or its design.
  • See what information guests are focusing on.
  • Increase the clickability of elements.
  • Correct the correct vector of project optimization.

Almost everything is possible with the help of the webvisor. You can see absolutely all the actions of the guests: scrolling through pages, highlighting text, reading some individual elements. By collecting all the data, you can understand what the target audience wants. This will greatly increase the efficiency of the project.

Registration in Yandex and creation of a metric

To use any Yandex services, we need an account. It is common and starts up once. Therefore, I will not explain exactly how registration takes place. Let's move on to creating a counter directly.

Do not neglect the installation of analytics tools on your resource. Sometimes they can become a lifeline for your project, showing information that you can't get in any other way. If you want to learn how to create your own information resources on WordPress and make money on them, then they will give you all the knowledge you need. There you will also get skills in the field of search engine promotion and optimization of your project. Access to the first level is open to everyone.

If you have already created your site 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 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, being logged in under your account, and click the "Add counter" button:

Then you need to fill in the fields "Counter name" and "Site address", select the time zone, accept the terms of the user agreement and click "Create counter":

After that, you will immediately be taken to the counter settings panel, where you can select certain parameters of its operation, for example, enable the webviewer, track the hash (for ajax sites), or install the informer:

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 your code in a common template.

In general, 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 removed to the footer of the page, before the closing tag:

Google analytics

Creation

The creation of a counter begins with the registration of a new Google account Analytics. To do this, follow the link and click "Register".

Then click "Get Tracking ID" and accept the user agreement:

Immediately after that, 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.

You can read about the detailed setup of the Google Analytics counter.

Installation

The installed counter looks something like this:

Installation of 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 another way, the Development Panel), select the "Site Template" tab, the "In Control Panel" sub-tab and click "Edit sample":

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

WordPress

When installing counters on WordPress, you shouldn't have any problems either.

It is enough to select the "Appearance → Editor" tab in the administration panel, open the header.php file for editing (signed as "Header") and insert the counters:

Opencart

To add a Google Analytics counter in OpenCart, a special field is provided.

You need to go to the "System → Settings" section, select the "Change" action in front of your store, then select the "Server" tab:

At the bottom of the page, insert the counter code into the "Google Analytics Code" field and save:

You can install the Yandex.Metrica counter and any others in the general template, according to the examples 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 systems described above, counters are placed directly in template files. But if using FTP access is not very convenient, or there is a fear of doing something wrong, you can place the counters right in the admin panel.

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

So, let's create a new module:

  1. We give it a name
  2. Insert the counter code
  3. Hide the title display
  4. Choosing a position
  5. Bind to all pages
  6. We are glad!

If you use the framework, then most likely it already provides for the possibility of placing counters on all pages (you will have to look carefully in the settings).

Other counters

All other counters, such as 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