@chiyou/minigame-framework 1.4.6 → 1.4.7
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.
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { LogUtils } from "../Utils/LogUtils";
|
|
|
3
3
|
import { ServiceLocator } from "../Utils/ServiceLocator";
|
|
4
4
|
import { BaseMgr } from "./BaseMgr";
|
|
5
5
|
import { EventMgr } from "./EventMgr";
|
|
6
|
-
import { AnalyticsMgr } from "./AnalyticsMgr";
|
|
6
|
+
import type { AnalyticsMgr } from "./AnalyticsMgr";
|
|
7
7
|
|
|
8
8
|
/** 生命周期管理器 */
|
|
9
9
|
export class LifeCycleMgr extends BaseMgr {
|
|
@@ -126,7 +126,10 @@ export class LifeCycleMgr extends BaseMgr {
|
|
|
126
126
|
// 上报 GameLaunch 事件
|
|
127
127
|
const info = this.getPlatformAdapter().getColdStartSceneInfo();
|
|
128
128
|
const launchHour = new Date().getHours();
|
|
129
|
-
|
|
129
|
+
const analyticsMgr = ServiceLocator.Instance.get<AnalyticsMgr>("AnalyticsMgr");
|
|
130
|
+
if (analyticsMgr) {
|
|
131
|
+
analyticsMgr.trackGameLaunch(info.scene, info.category, launchHour);
|
|
132
|
+
}
|
|
130
133
|
}
|
|
131
134
|
|
|
132
135
|
/**
|