analytics: add the Yandex.Metrika counter to all four landings
Counter 112352796 goes into the <head> of every landing's index.html, ahead of the Vite entry, so the hit fires before React mounts. The pages are plain SPAs served off disk by nginx (Express only answers /api/*), so the static head is the only place it needs to be. One counter serves all four domains, which means reports mix them and every domain has to be listed in the counter's own settings or its hits get filtered — noted in deploy/README.md along with the conversion tracking that is still missing: src/lib/lead.ts pushes a plain custom dataLayer event, which Metrika's ecommerce: 'dataLayer' does not read. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
9736024e60
commit
e7385e8898
+8
-3
@@ -240,6 +240,11 @@ Also enable reg.ru VPS snapshots — a full-image restore beats rebuilding under
|
|||||||
Not a concern at landing-page traffic; nginx `limit_req` is the second layer.
|
Not a concern at landing-page traffic; nginx `limit_req` is the second layer.
|
||||||
- **No CI.** Deployment is a manual `exo-deploy`. A GitHub Actions job that SSHes and
|
- **No CI.** Deployment is a manual `exo-deploy`. A GitHub Actions job that SSHes and
|
||||||
runs it is a natural follow-up once the flow is proven.
|
runs it is a natural follow-up once the flow is proven.
|
||||||
- **Still open before launch** (not deployment blockers): no analytics snippet is
|
- **One Metrika counter for four domains.** All four landings carry the same
|
||||||
installed although `src/lib/lead.ts` pushes `dataLayer` events; and the forms show
|
Yandex.Metrika counter (`112352796`) in `index.html`, so reports mix the domains and
|
||||||
implicit 152-ФЗ consent text with no link to a published privacy policy.
|
every domain has to be listed in the counter's settings, or its hits get filtered.
|
||||||
|
- **Still open before launch** (not deployment blockers): conversions are not wired to
|
||||||
|
Metrika goals — `src/lib/lead.ts` pushes a plain custom `dataLayer` event, which
|
||||||
|
Metrika's `ecommerce: 'dataLayer'` does not read, so a JS goal or an explicit
|
||||||
|
`ym(..., 'reachGoal', ...)` call is still needed; and the forms show implicit 152-ФЗ
|
||||||
|
consent text with no link to a published privacy policy.
|
||||||
|
|||||||
@@ -36,6 +36,43 @@
|
|||||||
"url": "%VITE_SITE_URL%"
|
"url": "%VITE_SITE_URL%"
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<!-- Yandex.Metrika counter -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function (m, e, t, r, i, k, a) {
|
||||||
|
m[i] =
|
||||||
|
m[i] ||
|
||||||
|
function () {
|
||||||
|
(m[i].a = m[i].a || []).push(arguments)
|
||||||
|
}
|
||||||
|
m[i].l = 1 * new Date()
|
||||||
|
for (var j = 0; j < document.scripts.length; j++) {
|
||||||
|
if (document.scripts[j].src === r) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
k = e.createElement(t)
|
||||||
|
a = e.getElementsByTagName(t)[0]
|
||||||
|
k.async = 1
|
||||||
|
k.src = r
|
||||||
|
a.parentNode.insertBefore(k, a)
|
||||||
|
})(window, document, 'script', 'https://mc.yandex.ru/metrika/tag.js?id=112352796', 'ym')
|
||||||
|
|
||||||
|
ym(112352796, 'init', {
|
||||||
|
ssr: true,
|
||||||
|
webvisor: true,
|
||||||
|
clickmap: true,
|
||||||
|
ecommerce: 'dataLayer',
|
||||||
|
referrer: document.referrer,
|
||||||
|
url: location.href,
|
||||||
|
accurateTrackBounce: true,
|
||||||
|
trackLinks: true,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<noscript
|
||||||
|
><div><img src="https://mc.yandex.ru/watch/112352796" style="position: absolute; left: -9999px" alt="" /></div
|
||||||
|
></noscript>
|
||||||
|
<!-- /Yandex.Metrika counter -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -40,6 +40,43 @@
|
|||||||
"url": "%VITE_SITE_URL%"
|
"url": "%VITE_SITE_URL%"
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<!-- Yandex.Metrika counter -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function (m, e, t, r, i, k, a) {
|
||||||
|
m[i] =
|
||||||
|
m[i] ||
|
||||||
|
function () {
|
||||||
|
(m[i].a = m[i].a || []).push(arguments)
|
||||||
|
}
|
||||||
|
m[i].l = 1 * new Date()
|
||||||
|
for (var j = 0; j < document.scripts.length; j++) {
|
||||||
|
if (document.scripts[j].src === r) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
k = e.createElement(t)
|
||||||
|
a = e.getElementsByTagName(t)[0]
|
||||||
|
k.async = 1
|
||||||
|
k.src = r
|
||||||
|
a.parentNode.insertBefore(k, a)
|
||||||
|
})(window, document, 'script', 'https://mc.yandex.ru/metrika/tag.js?id=112352796', 'ym')
|
||||||
|
|
||||||
|
ym(112352796, 'init', {
|
||||||
|
ssr: true,
|
||||||
|
webvisor: true,
|
||||||
|
clickmap: true,
|
||||||
|
ecommerce: 'dataLayer',
|
||||||
|
referrer: document.referrer,
|
||||||
|
url: location.href,
|
||||||
|
accurateTrackBounce: true,
|
||||||
|
trackLinks: true,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<noscript
|
||||||
|
><div><img src="https://mc.yandex.ru/watch/112352796" style="position: absolute; left: -9999px" alt="" /></div
|
||||||
|
></noscript>
|
||||||
|
<!-- /Yandex.Metrika counter -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -39,6 +39,43 @@
|
|||||||
"url": "%VITE_SITE_URL%"
|
"url": "%VITE_SITE_URL%"
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<!-- Yandex.Metrika counter -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function (m, e, t, r, i, k, a) {
|
||||||
|
m[i] =
|
||||||
|
m[i] ||
|
||||||
|
function () {
|
||||||
|
(m[i].a = m[i].a || []).push(arguments)
|
||||||
|
}
|
||||||
|
m[i].l = 1 * new Date()
|
||||||
|
for (var j = 0; j < document.scripts.length; j++) {
|
||||||
|
if (document.scripts[j].src === r) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
k = e.createElement(t)
|
||||||
|
a = e.getElementsByTagName(t)[0]
|
||||||
|
k.async = 1
|
||||||
|
k.src = r
|
||||||
|
a.parentNode.insertBefore(k, a)
|
||||||
|
})(window, document, 'script', 'https://mc.yandex.ru/metrika/tag.js?id=112352796', 'ym')
|
||||||
|
|
||||||
|
ym(112352796, 'init', {
|
||||||
|
ssr: true,
|
||||||
|
webvisor: true,
|
||||||
|
clickmap: true,
|
||||||
|
ecommerce: 'dataLayer',
|
||||||
|
referrer: document.referrer,
|
||||||
|
url: location.href,
|
||||||
|
accurateTrackBounce: true,
|
||||||
|
trackLinks: true,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<noscript
|
||||||
|
><div><img src="https://mc.yandex.ru/watch/112352796" style="position: absolute; left: -9999px" alt="" /></div
|
||||||
|
></noscript>
|
||||||
|
<!-- /Yandex.Metrika counter -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -39,6 +39,43 @@
|
|||||||
"url": "%VITE_SITE_URL%"
|
"url": "%VITE_SITE_URL%"
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<!-- Yandex.Metrika counter -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function (m, e, t, r, i, k, a) {
|
||||||
|
m[i] =
|
||||||
|
m[i] ||
|
||||||
|
function () {
|
||||||
|
(m[i].a = m[i].a || []).push(arguments)
|
||||||
|
}
|
||||||
|
m[i].l = 1 * new Date()
|
||||||
|
for (var j = 0; j < document.scripts.length; j++) {
|
||||||
|
if (document.scripts[j].src === r) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
k = e.createElement(t)
|
||||||
|
a = e.getElementsByTagName(t)[0]
|
||||||
|
k.async = 1
|
||||||
|
k.src = r
|
||||||
|
a.parentNode.insertBefore(k, a)
|
||||||
|
})(window, document, 'script', 'https://mc.yandex.ru/metrika/tag.js?id=112352796', 'ym')
|
||||||
|
|
||||||
|
ym(112352796, 'init', {
|
||||||
|
ssr: true,
|
||||||
|
webvisor: true,
|
||||||
|
clickmap: true,
|
||||||
|
ecommerce: 'dataLayer',
|
||||||
|
referrer: document.referrer,
|
||||||
|
url: location.href,
|
||||||
|
accurateTrackBounce: true,
|
||||||
|
trackLinks: true,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<noscript
|
||||||
|
><div><img src="https://mc.yandex.ru/watch/112352796" style="position: absolute; left: -9999px" alt="" /></div
|
||||||
|
></noscript>
|
||||||
|
<!-- /Yandex.Metrika counter -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user