...
|
...
|
@@ -197,14 +197,13 @@ function reMarginFooter(fixedElement) { |
|
|
(function() {
|
|
|
var uid = getUid(),
|
|
|
hasParentBp = false, // 判断是否有父级埋点,如果有,点击子埋点,不处罚父埋点。
|
|
|
basicBpDataLength = 3;
|
|
|
|
|
|
var sendBpData,
|
|
|
basicBpDataLength = 3,
|
|
|
sendBpData,
|
|
|
bindBpEvent;
|
|
|
|
|
|
uid = uid === 0 ? '' : uid;
|
|
|
|
|
|
window._ozuid = uid;//暴露ozuid
|
|
|
window._ozuid = uid; // 暴露ozuid
|
|
|
|
|
|
if (window._yas) {
|
|
|
window._yas(1 * new Date(), '1.0.15', 'yohobuy_m', uid, '', '');
|
...
|
...
|
@@ -219,25 +218,29 @@ function reMarginFooter(fixedElement) { |
|
|
floor: bpIdArr[1],
|
|
|
data: bpIdArr[2]
|
|
|
};
|
|
|
|
|
|
window._yas.sendCustomInfo(jsonData, Boolean(parseInt(bpIdArr[3]) || 1));
|
|
|
if (window._yas.sendCustomInfo) {
|
|
|
window._yas.sendCustomInfo(jsonData, Boolean(parseInt(bpIdArr[3]) || 1));
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
// 绑定埋点点击事件
|
|
|
bindBpEvent = function() {
|
|
|
$(document).off('click').on('click', '.buriedpoint', function(e) {
|
|
|
$('.buriedpoint').off('click').on('click', function(e) {
|
|
|
var databpid = $(this).attr('data-bp-id') || '',
|
|
|
bpIdArr = databpid.split('_'),
|
|
|
hasParentBp = false;
|
|
|
bpIdArr = databpid.split('_');
|
|
|
|
|
|
var $target = $(e.target),
|
|
|
partentBpLength = $target.parents('.buriedpoint').length;
|
|
|
|
|
|
if ($(e.target).parents('.buriedpoint').length > 0) {
|
|
|
hasParentBp = true;
|
|
|
}
|
|
|
if (!hasParentBp && bpIdArr && bpIdArr.length >= basicBpDataLength) {
|
|
|
sendBpData(bpIdArr);
|
|
|
}
|
|
|
|
|
|
if ($target.hasClass('buriedpoint') && partentBpLength > 0 ||
|
|
|
partentBpLength >= 2) {
|
|
|
hasParentBp = true;
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
...
|
...
|
@@ -250,7 +253,7 @@ function reMarginFooter(fixedElement) { |
|
|
$(document).on('shouldSendBpData', function(e, dataPbId) {
|
|
|
var bpIdArr;
|
|
|
|
|
|
if (dataPbId && (dataPbId.length && dataPbId.length > 0)) {
|
|
|
if (dataPbId && dataPbId.length && dataPbId.length > 0) {
|
|
|
hasParentBp = false;
|
|
|
bpIdArr = dataPbId.split('_');
|
|
|
sendBpData(bpIdArr);
|
...
|
...
|
|