🎨 增加 ga 统计事件参数
This commit is contained in:
parent
bca18514bd
commit
8002d890b5
1 changed files with 14 additions and 11 deletions
|
@ -161,22 +161,25 @@ export const onGetConfig = (isStart: boolean) => {
|
|||
mountHelp();
|
||||
}
|
||||
|
||||
const para = {
|
||||
"version": Constants.SIYUAN_VERSION,
|
||||
"isLoggedIn": "false",
|
||||
"subscriptionStatus": "-1",
|
||||
"subscriptionPlan": "-1",
|
||||
"subscriptionType": "-1",
|
||||
};
|
||||
if (window.siyuan.user) {
|
||||
para.isLoggedIn = "true";
|
||||
if (0 === window.siyuan.user.userSiYuanSubscriptionStatus) {
|
||||
try {
|
||||
const para = {
|
||||
"version": Constants.SIYUAN_VERSION,
|
||||
"container": window.siyuan.config.system.container,
|
||||
"isLoggedIn": "false",
|
||||
"subscriptionStatus": "-1",
|
||||
"subscriptionPlan": "-1",
|
||||
"subscriptionType": "-1",
|
||||
};
|
||||
if (window.siyuan.user) {
|
||||
para.isLoggedIn = "true";
|
||||
para.subscriptionStatus = window.siyuan.user.userSiYuanSubscriptionStatus.toString();
|
||||
para.subscriptionPlan = window.siyuan.user.userSiYuanSubscriptionPlan.toString();
|
||||
para.subscriptionType = window.siyuan.user.userSiYuanSubscriptionType.toString();
|
||||
}
|
||||
window.gtag("event", Constants.ANALYTICS_EVT_ON_GET_CONFIG, para);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
window.gtag("event", Constants.ANALYTICS_EVT_ON_GET_CONFIG, para);
|
||||
};
|
||||
|
||||
const initBar = () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue