Commit 25ac54b0 authored by 俞嘉婷's avatar 俞嘉婷

神策埋点

parent 4d902953
This diff is collapsed.
......@@ -32,7 +32,7 @@
return search.length ? matched && matched[2] : null;
}
CFG.operationId = '6130'
CFG.operationId = '6131'
CFG.appID = "${APPID}";
CFG.domain = location.origin;
......
......@@ -16,10 +16,10 @@ class CodePop extends React.Component {
componentDidMount = async () => {
await this.creatCode();
pageView("b12119", {
pageView("b12854", {
page_name: "扫码唤端页",
});
sensorLog(LOG_KEY.exposure, "b12119", "d12120", {
sensorLog(LOG_KEY.exposure, "b12854", "d12855", {
page_name: "扫码唤端页",
button_name: "关闭按钮",
});
......@@ -40,7 +40,7 @@ class CodePop extends React.Component {
/** 关闭 */
clickClose = () => {
modalStore.closePop();
sensorLog(LOG_KEY.click, "b12119", "d12120", {
sensorLog(LOG_KEY.click, "b12854", "d12855", {
page_name: "扫码唤端页",
button_name: "关闭按钮",
});
......
......@@ -21,14 +21,14 @@ class LoginPop extends React.Component {
};
componentDidMount() {
pageView("b12081", {
pageView("b12830", {
page_name: "手机号登录页",
});
sensorLog(LOG_KEY.exposure, "b12081", "d12083", {
sensorLog(LOG_KEY.exposure, "b12830", "d12832", {
page_name: "手机号登录页",
button_name: "登录按钮",
});
sensorLog(LOG_KEY.exposure, "b12081", "d12082", {
sensorLog(LOG_KEY.exposure, "b12830", "d12831", {
page_name: "手机号登录页",
button_name: "发送验证码按钮",
});
......@@ -53,7 +53,7 @@ class LoginPop extends React.Component {
};
clickSend = _asyncThrottle(async () => {
sensorLog(LOG_KEY.click, "b12081", "d12082", {
sensorLog(LOG_KEY.click, "b12830", "d12831", {
page_name: "手机号登录页",
button_name: "发送验证码按钮",
});
......@@ -69,7 +69,7 @@ class LoginPop extends React.Component {
});
closeLogin = _asyncThrottle(async () => {
sensorLog(LOG_KEY.click, "b12081", "d12083", {
sensorLog(LOG_KEY.click, "b12830", "d12832", {
page_name: "手机号登录页",
button_name: "登录按钮",
});
......
......@@ -18,10 +18,10 @@ class NoPrizeCard extends React.Component {
componentDidMount() {
pageView("b12137", {
pageView("b12872", {
page_name: "祝福语翻转页",
});
sensorLog(LOG_KEY.exposure, "b12137", "d12138", {
sensorLog(LOG_KEY.exposure, "b12872", "d12873", {
page_name: "祝福语翻转页",
button_name: "点击切换有惊喜按钮",
});
......@@ -41,7 +41,7 @@ class NoPrizeCard extends React.Component {
/** 切换按钮*/
clickExchange1 = () => {
sensorLog(LOG_KEY.click, "b12137", "d12138", {
sensorLog(LOG_KEY.click, "b12872", "d12873", {
page_name: "祝福语翻转页",
button_name: "点击切换有惊喜按钮",
});
......
......@@ -16,14 +16,14 @@ class Pop_winprize extends React.Component {
}
componentDidMount() {
pageView("b12121", {
pageView("b12856", {
page_name: "中奖弹窗",
});
sensorLog(LOG_KEY.exposure, "b12121", "d12123", {
sensorLog(LOG_KEY.exposure, "b12856", "d12858", {
page_name: "中奖弹窗",
button_name: "关闭按钮",
});
sensorLog(LOG_KEY.exposure, "b12121", "d12122", {
sensorLog(LOG_KEY.exposure, "b12856", "d12857", {
page_name: "中奖弹窗",
button_name: "开心收下按钮",
});
......@@ -31,14 +31,14 @@ class Pop_winprize extends React.Component {
clickClose = () => {
modalStore.closePop();
sensorLog(LOG_KEY.click, "b12121", "d12123", {
sensorLog(LOG_KEY.click, "b12856", "d12858", {
page_name: "中奖弹窗",
button_name: "关闭按钮",
});
};
clickHappy = () => {
modalStore.closePop();
sensorLog(LOG_KEY.click, "b12121", "d12122", {
sensorLog(LOG_KEY.click, "b12856", "d12857", {
page_name: "中奖弹窗",
button_name: "开心收下按钮",
});
......
......@@ -30,13 +30,13 @@ class Taskpop extends React.Component {
await taskStore.getTaskList();
taskStore.taskList?.map((item, index) => {
if(item?.taskStatus == 1) {
sensorLog(LOG_KEY.exposure, "b12104", "d12106", {
sensorLog(LOG_KEY.exposure, "b12846", "d12848", {
page_name: "赚点赞次数弹窗",
button_name: "领取奖励按钮",
});
}
if(item?.taskStatus == 0) {
sensorLog(LOG_KEY.exposure, "b12104", "d12105", {
sensorLog(LOG_KEY.exposure, "b12846", "d12847", {
page_name: "赚点赞次数弹窗",
button_name: "去完成按钮",
});
......@@ -51,14 +51,14 @@ class Taskpop extends React.Component {
initSensor() {
pageView("b12104", {
pageView("b12846", {
page_name: "赚点赞次数弹窗",
});
// sensorLog(LOG_KEY.exposure,"b7870","d8729");
sensorLog(LOG_KEY.exposure, "b12104", "d12107", {
sensorLog(LOG_KEY.exposure, "b12846", "d12849", {
page_name: "赚点赞次数弹窗",
button_name: "返回按钮",
button_name: "关闭按钮",
});
......@@ -83,7 +83,7 @@ class Taskpop extends React.Component {
// MatterShareOpt(LOG_KEY.click,"b7870","d8729")
// }
handleLogClick(23, 1);
sensorLog(LOG_KEY.click, "b12104", "d12105", {
sensorLog(LOG_KEY.click, "b12846", "d12847", {
page_name: "赚点赞次数弹窗",
button_name: "去完成按钮",
});
......@@ -91,7 +91,7 @@ class Taskpop extends React.Component {
taskStore.taskList?.map((item, index) => {
if(item?.taskStatus == 1) {
sensorLog(LOG_KEY.exposure, "b12104", "d12106", {
sensorLog(LOG_KEY.exposure, "b12846", "d12848", {
page_name: "赚点赞次数弹窗",
button_name: "领取奖励按钮",
});
......@@ -103,7 +103,7 @@ class Taskpop extends React.Component {
taskPrizeHandle = _asyncThrottle(async (item) => {
const { code, taskStatus } = item || {};
handleLogClick(23, 2);
sensorLog(LOG_KEY.click, "b12104", "d12106", {
sensorLog(LOG_KEY.click, "b12846", "d12848", {
page_name: "赚点赞次数弹窗",
button_name: "领取奖励按钮",
});
......@@ -116,9 +116,9 @@ class Taskpop extends React.Component {
// page_name: "做任务赚骰子页",
// button_name: "关闭按钮",
// });
sensorLog(LOG_KEY.click, "b12104", "d12107", {
sensorLog(LOG_KEY.click, "b12846", "d12849", {
page_name: "赚点赞次数弹窗",
button_name: "返回按钮",
button_name: "关闭按钮",
});
this.props.popData?.onClose && this.props.popData.onClose();
......
......@@ -28,13 +28,21 @@ class Drawpage extends React.Component {
componentDidMount() {
this.getDrawInfo()
pageView("b12117", {
pageView("b12842", {
page_name: "抽奖大转盘",
});
sensorLog(LOG_KEY.exposure, "b12117", "d12118", {
sensorLog(LOG_KEY.exposure, "b12842", "d12843", {
page_name: "抽奖大转盘",
button_name: "立即抽奖按钮",
});
sensorLog(LOG_KEY.exposure, "b12842", "d12844", {
page_name: "抽奖大转盘",
button_name: "做任务,赚次数按钮",
});
sensorLog(LOG_KEY.exposure, "b12842", "d12845", {
page_name: "抽奖大转盘",
button_name: "返回按钮",
});
}
/** 获取转盘信息 */
......@@ -49,7 +57,7 @@ class Drawpage extends React.Component {
// 开始抽奖
lottteryHandle = _asyncThrottle(async () => {
sensorLog(LOG_KEY.click, "b12117", "d12118", {
sensorLog(LOG_KEY.click, "b12842", "d12843", {
page_name: "抽奖大转盘",
button_name: "立即抽奖按钮",
});
......@@ -103,11 +111,20 @@ class Drawpage extends React.Component {
/** 返回 */
backHome = _throttle(() => {
sensorLog(LOG_KEY.click, "b12842", "d12845", {
page_name: "抽奖大转盘",
button_name: "返回按钮",
});
if (this.btnStarting) return false
store.changePage(PAGE_MAP.HOME_PAGE)
})
goTask = _throttle(() => {
sensorLog(LOG_KEY.click, "b12842", "d12844", {
page_name: "抽奖大转盘",
button_name: "做任务,赚次数按钮",
});
if (this.btnStarting) return false
modalStore.pushPop("Taskpop", { onClose: () => this.getDrawInfo() })
})
......
......@@ -35,9 +35,9 @@ class Prizepage extends React.Component {
// modalStore.pushPop("FillAddress")
await this.getPrize();
pageView("b12124", { page_name: "我的奖品页" });
pageView("b12859", { page_name: "我的奖品页" });
sensorLog(LOG_KEY.exposure, "b12124", "d12126", { page_name: "我的奖品页", button_name: "返回" })
sensorLog(LOG_KEY.exposure, "b12859", "d12861", { page_name: "我的奖品页", button_name: "返回" })
}
fetchData = async () => {
......@@ -105,7 +105,7 @@ class Prizepage extends React.Component {
PrizeList.forEach((item) => {
if (!item?.invalid) {
sensorLog(LOG_KEY.exposure, "b12124", "d12125", {
sensorLog(LOG_KEY.exposure, "b12859", "d12860", {
button_name: "去领取",
page_name: "我的奖品页",
entrance: extranceName[CFG.channel],
......@@ -124,7 +124,7 @@ class Prizepage extends React.Component {
return;
}
sensorLog(LOG_KEY.click, "b12124", "d12125", {
sensorLog(LOG_KEY.click, "b12859", "d12860", {
button_name: "去领取",
page_name: "我的奖品页",
operation_name: "去领取",
......@@ -224,7 +224,7 @@ class Prizepage extends React.Component {
back = _throttle(async () => {
// store.changePage(this.props?.from || PAGE_MAP.HOME_PAGE);
store.backPage();
sensorLog(LOG_KEY.click, "b12124", "d12126", {
sensorLog(LOG_KEY.click, "b12859", "d12861", {
operation_name: "返回",
button_name: "返回",
operation_id: CFG.operationId,
......
......@@ -94,16 +94,16 @@ export const initSensors = (uid) => {
{
currentUrl: location.href,
referrer: document.referrer,
theme_name: "闪亮瞬间",
act_name: "闪亮瞬间",
avtivity_name: "闪亮瞬间",
theme_name: "人保春游记",
act_name: "人保春游记",
avtivity_name: "人保春游记",
source_entry: CHANNEL_MAP[CFG.channel],
source: CHANNEL_MAP[CFG.channel],
platform_name: extranceName[CFG.channel],
platform_type: platformType[CFG.channel],
requirement_id: 1029,
requirement_id: 1187,
is_login: uid ? "是" : "否",
operation_name: "闪亮瞬间",
operation_name: "人保春游记",
source_platform: CHANNEL_MAP?.[CFG.channel] || CFG.channel,
entrance: extranceName[CFG.channel],
},
......@@ -128,7 +128,7 @@ export const sensorLog = (logKey, bid, did, options) => {
// console.log(`%c type: ${logKey} track_sign: ${`aL06Activity.${bid}.${did}.${logKey}.${EVENT_NAME[logKey]}`}`, "font-size: 20px; color: rgb(244, 123, 93)");
sensors.track(EVENT_NAME[logKey], {
track_sign: `aL06Activity.${bid}.${did}.${logKey}.${EVENT_NAME[logKey]}`,
avtivity_name: "闪亮瞬间",
avtivity_name: "人保春游记",
operation_id: CFG.operationId,
act_type: "客经",
location_type: "活动",
......@@ -148,7 +148,7 @@ export const pageViewD = (bid, did, options) => {
sensors.track(EVENT_NAME[LOG_KEY.pageview], {
track_sign: `aL06Activity.${bid}.${did}.${LOG_KEY.pageview}.${EVENT_NAME[LOG_KEY.pageview]}`,
operation_id: CFG.operationId,
avtivity_name: "闪亮瞬间",
avtivity_name: "人保春游记",
act_type: "客经",
location_type: "活动",
agent_code: store.setIndex?.agentCode,
......@@ -172,7 +172,7 @@ export const pageView = (bid, options) => {
sensors.track(EVENT_NAME[LOG_KEY.pageview], {
track_sign: `aL06Activity.${bid}.${LOG_KEY.pageview}.${EVENT_NAME[LOG_KEY.pageview]}`,
operation_id: CFG.operationId,
avtivity_name: "闪亮瞬间",
avtivity_name: "人保春游记",
act_type: "客经",
location_type: "活动",
agent_code: store.setIndex?.agentCode,
......@@ -196,7 +196,7 @@ export const MatterViewOpt = (bid, options) => {
location_type: "活动",
entrance: extranceName[CFG.channel],
sales_id: CFG.workerCode || store.setIndex?.agentCode, // todo
avtivity_name: "闪亮瞬间",
avtivity_name: "人保春游记",
...options
});
......@@ -217,7 +217,7 @@ export const MatterShareOpt = (bid, did, options) => {
location_type: "活动",
entrance: extranceName[CFG.channel],
sales_id: CFG.workerCode || store.setIndex?.agentCode, // todo
avtivity_name: "闪亮瞬间",
avtivity_name: "人保春游记",
...options
});
......@@ -238,7 +238,7 @@ export const MatterViewDuration = (bid, time, options) => {
location_type: "活动",
entrance: extranceName[CFG.channel],
sales_id: CFG.workerCode || store.setIndex?.agentCode, // todo
avtivity_name: "闪亮瞬间",
avtivity_name: "人保春游记",
$event_duration: time,
...options
});
......
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