diff --git a/src/main/window-manager.ts b/src/main/window-manager.ts index 348d5bbd3f..74aeb010ea 100644 --- a/src/main/window-manager.ts +++ b/src/main/window-manager.ts @@ -4,6 +4,7 @@ import { BrowserWindow, dialog, ipcMain, shell, webContents } from "electron" import windowStateKeeper from "electron-window-state" import { observable } from "mobx"; import { initMenu } from "./menu"; +import { tracker } from "../common/tracker"; export class WindowManager { protected mainView: BrowserWindow; @@ -41,6 +42,10 @@ export class WindowManager { shell.openExternal(url); }); + this.mainView.on("focus", () => { + tracker.event("app", "focus") + }); + // track visible cluster from ui ipcMain.on("cluster-view:current-id", (event, clusterId: ClusterId) => { this.activeClusterId = clusterId;