|
@@ -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 = () => {
|