瀏覽代碼

埋点优化

zjs_project 1 周之前
父節點
當前提交
cc5dbfdeef
共有 3 個文件被更改,包括 27 次插入9 次删除
  1. 16 9
      src/mixins/commonPageMethod.js
  2. 10 0
      src/pages/webgl_rxdz_test/webgl_rxdz_test.vue
  3. 1 0
      src/utils/util.js

+ 16 - 9
src/mixins/commonPageMethod.js

@@ -3,10 +3,12 @@ const util = require('@/utils/util.js').default;
 export default {
 	data() {
 		return {
+            locusValue:"",
 		}
 	},
 	mounted() {
-		console.warn("---mounted---",this.pvId,this.$route.meta.keepAlive)
+        this.locusValue = this.$route.query.locusValue || "";
+        console.warn("---mounted---",this.pvId,this.$route.meta.keepAlive,this.locusValue)
 		if(this.pvId && !this.$route.meta.keepAlive){
 			window.removeEventListener('beforeunload', this.pvCloseHandle);
 			window.removeEventListener('visibilitychange', this.visibilitychange);
@@ -14,14 +16,17 @@ export default {
 			if(this.starRender && typeof(this.starRender)==='function'){
 				this.starRender()
 			}
-			let param = {
-				type: 'PV',
-				pvId: this.pvId,
-				locusBehaviorName: this.locusBehaviorName,
-				pvCurPageName: this.pvCurPageName,
-				locusValue: this.$route.query.locusValue || "",
-			};
-			util.trackRequest(param);//发送统一PV埋点
+            if(this.pvId != "p_2cmina_23080401"){
+                let param = {
+                	type: 'PV',
+                	pvId: this.pvId,
+                	locusBehaviorName: this.locusBehaviorName,
+                	pvCurPageName: this.pvCurPageName,
+                	locusValue: this.$route.query.locusValue || "",
+                };
+                util.trackRequest(param);//发送统一PV埋点
+            }
+			
 			window.addEventListener('beforeunload', this.pvCloseHandle);
 			window.addEventListener('visibilitychange', this.visibilitychange);
 		}
@@ -80,6 +85,7 @@ export default {
 				pvId: this.pvId,
 				locusBehaviorName: this.locusBehaviorName,
 				pvCurPageName: this.pvCurPageName,
+                locusValue: this.locusValue,
 			};
 			util.trackRequest(param);//发送统一PV埋点
 			window.addEventListener('beforeunload', this.pvCloseHandle);
@@ -108,6 +114,7 @@ export default {
 					pvId: this.pvId,
 					locusBehaviorName: this.locusBehaviorName,
 					pvCurPageName: this.pvCurPageName,
+                    locusValue: this.locusValue,
 				};
 				util.trackRequest(param);//发送统一PV埋点
 			}

+ 10 - 0
src/pages/webgl_rxdz_test/webgl_rxdz_test.vue

@@ -845,6 +845,16 @@
             		this.cameraStarPosition.y = 30;
             	}
             	this.cameraInit();
+                this.locusValue = (this.curHouseObj.name + this.curHouseObj.houseArea) || "";
+                let param = {
+                	type: 'PV',
+                	pvId: this.pvId,
+                	locusBehaviorName: this.locusBehaviorName,
+                	pvCurPageName: this.pvCurPageName,
+                	locusValue: this.locusValue,
+                    behaviorName:"户型定制",
+                };
+                util.trackRequest(param);//发送统一PV埋点
             },
             //户型楼层发生了变更
             curHouseFloorChange(item){

+ 1 - 0
src/utils/util.js

@@ -527,6 +527,7 @@ var util = {
 				pvPageLoadTime: para.pvPageLoadTime || '', //加载时间
 				type: para.type || '', //埋点类型
 				reserve1: urlObj.channel || '', //来源平台,抖音百度微信
+                behaviorName: para.behaviorName || '', //埋点名称
 			}
             if(para.behaviorName){
                 data.behaviorName = para.behaviorName;