MediaWiki:Common.js: различия между версиями

Материал из Venture Box
Перейти к навигации Перейти к поиску
Строка 46: Строка 46:
ga('create', 'UA-9116991-3', 'venturebox.tk');
ga('create', 'UA-9116991-3', 'venturebox.tk');
ga('send', 'pageview');
ga('send', 'pageview');
//
// Скрипт для виджета FB
//
importScript('Fb_vitget.js');

Версия 16:25, 31 марта 2016

// Размещённый здесь код JavaScript будет загружаться пользователям при обращении к каждой странице 
//
// Rating@Mail.ru counter
//
var _tmr = _tmr || [];
_tmr.push({id: "2440688",  type: "pageView", start: (new Date()).getTime()});
(function (d, w) {
   var ts = d.createElement("script"); ts.type = "text/javascript"; ts.async = true;
   ts.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//top-fwz1.mail.ru/js/code.js";
   var f = function () {var s = d.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ts, s);};
   if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); }
})(document, window);

//
// Yandex.Metrika counter
//
(function (d, w, c) {
    (w[c] = w[c] || []).push(function() {
        try {
            w.yaCounter23471164 = new Ya.Metrika({id:23471164,
                    clickmap:true,
                    trackLinks:true,
                    accurateTrackBounce: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 = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";

    if (w.opera == "[object Opera]") {
        d.addEventListener("DOMContentLoaded", f, false);
    } else { f(); }
})(document, window, "yandex_metrika_callbacks");

//
// Google.Analytics
//
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-9116991-3', 'venturebox.tk');
ga('send', 'pageview');
//
// Скрипт для виджета FB
//
importScript('Fb_vitget.js');