-
Notifications
You must be signed in to change notification settings - Fork 0
/
Yandex.Metrica.php
23 lines (22 loc) · 975 Bytes
/
Yandex.Metrica.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!-- Yandex.Metrika custom parameters -->
<script>
var customYaParams = {ipaddress: "<?php echo $_SERVER['REMOTE_ADDR']; ?>"};
</script>
<!-- /Yandex.Metrika custom parameters -->
<!-- Yandex.Metrika counter -->
<script>
(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();
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
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(0123456789, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true,
params:window.customYaParams
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/0123456789" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->