How to add Yandex Metrica 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
- Installing Yandex metrics on WordPress through the theme menu - the condition is a paid theme and support for this function
- Installing a metric counter in WordPress using the footer.php theme file is the easiest way
How to add a Yandex Metrica counter to a WordPress site using a plugin - is it worth it
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.
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
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:
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
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:
- Connect to the site via ftp client.
- Then open the directory wp-content-themes.
- Select the folder of your active theme.
- Open footer.php file.
- Add the generated code to the bottom of the file, behind the authorship display function.
- Save the file.
- Then you should open the site and check the correct display of the counter.
- 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.
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:
- How to Delete Unwanted Comments in WordPress
- How to Install Google Analytics on a WordPress Site – Counter
Thanks for reading: SEO HELPER | NICOLA.TOP
Your lessons are just top, everything is consistent. Thank you for your work)))