mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-28 19:26:09 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
49e0dec799
5 changed files with 30 additions and 9 deletions
|
|
@ -427,4 +427,7 @@ export abstract class Constants {
|
|||
// third
|
||||
"yul", "solidity", "abap",
|
||||
];
|
||||
|
||||
// Google Analytics 事件
|
||||
public static readonly ANALYTICS_EVT_ON_GET_CONFIG: string = "siyuan.onGetConfig";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,9 +160,23 @@ export const onGetConfig = (isStart: boolean) => {
|
|||
mountHelp();
|
||||
}
|
||||
|
||||
window.gtag("event", "config", {
|
||||
let 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) {
|
||||
console.log(window.siyuan.user)
|
||||
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);
|
||||
};
|
||||
|
||||
const initBar = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue