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