javascript 与yandex metrika的turbolinks的反击
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 与yandex metrika的turbolinks的反击相关的知识,希望对你有一定的参考价值。
(function (d, w, c) {
(w[c] = w[c] || []).push(function () {
try {
w.yaCounter99999999 = new Ya.Metrika({
id: 99999999,
clickmap: true,
trackLinks: true,
accurateTrackBounce: true,
webvisor: 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";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else {
f();
}
})(document, window, "yandex_metrika_callbacks");
$(document).on('turbolinks:before-visit', function () {
window.turbolinks_referer = location.href;
});
$(document).on('turbolinks:load', function () {
if (window.turbolinks_referer) {
// yandex metrika
if (window.yaCounter99999999) {
window.yaCounter99999999.hit(location.href, $('title').html(), window.turbolinks_referer);
}
}
});
以上是关于javascript 与yandex metrika的turbolinks的反击的主要内容,如果未能解决你的问题,请参考以下文章
javascript yandex_metrica.js
javascript Yandex的-metrica-404.js
javascript Yandex的-示例-Perfectoin.js
javascript Yandex映射Api
javascript Yandex的-metrica-404.js
使用 matplotlib 和 seaborn 在多元时间序列图中突出显示时间间隔