Add Yandex Metrica

This commit is contained in:
Amauri CHAMPEAUX 2019-11-30 11:26:31 +01:00
parent a8404b8389
commit e5e0702a15
1 changed files with 31 additions and 0 deletions

View File

@ -47,6 +47,37 @@ tarteaucitron.services.abtasty = {
}
};
// yandex metrica
tarteaucitron.services.metrica = {
"key": "metrica",
"type": "analytic",
"name": "Yandex Metrica",
"uri": "https://yandex.com/legal/confidential/",
"needConsent": true,
"cookies": ['_ym_metrika_enabled','_ym_isad', '_ym_uid', '_ym_d','yabs-sid','_ym_debug','_ym_mp2_substs','_ym_hostIndex','_ym_mp2_track','yandexuid','usst'],
"js": function () {
"use strict";
if (tarteaucitron.user.yandexmetrica === undefined) {
return;
}
tarteaucitron.addScript('https://mc.yandex.ru/metrika/tag.js', '', function() {
window.ym = window.ym || function () {
(window["ym"].a = window["ym"].a || []).push(arguments)
};
window["ym"].l = 1 * new Date();
window.ym(tarteaucitron.user.yandexmetrica, "init", {
clickmap: true,
trackLinks: true,
accurateTrackBounce: true,
webvisor: true
});
});
}
};
// addthis
tarteaucitron.services.addthis = {
"key": "addthis",