Значение 12345678 необходимо заменить на свой ID.
Last active
February 18, 2026 10:26
-
-
Save kupereal/05f01d180e5b9ade92141468331c9bd8 to your computer and use it in GitHub Desktop.
Правильный код Яндекс.Метрики для GTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- 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", "ym"); | |
| ym(12345678, "init", { | |
| clickmap:true, | |
| trackLinks:true, | |
| accurateTrackBounce:true, | |
| webvisor:true, | |
| trackHash:true, | |
| triggerEvent:true | |
| }); | |
| </script> | |
| <noscript><div><img src="https://mc.yandex.ru/watch/12345678" style="position:absolute; left:-9999px;" alt="" /></div></noscript> | |
| <!-- /Yandex.Metrika counter --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment