Using CUSTOM JAVASCRIPT window for adding Yandex metrika

Posted in: Newspaper
Post count: 31

Hi,

I need to add Yandex metrika code and not sure how to amend it so that it does not return syntax errors. Could you please help me? It is mentioned not to use the <script> and </script>, but I could not make it work trying many ways of amending the code. Sorry for a rookie question.

<!– Yandex.Metrika counter –> <script type=”text/javascript” > (function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter38012295 = new Ya.Metrika({ id:38012295, clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true, trackHash:true }); } 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/watch.js&#8221;; if (w.opera == “[object Opera]”) { d.addEventListener(“DOMContentLoaded”, f, false); } else { f(); } })(document, window, “yandex_metrika_callbacks”); </script> <noscript><div></div></noscript> <!– /Yandex.Metrika counter –>

  • This topic was modified 8 years by Serd.
Post count: 23312

Hello Serd,

Unfortunately, our theme does not support Yandex Metrika and also, we cannot offer support for this implementation because we cannot provide custom work, sorry!

Thanks for your understanding!

Post count: 1341

Try to add “Yandex.Metrika counter” code in widget as “text”:

Result (i’m also insert “Yandex.Metrika informer”):

All working fine.

Post count: 31

Спасибо, Эдвард, попробую.

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.