=== Vagizov Metrika Loader ===
Contributors: maximvagizov
Tags: yandex metrika, metrika, analytics, performance, webvisor
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Неофициальный плагин для аккуратного подключения Яндекс Метрики в WordPress: ID счётчика, режимы загрузки, проверка, cookie consent и диагностика дублей.

== Description ==

Vagizov Metrika Loader helps WordPress site owners connect Yandex Metrica without editing theme files.

The plugin is not an official Yandex product and is not affiliated with Yandex.

Main features:

* Add Yandex Metrica by counter ID only.
* Load the counter in the footer.
* Choose loading mode: footer, delay, user interaction, interaction or delay, cookie consent, combined.
* Recommended default mode: user interaction or delay.
* Configure desktop, mobile/tablet and common interaction events.
* Add a status-check URL for Yandex Metrica verification.
* Detect possible duplicate counters in the active theme files.
* Avoid frontend duplicate initialization when enabled.
* Exclude logged-in WordPress users from tracking.
* Enable Webvisor, click map, external links, accurate bounce and ecommerce dataLayer options.

Helpful articles:

* How to find and create a Yandex Metrica counter: https://vagizov.com/articles/kak-najti-i-sozdat-schetchik-yandex-metriki/
* Correct Yandex Metrica setup for SEO: https://vagizov.com/articles/pravilnaya-nastrojka-yandex-metriki-dlya-seo/
* How to remove a duplicate Yandex Metrica counter in WordPress: https://vagizov.com/articles/kak-najti-i-ubrat-dubl-yandex-metriki-wordpress/

== External services ==

This plugin connects to Yandex Metrica only when the site owner enables tracking and enters a counter ID.

When enabled, the plugin may load the Yandex Metrica script from:

* https://mc.yandex.ru/metrika/tag.js

The plugin may also send tracking hits to Yandex Metrica according to the counter settings selected by the site owner.

Yandex Metrica documentation:

* https://yandex.ru/support/metrica/

== Privacy ==

This plugin does not send data to the plugin author and does not connect to vagizov.com from the frontend.

Yandex Metrica is a third-party analytics service. Site owners are responsible for configuring Yandex Metrica, privacy notices, consent banners and legal compliance for their own sites.

== Installation ==

1. Upload the plugin ZIP through the WordPress admin area or install it from the WordPress plugin directory.
2. Activate the plugin.
3. Open the “Метрика” menu item.
4. Enter your Yandex Metrica counter ID.
5. Enable tracking.
6. Choose the loading mode.
7. Open the “Проверка” tab and test the counter.

== Frequently Asked Questions ==

= Is this an official Yandex plugin? =

No. Vagizov Metrika Loader is an unofficial plugin and is not affiliated with Yandex.

= Does the plugin create a Yandex Metrica counter? =

No. Create the counter in your Yandex Metrica account, then paste only its numeric ID into the plugin settings.

= Why is the recommended mode “user interaction or delay”? =

It is a balanced mode. The Yandex script does not load in the critical rendering path, but the counter can still load after a fallback delay if the visitor does not interact with the page.

= Can delayed loading make statistics incomplete? =

Yes. The later the counter loads, the higher the risk that very short or inactive visits will not be recorded. This is a performance and analytics trade-off.

= Does the plugin remove bots from Yandex Metrica? =

No. Bot filtering is configured in Yandex Metrica itself. This plugin can delay loading so inactive bot-like visits may not trigger the counter, but it is not a replacement for Yandex Metrica filters.

= Can the plugin remove an old duplicate counter automatically? =

No. The plugin can help detect possible code in the active theme files, but it does not edit your theme files automatically. Remove old counter code manually after making a backup.

== Changelog ==

= 1.0.0 =
* Initial public version.
