mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-10-23 00:35:23 +00:00
广告优化,加入插件版本使用统计
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { debugLog, Msg, Page, PluginEvent } from "../../core/types";
|
||||
import { DocumentEvent } from "../const";
|
||||
import { GA_EventName } from "../../ga/type";
|
||||
import { DocumentEvent, GoogleAnalyticsData } from "../const";
|
||||
import { Terminal } from "../terminal";
|
||||
|
||||
export class InjectEvent {
|
||||
@@ -23,4 +24,9 @@ export class InjectEvent {
|
||||
const event = new CustomEvent(DocumentEvent.EngineVersion, { detail });
|
||||
document.dispatchEvent(event);
|
||||
}
|
||||
sendAppVersion(version: string) {
|
||||
const detail = { event: GA_EventName.AppVersion, params: version } as GoogleAnalyticsData;
|
||||
const event = new CustomEvent(DocumentEvent.GoogleAnalytics, { detail });
|
||||
document.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user