Skip to content

Instantly share code, notes, and snippets.

@sashabeep
Created May 25, 2023 10:46
Show Gist options
  • Save sashabeep/d9b876f84e32af00cd84baa9ced683c5 to your computer and use it in GitHub Desktop.
Save sashabeep/d9b876f84e32af00cd84baa9ced683c5 to your computer and use it in GitHub Desktop.
YM + client settings
<!-- 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();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({{ $modx->getConfig('client_ymid') }}, "init", {
id:{{ $modx->getConfig('client_ymid') }},
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/{{ $modx->getConfig('client_ymid') }}" 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