Authored by lijing

增加埋点

{{#if singleOne}}
{{#data}}
<div class="banner-list">
<a href="{{url}}">
<a href="{{url}}" id="{{../template_id}}" name="{{../template_intro}}">
<img src="{{image2 src w=640 h=200 q=60 mode=3}}" alt="">
</a>
</div>
... ... @@ -11,7 +11,7 @@
<ul class="banner-list swiper-wrapper clearfix">
{{#data}}
<li class="swiper-slide">
<a href="{{url}}">
<a href="{{url}}" id="{{../template_id}}" name="{{../template_intro}}">
<img src="{{image2 src w=640 h=200 q=60 mode=3}}" alt="">
</a>
</li>
... ...
<div class="thumb-row">
{{# data}}
<a href="{{url}}">
<a href="{{url}}" id="{{../template_id}}" name="{{../template_intro}}">
<div class="thumb-row-box" style="background-image:url({{image2 src w=275 h=160 q=60}})"></div>
</a>
{{/ data}}
... ...
... ... @@ -43,15 +43,18 @@ $('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', functio
// 埋点
$('.res-c').on('click', 'a', function() {
var $this = $(this);
var index = $this.index() + 1;
var pIndex = $this.parent('div').index() + 1;
var url = $this.attr('href');
var name = $this.attr('name');
var id = $this.attr('id');
window._yas.sendCustomInfo({
// op: 'YB_CHOOSE_FOR_YOU_Y',
// appop: isAppOp ? 'YB_CHOOSE_FOR_YOU' : '', // app内打开wap的埋点场合
// param: JSON.stringify(parameter),
// REC_POSE: RECPOSE,
// PRD_ID: $(this).closest('.good-info').data('id'),
// PRD_NUM: index % pageNum === 0 ? pageNum : index % pageNum,
// ACTION_ID: 1,
// PAGE_NUM: Math.ceil(index / pageNum)
I_INDEX: index,
F_URL: encodeURIComponent(url),
F_NAME: name,
F_INDEX: pIndex,
F_ID: id
}, true);
});
... ...