mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-16 07:01:03 +00:00
game url
This commit is contained in:
parent
e331c51dc3
commit
039fc604f5
@ -79,6 +79,7 @@ export enum GA_EventName {
|
||||
Inspector = "Inspector",
|
||||
EngineVersion = "engine_version",
|
||||
AppVersion = "app_version",
|
||||
GameUrl = "game_url",
|
||||
GamePlayer = "game_player",
|
||||
GamePause = "game_pause",
|
||||
GameStep = "game_step",
|
||||
|
@ -29,4 +29,9 @@ export class InjectEvent {
|
||||
const event = new CustomEvent(DocumentEvent.GoogleAnalytics, { detail });
|
||||
document.dispatchEvent(event);
|
||||
}
|
||||
sendUrl(url: string) {
|
||||
const detail = { event: GA_EventName.GameUrl, params: url } as GoogleAnalyticsData;
|
||||
const event = new CustomEvent(DocumentEvent.GoogleAnalytics, { detail });
|
||||
document.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
|
@ -214,6 +214,7 @@ export class Inspector extends InjectEvent {
|
||||
if (version) {
|
||||
this.hasUploadEngineVersion = true;
|
||||
this.sendEngineVersion(version);
|
||||
this.sendUrl(window.location.href);
|
||||
}
|
||||
}
|
||||
forEachNode(cb: (node: any) => void) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user