Skip to content

Commit

Permalink
添加pv
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkey2011 committed Dec 14, 2018
1 parent bdd09c1 commit 1764f87
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/mip-story/mip-story-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ define(function (require) {
index: 8,
evtName: 'VIEWED_PAGE',
desc: '浏览页面'
},
{
index: 9,
evtName: 'VIEWED_PV',
desc: 'pv'
}
];

Expand Down
11 changes: 7 additions & 4 deletions src/mip-story/mip-story-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,19 +166,22 @@ define(function (require) {
this.currentIndex = pageState[1];
this.nextIndex = pageState[2];

this.touchstartX = this.touchendX = 0;
this.moveFlag = false;

// 进入页面 自动发送当前页信息
if(!isPageOneViewed) return;
if(isPageOneViewed) return;
pageViewed = [this.currentIndex];
var pageViewedInfo = '看了第' + (parseInt(this.currentIndex, 10) + 1) + '页';
pageViewedData.optValue = pageViewedInfo;
this.trackEvent(pageViewedData);

// tclog 看了第几页
tcLog(8, {viewingPage: this.currentIndex + 1});
// tclog pv
tcLog(9, {});

isPageOneViewed = true;

this.touchstartX = this.touchendX = 0;
this.moveFlag = true;
}

function enableScroll(ele) {
Expand Down

0 comments on commit 1764f87

Please sign in to comment.