L
L
lexstile2020-09-01 12:25:30
Search Engine Optimization
lexstile, 2020-09-01 12:25:30

How to reduce the download time of the Yandex metrics counter?

How to overcome the problem? More than a second blocks the stream - this is wrong.
5f4e131931ab8780633913.png
Counter example:

<!-- Yandex.Metrika counter -->
    <script type="text/javascript" async>
       (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(111111, "init", {
            clickmap:true,
            trackLinks:true,
            accurateTrackBounce:true,
            webvisor:true
       });
    </script>
    <noscript><div><img src="https://mc.yandex.ru/watch/111111" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
    <!-- /Yandex.Metrika counter -->

I remove the metric from the code altogether, but for some reason it is still here:
5f4e16306e9af986724662.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2020-09-01
@opium

What the hell?
Connect it asynchronously and it will load after and in parallel

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question