浏览代码

commit -m 友盟数据统计埋点

zhengjinyi 4 年之前
父节点
当前提交
9ebc541868

+ 25 - 1
components/cm-module/homeIndex/pageSpecial.vue

@@ -95,12 +95,28 @@
 				this.tempData = data
 			},
 			NavArticlePath(LINK){
-				 this.$api.navigateTo(`/h5/pages/article/path?link=${LINK}`)
+				// 友盟埋点首页文章模块点击
+				if(process.env.NODE_ENV != 'development'){
+					this.$uma.trackEvent('Um_Event_HomeArticleTemplateClick', {
+						Um_Key_ArticleLink: `${LINK}`,
+						Um_Key_PageName: '首页文章模块',
+						Um_Key_SourcePage: '商城首页',
+					})
+				}
+				this.$api.navigateTo(`/h5/pages/article/path?link=${LINK}`)
 			},
 			NewActivityList(){
 				this.$api.navigateTo('/h5/pages/activity/activity-list')
 			},
 			NewActivityListPath(pros){
+				// 友盟埋点首页活动模块点击
+				if(process.env.NODE_ENV != 'development'){
+					this.$uma.trackEvent('Um_Event_HomeActivityTemplateClick', {
+						Um_Key_ActivityName: `${pros.title}`,
+						Um_Key_PageName: '首页活动模块',
+						Um_Key_SourcePage: '商城首页',
+					})
+				}
 				/**
 				 * 页面跳转类型
 				 * 1、二级页面,2、搜索项目仪器,3、直播页面,4、自由页面,5、商品详情,6、仪器项目详情,7、供应商主页
@@ -150,6 +166,14 @@
 				// })
 			},
 			LiveGoPathPros(live){
+				// 友盟埋点首页直播模块点击
+				if(process.env.NODE_ENV != 'development'){
+					this.$uma.trackEvent('Um_Event_HomeLiveTemplateClick', {
+						Um_Key_LiveName: `${live.liveTitle}`,
+						Um_Key_PageName: '首页直播模块',
+						Um_Key_SourcePage: '商城首页',
+					})
+				}
 				this.$api.navigateTo(`/h5/pages/article/page-image?title=${live.liveTitle}&image=${live.advertisingImage}`)
 			}
 		}

+ 8 - 0
components/cm-module/productDetails/secondPrice.vue

@@ -57,6 +57,14 @@
 		},
 		methods:{
 			loginClick(){
+				// 友盟埋点二手商品详情登录查看价格
+				if(process.env.NODE_ENV != 'development'){
+					this.$uma.trackEvent('Um_Event_SecondListLoginSubmit', {
+						Um_Key_ProductId: `${this.product.productId}`,
+						Um_Key_PageName: '二手详情登录查看价格',
+						Um_Key_SourcePage: '二手商品详情',
+					})
+				}
 				this.$api.navigateTo('/pages/login/login')
 			},
 		},

+ 8 - 0
search/pages/search/search-instrument.vue

@@ -82,6 +82,14 @@
 			searchsupplierList(){//搜索
 				this.listQuery.pageNum=1
 				this.GetSearchEquipmentList()
+				// 友盟埋点项目仪器搜索点击
+				if(process.env.NODE_ENV != 'development'){
+					this.$uma.trackEvent('Um_Event_SearchInstrumentButton', {
+						Um_Key_Keyword: `${this.listQuery.keyword}`,
+						Um_Key_PageName: '项目仪器',
+						Um_Key_SourcePage: '搜索项目仪器',
+					})
+				}
 			},
 			GetSearchEquipmentList(){//查询供应商列表	
 				this.ProductService.GetSearchEquipmentList(this.listQuery).then(response =>{

+ 8 - 0
search/pages/search/search-second.vue

@@ -111,6 +111,14 @@
 					this.$util.msg('请输入商品关键字',2000);
 				}else{
 					this.getListFromServer()
+					// 友盟埋点二手商品搜索点击
+					if(process.env.NODE_ENV != 'development'){
+						this.$uma.trackEvent('Um_Event_SearchSecondProductButtonClick', {
+							Um_Key_Keyword: `${this.listQuery.keyword}`,
+							Um_Key_PageName: '二手商品',
+							Um_Key_SourcePage: '搜索二手商品',
+						})
+					}
 				}
 			},
 			getListFromServer(loadMore) {

+ 8 - 0
search/pages/search/search-supplier.vue

@@ -122,6 +122,14 @@
 			searchsupplierList(){//搜索
 				this.listQuery.pageNum=1
 				this.GetSearchSupplierList()
+				// 友盟埋点供应商搜索点击
+				if(process.env.NODE_ENV != 'development'){
+					this.$uma.trackEvent('Um_Event_SearchSupplierButton', {
+						Um_Key_Keyword: `${this.listQuery.keyword}`,
+						Um_Key_PageName: '供应商',
+						Um_Key_SourcePage: '搜索供应商',
+					})
+				}
 			},
 			GetSearchSupplierList(){//查询供应商列表	
 				this.ShopService.GetSearchSupplierList(this.listQuery).then(response =>{

+ 8 - 0
search/pages/search/search.vue

@@ -266,6 +266,14 @@
 							this.setSearchHistoryAdd()
 							this.getListFromServer()
 							this.isFocus = false
+							// 友盟埋点商品搜索点击
+							if(process.env.NODE_ENV != 'development'){
+								this.$uma.trackEvent('Um_Event_SearchProductSubmit', {
+									Um_Key_Keyword: `${this.listQuery.keyword}`,
+									Um_Key_PageName: '商品',
+									Um_Key_SourcePage: '搜索商品',
+								})
+							}
 							break;
 						case 2:
 							this.setSearchHistoryAdd()

+ 23 - 2
second/pages/product/product-list.vue

@@ -44,7 +44,7 @@
 		                    </view>
 		                    <view class="targetprice" >
 		                        <text v-if="item.detailTalkFlag ==2 && hasLogin==false">¥详聊</text>
-		                        <text v-else-if="!hasLogin" class="priceparam" @click.stop="this.$api.navigateTo('/pages/login/login')">登录查看价格></text>
+		                        <text v-else-if="!hasLogin" class="priceparam" @click.stop="NavigatorLogin(item)">登录查看价格></text>
 		                        <text v-else-if="hasLogin && item.detailTalkFlag==2">¥详聊</text>
 		                        <text v-else>¥{{ item.price | NumFormat}}</text>
 		                    </view>
@@ -80,7 +80,7 @@
 				</view>
 				<view class="fabu" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }" v-else>
 					 <text  class="intro"  @click.stop="navigator('/second/pages/form/introduce')" >二手市场介绍</text>
-					 <text  class="release" @click.stop="navigator('/second/pages/form/form')" >我要发布</text>
+					 <text  class="release" @click.stop="NavigatorRelease" >我要发布</text>
 				</view>
 				<!-- 透明模态层 -->
 				<modal-layer v-if='isModallayer'></modal-layer>
@@ -250,6 +250,27 @@
 					this.requestFlag = true;
 				})
 			},	
+			NavigatorLogin(pros){// 登录查看价格
+				// 友盟埋点二手市场列表登录查看价格点击事件
+				if(process.env.NODE_ENV != 'development'){
+					this.$uma.trackEvent('Um_Event_SecondListLoginSubmit', {
+						Um_Key_ProductId: `${pros.productId}`,
+						Um_Key_PageName: '二手市场登录查看价格',
+						Um_Key_SourcePage: '二手市场列表',
+					})
+				}
+				this.$api.navigateTo('/pages/login/login')
+			},
+			NavigatorRelease(){// 我要发布
+				// 友盟埋点二手市场列表我要发布点击事件
+				if(process.env.NODE_ENV != 'development'){
+					this.$uma.trackEvent('Um_Event_SecondReleaseSubmit', {
+						Um_Key_PageName: '我要发布',
+						Um_Key_SourcePage: '二手市场列表',
+					})
+				}
+				this.$api.navigateTo('/second/pages/form/form')
+			}
 		},
 		onShareAppMessage(res){//分享转发
 			if (res.from === 'button') {