javascript ya / ga柜台检查
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript ya / ga柜台检查相关的知识,希望对你有一定的参考价值。
if(typeof gtag !== 'undefined'){
gtag('event', 'podrobnee_click', {'event_category':'button', 'event_action':'click', 'event_label':'podrobnee'});
console.log('gtag done!');
}
if(typeof yaCounterXX1X61XX !== 'undefined'){
yaCounterXX1X61XX.reachGoal('podrobnee');
console.log('ya done!');
}
if (typeof ga !== 'undefined') {
ga('send', 'event', 'form', 'submit', 'feedbackok');
console.log('ga done!');
}
$(document).ajaxSuccess(function (event, jqXHR, ajaxOptions, data) {
console.log("event: ", event);
console.log("jqXHR: ", jqXHR);
console.log("ajaxOptions: ", ajaxOptions);
console.log("data: ", data);
if (!!data['success'] && data['success'] === true) {
if(!!ajaxOptions.url && ajaxOptions.url.indexOf('callback') !== -1){
if(typeof yaCounter12321312312 !== 'undefined'){
//успешная отправка формы заказ звонка
yaCounter12312312312.reachGoal('order_call');
console.log('ya done!');
}
}
}
});
jQuery(document).on('yacounter12345678inited', function () {
console.log('счетчик yaCounter12345678 можно использовать');
yaCounter47946821.reachGoal('order_send');
console.log('order_send; ya done!');
});
$(window).load(function () {});
window.onload = function(){};
以上是关于javascript ya / ga柜台检查的主要内容,如果未能解决你的问题,请参考以下文章
JavaScript AGREGAR funciones al page load sin anular otros eventos ya agregados
VMware密钥
在外部 JavaScript 库中定义函数时如何检查未定义? (Angular4/5)
JavaScript 使用javascript为WordPress和GA模拟点击
Javascript - GA 和 Adwords
javascript 发送Ga