From c4e72c56d89c4fb0fbf6373a712023c30f90dda2 Mon Sep 17 00:00:00 2001 From: Rinat Arsaev <11846445+KrickRay@users.noreply.github.com> Date: Mon, 23 Nov 2020 17:02:37 +0300 Subject: [PATCH] Add Yandex Metrika (#286) --- src/index.pug | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/index.pug b/src/index.pug index 0c6fc01..91bf51e 100644 --- a/src/index.pug +++ b/src/index.pug @@ -14,3 +14,17 @@ body function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-131422254-1'); + // 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(69481282, "init", { + clickmap:true, + trackLinks:true, + accurateTrackBounce:true + }); + noscript + div + img(src='https://mc.yandex.ru/watch/69481282' style='position:absolute; left:-9999px;' alt='') + // /Yandex.Metrika counter \ No newline at end of file