New format
Installing Yandex Metrica on a website
Yandex Metrica counts visits, goals, and behavior. Without a counter you’re blind in ads and SEO reports.
Below: where to place the code on popular CMS platforms and how to confirm data is flowing. Panel UIs change — look for “counters” / “Analytics.”
General principle
Create a counter in the Metrica account, copy the code, and deploy it on every site template. Enable click map / Session Replay as needed and set goals.
After pasting:
- open the site in incognito
- check “online” / visits in the account
- clear CMS and CDN cache
- check mobile and desktop versions
WordPress, Bitrix, and others
WordPress: a Metrica plugin or paste into the theme/child theme / “scripts in head.” Bitrix: support settings / Metrica or header template. Joomla and builders (Wix and similar) — custom code / marketing field.
Safety rules:
- don’t edit a parent theme without a child
- one main counter, no duplicates
- Metrica account access — only for needed people
- cookie/analytics consent — per your jurisdiction
Common mistakes
Two different codes at once, counter only on home, cache serving old HTML without the script, goals not set — “visits exist, no leads in the report.”
Debug checklist:
- view page source — is `mc.yandex` / the Metrica tag there
- no Adblock blocking during the test
- correct counter ID
- goals and UTM for ads
Creating a counter and base settings
In the Metrica account create a counter for the exact site domain, set the time zone, and check access rights. Take the code from that counter’s UI: don’t copy a fragment from an old project, even if both sites belong to one company.
Turn on extra tools deliberately. Session Replay and maps help study behavior, but before use check personal-data rules, field masking, and visitor notice requirements in your jurisdiction.
Before deploy prepare:
- owner access to the account
- a list of domains and subdomains to track
- a developer contact or CMS access
- rules for processing analytics data
Goals beat total visit count
A counter without goals shows traffic but not whether the site brings inquiries. Set events for form submit, call, order, signup, or another meaningful action. Goal names should be clear to everyone reading the report.
Fire a goal only after a successful user action — not on a button click. Otherwise the report fills with “leads” from people who opened a form and changed their mind, and ad decisions rest on bad data.
Useful goals:
- successful form submit
- order complete or thank-you page
- click on phone or messenger
- download of an important file if it’s part of the funnel
How to verify the install
Open several key pages in incognito and see whether a visit appears in reports. Then check source or DevTools: the page should have one correct tag with the needed counter ID.
Don’t test only the home page. Catalog, blog, cart, and mobile menu templates may build differently, so the code easily lands on only part of the site. After clearing cache, recheck.
If there’s no data, check in order:
- counter ID correctness
- tag presence on the problem page
- CMS cache, CDN, and script optimizers
- ad blocker in the tester’s browser
FAQ
Where do I paste the code?
Usually in `<head>` on all pages or via a tag manager. On a CMS — a plugin / “scripts in head” field.
Is putting it only in the footer enough?
Better follow Yandex’s recommendation — as early as possible in head, so short visits aren’t lost.
Do subdomains need a separate counter?
Depends on the job. Often one counter with a host filter; sometimes separate ones for different projects.
Why are there no visits after install?
Cache, a blocker, code missing on some templates, a typo in the ID, or the site only open locally to you.
Does Metrica replace Yandex Webmaster?
No. Metrica is user behavior. Webmaster is indexing and search messages.
Should I install via a tag manager?
Handy when the site has many marketing tags and someone owns the container. For a simple site, correctly pasting the official counter code into the template is enough.
Counter “installed” — and the report still shows zero visits?
We’ll place one Metrica tag on every template, clear cache, and wire goals — not just a visit count.
Discuss the task