Commit d8a59eb1 by 杨北旺

添加埋点字段

1 parent a8ac514f
......@@ -649,7 +649,8 @@ Page({
status: '已支付',
trade_pay_price: query.trade_pay_price || 0,
trade_name: query.trade_name || '',
trade_classification: query.trade_classification || ''
trade_classification: query.trade_classification || '',
association_classify_first_name:query.trade_classification || ''
}
const jsonList = [JSON.stringify(data)]
const res = await wx.p.api.shopmallApi.trackHttp({
......
......@@ -61,7 +61,9 @@ Page({
add_way: 104,
merchant_id: merchantId,
guest_no: wx.p.$Track.getGuestNo(), //游客ID,
user_open_id: this.shareOpenId || ''
user_open_id: this.shareOpenId || '',
association_classify_first_name:this.data?.goodsInfo?.associationClassifyFirstName || '',
trade_classification:this.data?.goodsInfo?.associationClassifyFirstName || ''
}
this.firstEnter = false
const jsonList = [JSON.stringify(data)]
......
......@@ -636,7 +636,8 @@ Page({
status: '已支付',
trade_pay_price: query.trade_pay_price || 0,
trade_name: query.trade_name || '',
trade_classification: query.trade_classification || ''
trade_classification: query.trade_classification || '',
association_classify_first_name:query.trade_classification || ''
}
const jsonList = [JSON.stringify(data)]
const res = await wx.p.api.shopmallApi.trackHttp({
......
......@@ -501,7 +501,8 @@ Page({
status: '已支付',
trade_pay_price: query.trade_pay_price || 0,
trade_name: query.trade_name || '',
trade_classification: query.trade_classification || ''
trade_classification: query.trade_classification || '',
association_classify_first_name:query.trade_classification || ''
}
const jsonList = [JSON.stringify(data)]
const res = await wx.p.api.shopmallApi.trackHttp({
......
......@@ -233,7 +233,7 @@ Page({
let { query, selectedItem, rechageNum,curIndex,listData } = self.data
// 设置埋点参数
const tracker = {
item_type: 1,
item_type: 7,
view: 3,
id: selectedItem.id
}
......@@ -364,7 +364,8 @@ Page({
status: '已支付',
trade_pay_price: this.order_total_price || 0,
trade_name: this.trade_name || '',
trade_classification: this.trade_classification || ''
trade_classification: this.trade_classification || '',
association_classify_first_name:this.trade_classification || ''
}
this.firstEnter = false
const jsonList = [JSON.stringify(data)]
......
......@@ -296,7 +296,7 @@ Page({
// 设置埋点参数
const { curentGoodsItem } = self.data
const query = {
item_type: 1,
item_type: 7,
view: 3,
id: curentGoodsItem.id
}
......@@ -457,7 +457,8 @@ Page({
status: '已支付',
trade_pay_price: this.order_total_price || 0,
trade_name: this.trade_name || '',
trade_classification: this.trade_classification || ''
trade_classification: this.trade_classification || '',
association_classify_first_name:this.trade_classification || ''
}
this.firstEnter = false
const jsonList = [JSON.stringify(data)]
......
......@@ -5,7 +5,7 @@ Page({
strategyDetailObj: {},
},
onLoad(options) {
async onLoad(options) {
console.log(options);
if (options && options.openId) {
this.shareOpenId = options.openId
......@@ -15,26 +15,27 @@ Page({
}
this.data.enter_time = new Date().format('yyyy-MM-dd hh:mm:ss')
this.firstEnter = true
this.getStrategyDetail(options.id);
// 触发埋点
this.heartbeatFn({
id: options.id,
item_type: 6,
view: 1
})
await this.getStrategyDetail(options.id);
},
getStrategyDetail(id) {
async getStrategyDetail(id) {
wx.p.api.strategyApi
.getStrategyDetail({
id,
})
.then((res) => {
Util.setNavigationBarTitle(res.strategyName);
this.categoryName = res.categoryName
this.setData({
strategyDetailObj: res,
}, () => {
// 触发埋点
this.heartbeatFn({
id,
item_type: 6,
view: 1
})
this.handlerShareQuery()
});
});
......@@ -69,7 +70,9 @@ Page({
merchant_id: merchantId,
guest_no: wx.p.$Track.getGuestNo(), //游客ID,
user_open_id: this.shareOpenId || "",
share_guest_no: this.share_guest_no || ''
share_guest_no: this.share_guest_no || '',
trade_classification: this.categoryName || '',
association_classify_first_name:this.categoryName || '',
};
this.firstEnter = false;
const jsonList = [JSON.stringify(data)];
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!