Authored by zzzzzzz

埋点统计

... ... @@ -279,7 +279,7 @@ function reMarginFooter(fixedElement) {
function givePoint(parameter) {
var CID = 1;
if (!window._yas) {
if (!window._yas || !window._yas.sendCustomInfo) {
return false;
}
... ...
... ... @@ -7,7 +7,8 @@ var $ = require('jquery'),
noticeScroll = require('../plugin/notice-scroll');
var $userAvatar = $('.user-avatar'),
$listItem = $('.list-item');
$listItem = $('.list-item'),
$studentVe = $('.students-entry');
var myImage = new Image(),
avatar;
... ... @@ -29,3 +30,23 @@ $('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', functio
}).on('touchend touchcancel', '.list-item, .type-item, .order-title', function() {
$(this).removeClass('highlight');
});
var getChannel = function() {
var name = window.cookie('_Channel');
return {
boys: 1,
girls: 2,
kids: 3,
lifestyle: 4
}[name] || 1;
};
$studentVe.on('click', function(){
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
C_ID: getChannel(),
SRC_ID: 2
}, true);
}
});
\ No newline at end of file
... ...
... ... @@ -59,7 +59,7 @@ $('#likeBtn').on('touchstart', function() {
});
// 统计代码:用于统计用户加入或取消商品收藏的动作
if (window._yas) {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
pd: productId,
fa: favorite
... ... @@ -84,7 +84,7 @@ $('#addtoCart').on('touchstart', function() {
chosePanel.show();
//统计代码:用于统计用户加入购物车的动作
if (window._yas) {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
pd: productId,
by: 1
... ...