Update Metrika tag

This commit is contained in:
2026-03-07 12:18:11 +03:00
parent 7a0227244b
commit 8beca48705
2 changed files with 11 additions and 25 deletions

View File

@@ -1,29 +1,15 @@
---
---
<script is:inline>
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter41913764 = new Ya.Metrika({
id: 41913764,
clickmap: true,
trackLinks: true,
accurateTrackBounce: true,
trackHash: true
});
} catch(e) { }
});
<!-- 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.webvisor.org/metrika/tag_ww.js', 'ym');
var n = d.getElementsByTagName("script")[0],
s = d.createElement("script"),
f = function () { n.parentNode.insertBefore(s, n); };
s.type = "text/javascript";
s.async = true;
s.src = "https://cdn.jsdelivr.net/npm/yandex-metrica-watch/watch.js";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else { f(); }
})(document, window, "yandex_metrika_callbacks");
ym(41913764, 'init', {trackHash:true, clickmap:true, referrer: document.referrer, url: location.href, accurateTrackBounce:true, trackLinks:true});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/41913764" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->

View File

@@ -34,7 +34,7 @@ const pageUrl = `${siteUrl}${Astro.url.pathname}`;
<link href="https://fonts.googleapis.com/css2?family=PT+Serif:wght@400;700&family=Source+Code+Pro:wght@400&display=swap&subset=cyrillic" rel="stylesheet" />
</head>
<body>
<slot />
<YandexMetrika />
<slot />
</body>
</html>