@base44-preview/sdk 0.8.12-pr.65.a665dc3 → 0.8.12-pr.65.d6ffa12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@ import { AxiosInstance } from "axios";
|
|
|
2
2
|
import { TrackEventParams, AnalyticsModuleOptions } from "./analytics.types";
|
|
3
3
|
import type { AuthModule } from "./auth.types";
|
|
4
4
|
export declare const USER_HEARTBEAT_EVENT_NAME = "__user_heartbeat_event__";
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const ANALYTICS_INITIALIZATION_EVENT_NAME = "__initialization_event__";
|
|
6
6
|
export declare const ANALYTICS_SESSION_DURATION_EVENT_NAME = "__session_duration_event__";
|
|
7
7
|
export declare const ANALYTICS_CONFIG_ENABLE_URL_PARAM_KEY = "analytics-enable";
|
|
8
8
|
export declare const ANALYTICS_SESSION_ID_LOCAL_STORAGE_KEY = "base44_analytics_session_id";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getSharedInstance } from "../utils/sharedInstance.js";
|
|
2
2
|
import { generateUuid } from "../utils/common.js";
|
|
3
3
|
export const USER_HEARTBEAT_EVENT_NAME = "__user_heartbeat_event__";
|
|
4
|
-
export const
|
|
4
|
+
export const ANALYTICS_INITIALIZATION_EVENT_NAME = "__initialization_event__";
|
|
5
5
|
export const ANALYTICS_SESSION_DURATION_EVENT_NAME = "__session_duration_event__";
|
|
6
6
|
export const ANALYTICS_CONFIG_ENABLE_URL_PARAM_KEY = "analytics-enable";
|
|
7
7
|
export const ANALYTICS_SESSION_ID_LOCAL_STORAGE_KEY = "base44_analytics_session_id";
|
|
@@ -176,11 +176,12 @@ function startHeartBeatProcessor(track) {
|
|
|
176
176
|
}
|
|
177
177
|
function trackInitializationEvent(track) {
|
|
178
178
|
if (typeof window === "undefined" ||
|
|
179
|
-
analyticsSharedState.wasInitializationTracked)
|
|
179
|
+
analyticsSharedState.wasInitializationTracked) {
|
|
180
180
|
return;
|
|
181
|
+
}
|
|
181
182
|
analyticsSharedState.wasInitializationTracked = true;
|
|
182
183
|
track({
|
|
183
|
-
eventName:
|
|
184
|
+
eventName: ANALYTICS_INITIALIZATION_EVENT_NAME,
|
|
184
185
|
properties: {
|
|
185
186
|
referrer: document === null || document === void 0 ? void 0 : document.referrer,
|
|
186
187
|
},
|