Commit 16079889 authored by wangwei's avatar wangwei

神策

parent 91216198
......@@ -190,10 +190,15 @@
if(this.saleObj){
json.order_coupon_id =this.saleObj.id
}
let invite = this.$route.query.invite_code;
this.$sa.track('placeOrder',{
buyType:this.groupDetail.goods_type === 2 && !this.type ? '团购' : '直购',
couponAmount:this.saleObj ? this.saleObj.money : 0,
paymentAmount:Number(this.priceTotal),
goodsID:this.shopId.toString()
goodsID:this.shopId.toString(),
salesType:invite?invite.split('-')[1]:'null',
salesID:invite?Number(invite.split('-')[2]):0
});
if(window.location.href.indexOf('gdt_vid')>-1){
json.gdt_vid = this.$route.query.gdt_vid
......
......@@ -463,9 +463,12 @@
} else{
query.type=''
}
let invite = this.$route.query.invite_code;
this.$sa.track('buyCourse',{
buyType:this.groupDetail.goods_type === 2 && buyType !== 'single' ? '团购' : '直购',
goodsID:this.shopId
goodsID:this.shopId,
salesType:invite?invite.split('-')[1]:'null',
salesID:invite?Number(invite.split('-')[2]):0
});
if(window.location.href.indexOf('gdt_vid')>-1){
......
......@@ -174,6 +174,8 @@
return {
shopType:this.$route.query.course_type,
diaBGI:diaBGI,
goodsID:'',
themeName:'',
course_id:'',
push_time:'',
course_name:'',
......@@ -186,6 +188,7 @@
popupVisible:false,
lessonList:[],
lesson:'',
classID:'',
noLesson:false,
nextToURL:nextToURL,
hpLessonList:[],
......@@ -295,9 +298,14 @@
},
// 进入课程
goDetail(){
// 神策埋点 选择课时
// 神策埋点 开始课程
this.$sa.track('StartCourse',{
elementID:this.thisLesson.id.toString(),
elementName:this.thisLesson.title,
themeID:this.parent_category_id,
themeName:this.themeName,
goodsID:this.goodsID,
classID:this.classID,
is_view_today:!!new Date().setHours(0, 0, 0, 0) === new Date(this.push_time).setHours(0, 0, 0, 0)
});
if(this.thisLesson.content.tips){
......@@ -310,6 +318,10 @@
};
let lessonData = JSON.parse(JSON.stringify(this.thisLesson));
lessonData.push_time = this.push_time;
lessonData.themeID=this.parent_category_id;
lessonData.themeName=this.themeName;
lessonData.goodsID=this.goodsID;
lessonData.classID=this.classID;
localStorage.setItem('lessonDetail',JSON.stringify(lessonData));
this.$router.push({name:'newLesson',query:query})
}else{
......@@ -327,10 +339,12 @@
// 切换主题
changeCateGory(data,flag){
// 神策埋点 选择主题
this.themeName=data.category_name.toString()
this.$sa.track('selectCategory',{
themeID:data.category_id.toString(),
themeName:data.category_name.toString(),
courseID:this.course_id.toString(),
goodsID:this.goodsID
});
if(!flag){
this.parent_category_id = data.category_id;
......@@ -354,6 +368,9 @@
elementID:data.ele_id.toString(),
elementName:data.name.toString(),
themeID:this.parent_category_id.toString(),
themeName:this.parent_category_id.toString(),
goodsID:this.goodsID,
classID:this.classID,
courseID:this.course_id.toString()
});
})
......@@ -385,6 +402,7 @@
let index2 = null;
this.unitList.forEach((i,x)=>{
if(i.category_id ==this.parent_category_id){
this.themeName = i.category_name;
if(x>3){
index=x-3
}else{
......@@ -408,9 +426,12 @@
if(this.course_id !== res.periods_info.course_id){
this.course_id = res.periods_info.course_id;
this.course_name = res.periods_info.title;
this.goodsID=res.periods_info.goods_id;
this.classID = res.periods_info.class_id;
// 神策埋点 进入课程
this.$sa.track('EnterCourse',{
courseID:this.course_id
goodsId:res.periods_info.goods_id,
classID:res.periods_info.class_id,
});
}
this.lessonList=[];
......
......@@ -131,6 +131,11 @@
sendConsole(data){
this.$sa.track('watchClick',{
buttonName:data,
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
});
......@@ -140,6 +145,11 @@
if(this.hasCollect){
// 神策埋点 点击操作
this.$sa.track('watchClick',{
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
buttonName:'取消收藏',
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
......@@ -152,6 +162,11 @@
}else{
// 神策埋点 点击操作
this.$sa.track('watchClick',{
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
buttonName:'添加收藏',
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
......@@ -185,6 +200,11 @@
if(flag){
// 神策埋点 点击操作
this.$sa.track('watchClick',{
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
buttonName:'播放音频',
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
......@@ -194,6 +214,11 @@
},
lastOne(){
this.$sa.track('watchClick',{
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
buttonName:'上一首',
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
......@@ -229,6 +254,11 @@
if(flag){
// 神策埋点 点击操作
this.$sa.track('watchClick',{
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
buttonName:'下一首',
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
......@@ -305,6 +335,11 @@
if(flag){
// 神策埋点 点击操作
this.$sa.track('watchClick',{
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
buttonName:'暂停播放',
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
......@@ -354,6 +389,11 @@
case 1:
// 神策埋点 点击操作
this.$sa.track('watchClick',{
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
buttonName:'单曲循环',
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
......@@ -363,6 +403,11 @@
case 2:
// 神策埋点 点击操作
this.$sa.track('watchClick',{
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
buttonName:'顺序播放',
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
......@@ -372,6 +417,11 @@
case 0:
// 神策埋点 点击操作
this.$sa.track('watchClick',{
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
buttonName:'列表循环',
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
......
......@@ -66,10 +66,15 @@
methods:{
backList(){
// 神策埋点 按钮点击
this.$sa.track('learnPart',{
this.$sa.track('watchClick',{
buttonName:'返回课程列表',
partName:this.nowShow == 1 ? '爸妈看一看' : this.nowShow == 2 ? '宝贝玩一玩' : this.nowShow == 3 ? '磨磨小耳朵' : '',
elementID:this.lesson.id.toString(),
elementName:this.lesson.title,
themeID:this.lesson.themeID,
themeName:this.lesson.themeName,
goodsID:this.lesson.goodsID,
classID:this.lesson.classID
});
let json = {
page_type:0,
......@@ -103,6 +108,11 @@
this.$sa.track('learnPart',{
partName:'爸妈看一看',
elementID:this.lesson.id.toString(),
elementName:this.lesson.title,
themeID:this.lesson.themeID,
themeName:this.lesson.themeName,
goodsID:this.lesson.goodsID,
classID:this.lesson.classID,
is_view_today:!!new Date().setHours(0, 0, 0, 0) === new Date(this.lesson.push_time).setHours(0, 0, 0, 0)
});
this.page_id = 1;
......@@ -118,6 +128,11 @@
this.$sa.track('learnPart',{
partName:'宝贝玩一玩',
elementID:this.lesson.id.toString(),
elementName:this.lesson.title,
themeID:this.lesson.themeID,
themeName:this.lesson.themeName,
goodsID:this.lesson.goodsID,
classID:this.lesson.classID,
is_view_today:!!new Date().setHours(0, 0, 0, 0) === new Date(this.lesson.push_time).setHours(0, 0, 0, 0)
});
this.page_id = 2;
......@@ -141,6 +156,11 @@
this.$sa.track('learnPart',{
partName:'磨磨小耳朵',
elementID:this.lesson.id.toString(),
elementName:this.lesson.title,
themeID:this.lesson.themeID,
themeName:this.lesson.themeName,
goodsID:this.lesson.goodsID,
classID:this.lesson.classID,
is_view_today:!!new Date().setHours(0, 0, 0, 0) === new Date(this.lesson.push_time).setHours(0, 0, 0, 0)
});
this.page_id = 5;
......
......@@ -77,6 +77,11 @@
},
sendConsole(data){
this.$sa.track('watchClick',{
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
buttonName:data,
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
......@@ -85,6 +90,11 @@
changeAudio(flag){
if(flag){
this.$sa.track('watchClick',{
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
buttonName:'切换音频教学',
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
......@@ -95,6 +105,11 @@
videoPlay(){
// 神策埋点 点击操作
this.$sa.track('watchClick',{
elementName:JSON.parse(localStorage.getItem('lessonDetail')).title,
themeID:JSON.parse(localStorage.getItem('lessonDetail')).themeID,
themeName:JSON.parse(localStorage.getItem('lessonDetail')).themeName,
goodsID:JSON.parse(localStorage.getItem('lessonDetail')).goodsID,
classID:JSON.parse(localStorage.getItem('lessonDetail')).classID,
buttonName:'播放视频',
partName:this.contentData.partName,
elementID:this.$route.query.elementId.toString(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment