Support » Plugin: Yandex Metrica » Вебвизор 2.0

Viewing 1 replies (of 1 total)
  • Нет. Но проблема решаема, делюсь рецептом. Измените содержимое файла /templates/tracker-js.php на это:

    <?php defined( 'ABSPATH' ) or die(); ?>
    <!-- Yandex.Metrika counter by Yandex Metrica Plugin -->
    <script type="text/javascript">
        (function (d, w, c) {
            (w[c] = w[c] || []).push(function() {
                try {
                    w.yaCounter<?php echo $this->options["counter_id"];?> = new Ya.Metrika2({id:<?php echo $this->options["counter_id"];?>,
                        webvisor:<?php echo $this->options["webvisor"]?"true":"false";?>,
                        clickmap:<?php echo $this->options["clickmap"]?"true":"false";?>,
                        trackLinks:<?php echo $this->options["tracklinks"]?"true":"false";?>,
                        accurateTrackBounce:<?php echo $this->options["accurate_track"]?"true":"false";?>,
                        trackHash:<?php echo $this->options["track_hash"]?"true":"false";?>});
                } catch(e) { }
            });
    
            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://mc.yandex.ru/metrika/tag.js";
    
            if (w.opera == "[object Opera]") {
                d.addEventListener("DOMContentLoaded", f, false);
            } else { f(); }
        })(document, window, "yandex_metrika_callbacks2");
    </script>
    <noscript>
    	<div><img src="<?php printf( "%s%s", apply_filters( 'yandex_metrica_noscript_img_base', "https://mc.yandex.ru/watch/" ), $this->options["counter_id"] ); ?>" style="position:absolute; left:-9999px;" alt="" /></div>
    </noscript>
    <!-- /Yandex.Metrika counter  -->
Viewing 1 replies (of 1 total)
  • The topic ‘Вебвизор 2.0’ is closed to new replies.