How to add Yandex Metrica to a WordPress site

print · Время на чтение: 3мин · - · Опубликовано · Обновлено

playListen to this article

How to add a Yandex Metrica counter to a WordPress site.Add a Yandex Metrica counter to a WordPress site won't be a big deal. Adding a counter takes a minimum of time, especially if you are well versed in the site admin panel and its files.
I decided to write this small guide that will help you correctly install the Yandex Metrica counter code on the site. With convenient placement examples. The emphasis is on examples that are best used in terms of site load. Let's get started!

The content of the article:

How to add a Yandex Metrica counter to a WordPress site using a plugin - is it worth it

How to install a counter using a plugin. Complete instructions for installing the Yandex metric plugin and placing it on the WordPress site using its metric counter code. This can be done simply and quickly.

Using plugins when adding metric counters to a site is a fairly common and simple method. It is enough to install the necessary plugin and place the pre-generated year of the counter in it. After inserting, the data will be immediately displayed in your metric.

Here you will be useful, the simplest counter implementation plugin “Yandex Metrica“. It is enough to enter this name in Russian letters in the search for plugins, the plugin will be in the first place. After that, install it and activate it. Then just go to the plugin settings in the field to insert your counter code. Then just save the settings and you're done.

Yandex Metrica plugin - instructions for adding the Yandex metric counter code. Find the installed plugin in the WordPress admin panel. The settings menu at the very bottom is a plugin, click on it to add a counter.

Another method of setting a metric is to use the Yandex Metrica plugin on a WordPress site. The plugin is easy to use, just install it and activate it. Then paste the generated counter code into the field.

What is bad about this method - the only negative is that it is another plugin that loads your site. A lot of people don't like this news. But if your site works great with a lot of plugins, then this solution is exactly for your site.

Installing Yandex metrics on WordPress through the theme menu - the condition is a paid theme and support for this function

How to add a counter directly through a WordPress theme. Adding condition - Your theme must have a paid premium and support the installation of the code in the footer of the site. Thus, connecting the metric counter to the site will not be difficult.

Another way to add metrics to your site is to use the functionality of an installed WordPress theme. Please note that not many paid themes support this feature. On free templates, there is no such extension at all.

The addition itself is very simple, go to your theme settings, and find the tabs for example: code insertion or footer settings. Take a look at the example from my site, see the image below:

Installing a counter on a WordPress site - directly through a functional paid theme in the footer of the site. A fairly simple method for adding Yandex metrics to a WordPress site. This solution is the most correct in terms of optimization.

As you can see, I add codes directly through the theme settings. This is the most correct way to connect visit counters to the site. You immediately solve the problem with an additional plugin or tweaking the theme code. Of course, if you do not have such an opportunity, then the following example is for you.

Installing a metric counter in WordPress using the footer.php theme file is the easiest way

Connecting the counter to the WordPress site by inserting footer.php into the footer of the site. This is the most efficient way to add code to all pages of a WordPress site at once.

This is the most common and efficient way to add hit counters and statistics to your WordPress site. Let's consider it in more detail:

  1. Connect to the site via ftp client.
  2. Then open the directory wp-content-themes.
  3. Select the folder of your active theme.
  4. Open footer.php file.
  5. Add the generated code to the bottom of the file, behind the authorship display function.
  6. Save the file.
  7. Then you should open the site and check the correct display of the counter.
  8. If necessary, you can move the code, at your discretion, to the place in the basement where it is convenient for you to place it.

See the image below for an understanding of the whole picture.

Adding the counter code to the footer of the site - installing Yandex Metrics directly in the footer.php file. The code is placed in a specific line of code, for proper functionality and avoiding load on the site.

Let's consider an example of installing the counter code on the site by inserting it into the footer.php file. This method is the most efficient and does not put any extra load on your WordPress site. Compared to using plugins.

As you can see all examples connecting a counter in wordpress is easy and don't take much time. Thus, you can add any necessary code to the site. In the following articles, I will talk about connecting Yandex Metrics plugin and Google Analytics to the site. Also, how to create an XML and HTML sitemap. If you have any questions, please write in the comments.

Reading this article:

Thanks for reading: SEO HELPER | NICOLA.TOP

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 275

No votes so far! Be the first to rate this post.

Читайте также:

1 Response

  1. Евгений says:

    Your lessons are just top, everything is consistent. Thank you for your work)))

Добавить комментарий

Your email address will not be published. Обязательные поля помечены *

7 + 12 =