Commit dff7d897 authored by cc's avatar cc

update

parent 07fdff1c
...@@ -50,7 +50,19 @@ ...@@ -50,7 +50,19 @@
} }
// 免登中间页 // 免登中间页
CFG.loginMidUrl = "/customShare/share?id=" + CFG.loginMidId + "&source=duiba&projectId=" + CFG.projectId + "&redirectUrl="; CFG.loginMidUrl = "/customShare/share?id=" + CFG.loginMidId + "&source=duiba&projectId=" + CFG.projectId + "&redirectUrl=";
CFG.domain = location.origin; CFG.domain = location.origin;
// 首页
CFG.indexUrl = "/projectx/" + CFG.projectId + "/index.html?appID=" + getUrlParam("appID");
// 普通分享落地页
CFG.shareUrl = "/projectx/" + CFG.projectId + "/sharepage.html?appID=" + getUrlParam("appID");
// CFG.shareUrl = '/projectx/' + CFG.projectId + '/share.html?appKey=4AoRyTuR6XNfjNa4w5exe1bPmqDS&openBs=openbs&appID=' + CFG.appID;
// 普通分享落地页
CFG.fireShareUrl = "/projectx/" + CFG.projectId + "/firesharepage.html?appID=" + getUrlParam("appID");
// 我的奖品页
CFG.prizeUrl = "/projectx/" + CFG.projectId + "/prize.html?appID=" + getUrlParam("appID");
//actPlatforms //actPlatforms
CFG.actPlatforms = getUrlParam("actPlatforms") || ""; CFG.actPlatforms = getUrlParam("actPlatforms") || "";
//actPlatforms //actPlatforms
...@@ -71,12 +83,17 @@ ...@@ -71,12 +83,17 @@
CFG.inviteCode = getUrlParam("inviteCode"); CFG.inviteCode = getUrlParam("inviteCode");
// 微信授权链接 // 微信授权链接
CFG.indexLogin = "/wechat/access?apk=4AoRyTuR6XNfjNa4w5exe1bPmqDS&dbredirect="; CFG.indexLogin = "/wechat/access?apk=4AoRyTuR6XNfjNa4w5exe1bPmqDS&dbredirect=";
// 普通分享落地页 CFG.sensorUrl = "https://mdglfxpt.piccgroup.cn:18443/sa?project=picclife_consumer";
CFG.shareUrl = "/projectx/" + CFG.projectId + "/sharepage.html?appID=" + getUrlParam("appID"); // 环境,test测试,prod生产 TIAN_TODO
// CFG.shareUrl = '/projectx/' + CFG.projectId + '/share.html?appKey=4AoRyTuR6XNfjNa4w5exe1bPmqDS&openBs=openbs&appID=' + CFG.appID; CFG.env = "prod"; //注意sdk 也分环境!
// 普通分享落地页 if (CFG.env == "test") {
CFG.fireShareUrl = "/projectx/" + CFG.projectId + "/firesharepage.html?appID=" + getUrlParam("appID"); // 测试
// eslint-disable-next-line @spark/best-practices/no-url-in-js
CFG.sensorUrl = "https://mdglfxpt-test.piccgroup.cn:18443/sa?project=picclife_consumer";
CFG.toAppPrizeUrl =
"https://lifeapp-test.picclife.cn/portal-web/app_manager/downloadapps.html?operate_link=https%3A%2F%2Flifeapp-api-test.picclife.cn%2Flifeapi%2Flifeapp-svc-rel-gw%2Fapi%2Fauth_code%2Fauthorize%2Fv1%3Factivity_code%3D612102%26redirect_type%3D0%26redirect_uri%3Dhttps%253A%252F%252F96094.activity-19.m.duiba.com.cn%252FcustomShare%252Fshare%253Fid%253DDid1NTgxNTE&isBindManager=1&isNeedAuth=1";
}
if (!getUrlParam("appID")) { if (!getUrlParam("appID")) {
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。") // alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
} }
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
"qs": "^6.14.0", "qs": "^6.14.0",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"sa-sdk-javascript": "^1.27.4",
"spark-utils": "^1.1.2", "spark-utils": "^1.1.2",
"swiper": "8.4.5", "swiper": "8.4.5",
"tailwindcss": "^4.1.4" "tailwindcss": "^4.1.4"
......
...@@ -116,6 +116,9 @@ importers: ...@@ -116,6 +116,9 @@ importers:
react-dom: react-dom:
specifier: ^18.3.1 specifier: ^18.3.1
version: 18.3.1(react@18.3.1) version: 18.3.1(react@18.3.1)
sa-sdk-javascript:
specifier: ^1.27.4
version: 1.27.4
spark-utils: spark-utils:
specifier: ^1.1.2 specifier: ^1.1.2
version: 1.1.10 version: 1.1.10
...@@ -4173,6 +4176,9 @@ packages: ...@@ -4173,6 +4176,9 @@ packages:
run-parallel@1.2.0: run-parallel@1.2.0:
resolution: {integrity: sha1-ZtE2jae9+SHrnZW9GpIp5/IaQ+4=} resolution: {integrity: sha1-ZtE2jae9+SHrnZW9GpIp5/IaQ+4=}
sa-sdk-javascript@1.27.4:
resolution: {integrity: sha512-w0Kv237KHDjH1amgchECzzC9c1aruC0LMgqgYC/ISTfijRroJAEQrVPDvHJqJpD8uD1+spN7q6hgfT3x+EncmQ==, tarball: http://npm.dui88.com:80/sa-sdk-javascript/-/sa-sdk-javascript-1.27.4.tgz}
safe-buffer@5.1.2: safe-buffer@5.1.2:
resolution: {integrity: sha1-mR7GnSluAxN0fVm9/St0XDX4go0=} resolution: {integrity: sha1-mR7GnSluAxN0fVm9/St0XDX4go0=}
...@@ -4454,7 +4460,7 @@ packages: ...@@ -4454,7 +4460,7 @@ packages:
typescript: '>=4.8.4' typescript: '>=4.8.4'
tslib@2.8.1: tslib@2.8.1:
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==, tarball: http://npm.dui88.com:80/tslib/-/tslib-2.8.1.tgz}
tweedle.js@2.1.0: tweedle.js@2.1.0:
resolution: {integrity: sha512-0ReQgVjepoZkE6t0upWNgCRbplHkQJQYk1LStXugwSR728GLFmGDRuaQJlxeC/iBlxud6+P1RdODjaO25vHAqw==} resolution: {integrity: sha512-0ReQgVjepoZkE6t0upWNgCRbplHkQJQYk1LStXugwSR728GLFmGDRuaQJlxeC/iBlxud6+P1RdODjaO25vHAqw==}
...@@ -8911,6 +8917,8 @@ snapshots: ...@@ -8911,6 +8917,8 @@ snapshots:
dependencies: dependencies:
queue-microtask: 1.2.3 queue-microtask: 1.2.3
sa-sdk-javascript@1.27.4: {}
safe-buffer@5.1.2: {} safe-buffer@5.1.2: {}
safe-regex-test@1.1.0: safe-regex-test@1.1.0:
......
...@@ -24,7 +24,10 @@ interface IRes { ...@@ -24,7 +24,10 @@ interface IRes {
const mergeData = { const mergeData = {
user_type: newUser ? '0' : '1', user_type: newUser ? '0' : '1',
is_from_share: isFromShare ? '0' : '1', is_from_share: isFromShare ? '0' : '1',
from: getUrlParam("channel"), from: getUrlParam("channel") || '2',
actPlatforms:CFG.actPlatforms || "",
agentCode:CFG.agentCode || "",
actId:CFG.actId || "",
} }
// let tempCookieId = ""; // let tempCookieId = "";
......
...@@ -14,7 +14,8 @@ import Taskpop from '@/panels/taskpop/taskpop.jsx'; ...@@ -14,7 +14,8 @@ import Taskpop from '@/panels/taskpop/taskpop.jsx';
import RankPage from '../RankPage/RankPage.js'; import RankPage from '../RankPage/RankPage.js';
import MyPrize from '../MyPrize/MyPrize.js'; import MyPrize from '../MyPrize/MyPrize.js';
import shareStore from '@/store/share.js'; import shareStore from '@/store/share.js';
import { LOG_KEY, MatterShareOpt, MatterViewDuration, MatterViewOpt, pageView, sensorLog } from "@/utils/sensors.js";
import { CHANNEL_PARAMS } from '@/utils/constants.js';
@observer @observer
class Homepage extends React.Component { class Homepage extends React.Component {
...@@ -27,6 +28,7 @@ class Homepage extends React.Component { ...@@ -27,6 +28,7 @@ class Homepage extends React.Component {
async componentDidMount() { async componentDidMount() {
await store.updateIndex() await store.updateIndex()
await shareStore.doAssist(); await shareStore.doAssist();
this.initSensor();
} }
handleButtonClick = _asyncThrottle(async (number) => { handleButtonClick = _asyncThrottle(async (number) => {
...@@ -87,7 +89,59 @@ class Homepage extends React.Component { ...@@ -87,7 +89,59 @@ class Homepage extends React.Component {
console.warn("未知按钮类型", number); console.warn("未知按钮类型", number);
} }
}) })
initSensor = () => {
if (CFG.channel == CHANNEL_PARAMS.YK_MINI) {
sensorLog(LOG_KEY.exposure, "b13489", "d13491", {
page_name: "友客首页",
button_name: "分享活动按钮",
});
}
if (CFG.channel == CHANNEL_PARAMS.YK_MINI || CFG.channel == CHANNEL_PARAMS.YK_PUBLIC) {
MatterViewOpt("b13489", {
page_name: "友客首页",
})
if (store?.indexData?.isAgent) {
sensorLog(LOG_KEY.exposure, "b13489", "d13490", {
page_name: "友客首页",
button_name: "拜访清单按钮",
});
}
}
// pageView("b7350", {
// page_name: "开宝箱页"
// });
//
// sensorLog(LOG_KEY.exposure, "b7350", "d7351", {
// page_name: "开宝箱页",
// button_name: "开宝箱按钮",
// });
pageView("b13480", {
page_name: "活动首页"
});
sensorLog(LOG_KEY.exposure, "b13480", "d13484", {
page_name: "活动首页",
button_name: "开宝箱按钮",
});
sensorLog(LOG_KEY.exposure, "b13480", "d13485", {
page_name: "活动首页",
button_name: "掷骰子按钮",
});
sensorLog(LOG_KEY.exposure, "b13480", "d13483", {
page_name: "活动首页",
button_name: "背包按钮",
});
sensorLog(LOG_KEY.exposure, "b13480", "d13482", {
page_name: "活动首页",
button_name: "奖品按钮",
});
sensorLog(LOG_KEY.exposure, "b13480", "d13481", {
page_name: "活动首页",
button_name: "规则按钮",
});
};
render() { render() {
return ( return (
<div className="homepage modal_center"> <div className="homepage modal_center">
......
...@@ -211,8 +211,9 @@ const shareStore = makeAutoObservable({ ...@@ -211,8 +211,9 @@ const shareStore = makeAutoObservable({
goAppPrize() { goAppPrize() {
// windowJumpUrl(CFG.toAppPrizeUrl); // windowJumpUrl(CFG.toAppPrizeUrl);
//CFG.projectId三元判断为真,前面的是正式,需要修改的地方为中间页链接,可咨询东哥链接(奖品页唤端) ios需要多encode一次 //CFG.projectId三元判断为真,前面的是正式,需要修改的地方为中间页链接,可咨询东哥链接(奖品页唤端) ios需要多encode一次
const testCustomId = "Did1NTkyODc"; const testCustomId = "Did1NjEwNzk"; //奖品-测试中间页
const prodCustomId = "Did1NTk0MzE"; const prodCustomId = "Did1NjExMjc"; //奖品-正式中间页
//pafc25ff1 为正式项目 需替换为正式项目ID
windowJumpUrl( windowJumpUrl(
CFG.projectId == "pafc25ff1" CFG.projectId == "pafc25ff1"
? "https://lifeapp.picclife.cn/portal/app_manager/downloadapps.html?operate_link=" + ? "https://lifeapp.picclife.cn/portal/app_manager/downloadapps.html?operate_link=" +
...@@ -220,13 +221,13 @@ const shareStore = makeAutoObservable({ ...@@ -220,13 +221,13 @@ const shareStore = makeAutoObservable({
`https://lifeapp-api.picclife.cn/lifeapi/lifeapp-svc-gw/api/auth_code/authorize/v1?activity_code=612702&redirect_type=0&redirect_uri=${isIos() `https://lifeapp-api.picclife.cn/lifeapi/lifeapp-svc-gw/api/auth_code/authorize/v1?activity_code=612702&redirect_type=0&redirect_uri=${isIos()
? encodeURIComponent( ? encodeURIComponent(
encodeURIComponent( encodeURIComponent(
`https://96094.activity-19.m.duiba.com.cn/customShare/share?id=${prodCustomId}` + `https://96094-activity.dexfu.cn/customShare/share?id=${prodCustomId}` +
`&channel=${CFG.defaultChannel}&agentCode=${CFG.workerCode || CFG.agentCode}&actPlatforms=${CFG.actPlatforms `&channel=${CFG.defaultChannel}&agentCode=${CFG.workerCode || CFG.agentCode}&actPlatforms=${CFG.actPlatforms
}&actId=${CFG.actId}` }&actId=${CFG.actId}`
) )
) )
: encodeURIComponent( : encodeURIComponent(
`https://96094.activity-19.m.duiba.com.cn/customShare/share?id=${prodCustomId}` + `https://96094-activity.dexfu.cn/customShare/share?id=${prodCustomId}` +
`&channel=${CFG.defaultChannel}&agentCode=${CFG.workerCode || CFG.agentCode}&actPlatforms=${CFG.actPlatforms `&channel=${CFG.defaultChannel}&agentCode=${CFG.workerCode || CFG.agentCode}&actPlatforms=${CFG.actPlatforms
}&actId=${CFG.actId}` }&actId=${CFG.actId}`
) )
...@@ -238,13 +239,13 @@ const shareStore = makeAutoObservable({ ...@@ -238,13 +239,13 @@ const shareStore = makeAutoObservable({
`https://lifeapp-api-test.picclife.cn/lifeapi/lifeapp-svc-rel-gw/api/auth_code/authorize/v1?activity_code=612702&redirect_type=0&redirect_uri=${isIos() `https://lifeapp-api-test.picclife.cn/lifeapi/lifeapp-svc-rel-gw/api/auth_code/authorize/v1?activity_code=612702&redirect_type=0&redirect_uri=${isIos()
? encodeURIComponent( ? encodeURIComponent(
encodeURIComponent( encodeURIComponent(
`https://96094.activity-19.m.duiba.com.cn/customShare/share?id=${testCustomId}` + `https://96094-activity.dexfu.cn/customShare/share?id=${testCustomId}` +
`&channel=${CFG.defaultChannel}&agentCode=${CFG.workerCode || CFG.agentCode}&actPlatforms=${CFG.actPlatforms `&channel=${CFG.defaultChannel}&agentCode=${CFG.workerCode || CFG.agentCode}&actPlatforms=${CFG.actPlatforms
}&actId=${CFG.actId}` }&actId=${CFG.actId}`
) )
) )
: encodeURIComponent( : encodeURIComponent(
`https://96094.activity-19.m.duiba.com.cn/customShare/share?id=${testCustomId}` + `https://96094-activity.dexfu.cn/customShare/share?id=${testCustomId}` +
`&channel=${CFG.defaultChannel}&agentCode=${CFG.workerCode || CFG.agentCode}&actPlatforms=${CFG.actPlatforms `&channel=${CFG.defaultChannel}&agentCode=${CFG.workerCode || CFG.agentCode}&actPlatforms=${CFG.actPlatforms
}&actId=${CFG.actId}` }&actId=${CFG.actId}`
) )
......
...@@ -78,7 +78,8 @@ class Store { ...@@ -78,7 +78,8 @@ class Store {
multipleValue: number, multipleValue: number,
taskId: string, taskId: string,
url: string, url: string,
} },
isAgent:string,
} = {}; } = {};
firstIn = true; firstIn = true;
......
import sensors from "sa-sdk-javascript/dist/web/sensorsdata.es6";
import SMEncryption from "sa-sdk-javascript/dist/web/plugin/sm-encryption/index.es6";
import { extranceName, platFormName, platformType } from "./constants.ts";
import { GetCurrSkinId } from "./utils";
import store from "@/store/store.ts";
const ENV = {
test: "test",
prod: "prod",
};
// todo 正式修改
const env = location.href.indexOf("duibatest") > -1 ? ENV.test : ENV.prod; // 测试
// const env = ENV.test; // 测试
/** 上报地址 */
const serverUrl = {
[ENV.test]: "https://mdglfxpt-test.piccgroup.cn:18443/sa?project=picclife_consumer",
[ENV.prod]: "https://mdglfxpt.piccgroup.cn:18443/sa?project=picclife_consumer",
};
/** 神策加密key */
const pub_key = {
[ENV.test]:
"04115969d70075438379dd348f650b4dcb27d0b12b92d9378b2b5d989b48dd9266d4654f08161cdb272b4c9069d64f77bb96fca6efcb1d1635bd7dcc36d058e07c",
[ENV.prod]:
"041717d6728d0f4efd409aeed420f64d3ef684d7e9d21b7b50cd427ce49c47c153916159009cd2f52039718a0e2ce3322cd954a0356c219effef262a5f1eddf8b3",
};
/** 人保加密 */
sensors.use(SMEncryption, {
pkv: 2,
pub_key: pub_key[env],
});
/** 渠道映射 */
export const CHANNEL_MAP = {
1: "人保寿险管家app",
2: "人保寿险企业家助手微信公众号",
3: "友客微信公众号-精选专题",
4: "e服务公众号",
5: "友客小程序",
6: "e通app",
7: "微通",
8: "友客-获客活动",
};
/** 埋点key */
export const LOG_KEY = {
click: "click",
exposure: "exposure",
pageview: "pageview",
result: "result",
MatterView: "MatterView",
MatterShare: "MatterShare",
pageViewTime: "pageViewTime",
};
/** 埋点Event */
export const EVENT_NAME = {
[LOG_KEY.click]: "actPageClick",
[LOG_KEY.exposure]: "actPageExposure",
[LOG_KEY.pageview]: "actPageView",
[LOG_KEY.result]: "ActPageResult",
[LOG_KEY.MatterView]: "MatterView",
[LOG_KEY.MatterShare]: "MatterShare",
[LOG_KEY.pageViewTime]: "MatterViewDuration"
};
let isInit = false;
/** 埋点事件 */
export const MD_EVENT = {
PAGE_VIEW: "actPageExposure",
PAGE_CLICK: "actPageClick",
};
export const initSensors = (uid) => {
sensors.init({
server_url: serverUrl[env],
app_js_bridge: true,
is_track_single_page: true,
use_client_time: true,
show_log: true,
send_type: "beacon",
heatmap: {
clickmap: "default",
scroll_notice_map: "not_collect",
},
});
sensors.login(uid);
const publicObjec = Object.assign(
{
currentUrl: location.href,
referrer: document.referrer,
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: 1375,
is_login: uid ? "是" : "否",
operation_name: "非遗大冒险",
source_platform: CHANNEL_MAP?.[CFG.channel] || CFG.channel,
entrance: extranceName[CFG.channel],
},
window["__tbSensorsObj__"]
);
sensors.registerPage(publicObjec);
sensors.quick("autoTrack");
isInit = true;
};
/**
* 真正的埋点 - 不区分曝光和点击,直接打
* @param {string} eventName
* @param {{page_name:string,button_name:string,operation_name:string}} options
*/
export const sensorLog = (logKey, bid, did, options) => {
if (!isInit) {
console.info(`%c 神策上报地址: ${serverUrl[env]} 当前环境: ${env}`, "font-size: 12px; color: green");
const uid = store.homeInfo?.uid;
initSensors(uid);
}
// 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: "非遗大冒险",
operation_id: CFG.operationId,
act_type: "客经",
location_type: "活动",
agent_code: store.homeInfo?.agentCode,
act_id: CFG.actId,
...options
});
};
export const pageViewD = (bid, did, options) => {
if (!isInit) {
console.info(`%c 神策上报地址: ${serverUrl[env]} 当前环境: ${env}`, "font-size: 12px; color: green");
const uid = store.homeInfo?.uid;
initSensors(uid);
}
// 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[LOG_KEY.pageview], {
track_sign: `aL06Activity.${bid}.${did}.${LOG_KEY.pageview}.${EVENT_NAME[LOG_KEY.pageview]}`,
operation_id: CFG.operationId,
avtivity_name: "非遗大冒险",
act_type: "客经",
location_type: "活动",
agent_code: store.homeInfo?.agentCode,
act_id: CFG.actId,
...options
});
};
/**
* 真正的埋点 - 不区分曝光和点击,直接打
* @param {string} eventName
* @param {{page_name:string,button_name:string,pop_name:string}} options
*/
export const pageView = (bid, options) => {
if (!isInit) {
console.info(`%c 神策上报地址: ${serverUrl[env]} 当前环境: ${env}`, "font-size: 12px; color: green");
const uid = store.homeInfo?.uid;
initSensors(uid);
}
// 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[LOG_KEY.pageview], {
track_sign: `aL06Activity.${bid}.${LOG_KEY.pageview}.${EVENT_NAME[LOG_KEY.pageview]}`,
operation_id: CFG.operationId,
avtivity_name: "非遗大冒险",
act_type: "客经",
location_type: "活动",
agent_code: store.homeInfo?.agentCode,
act_id: CFG.actId,
...options
});
};
export const MatterViewOpt = (bid, options) => {
if (!isInit) {
console.info(`%c 神策上报地址: ${serverUrl[env]} 当前环境: ${env}`, "font-size: 12px; color: green");
const uid = store.homeInfo?.uid;
initSensors(uid);
}
sensors.track(EVENT_NAME[LOG_KEY.MatterView], {
track_sign: `aL06Activity.${bid}.${LOG_KEY.pageview}.${EVENT_NAME[LOG_KEY.MatterView]}`,
operation_id: CFG.operationId,
agent_code: store.homeInfo?.agentCode,
act_id: CFG.actId,
act_type: "客经",
location_type: "活动",
entrance: extranceName[CFG.channel],
sales_id: CFG.workerCode || store.homeInfo?.agentCode, // todo
avtivity_name: "非遗大冒险",
...options
});
};
export const MatterShareOpt = (bid, did, options) => {
if (!isInit) {
console.info(`%c 神策上报地址: ${serverUrl[env]} 当前环境: ${env}`, "font-size: 12px; color: green");
const uid = store.homeInfo?.uid;
initSensors(uid);
}
sensors.track(EVENT_NAME[LOG_KEY.MatterShare], {
track_sign: `aL06Activity.${bid}.${did}.click.${EVENT_NAME[LOG_KEY.MatterShare]}`,
operation_id: CFG.operationId,
agent_code: store.homeInfo?.agentCode,
act_id: CFG.actId,
act_type: "客经",
location_type: "活动",
entrance: extranceName[CFG.channel],
sales_id: CFG.workerCode || store.homeInfo?.agentCode, // todo
avtivity_name: "非遗大冒险",
...options
});
};
export const MatterViewDuration = (bid, time, options) => {
if (!isInit) {
console.info(`%c 神策上报地址: ${serverUrl[env]} 当前环境: ${env}`, "font-size: 12px; color: green");
const uid = store.homeInfo?.uid;
initSensors(uid);
}
sensors.track(EVENT_NAME[LOG_KEY.pageViewTime], {
track_sign: `aL06Activity.${bid}.${LOG_KEY.pageViewTime}.${EVENT_NAME[LOG_KEY.pageViewTime]}`,
operation_id: CFG.operationId,
agent_code: store.homeInfo?.agentCode,
act_id: CFG.actId,
act_type: "客经",
location_type: "活动",
entrance: extranceName[CFG.channel],
sales_id: CFG.workerCode || store.homeInfo?.agentCode, // todo
avtivity_name: "非遗大冒险",
$event_duration: time,
...options
});
};
\ No newline at end of file
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