From 89a27f9de89ceecabd8253a6f00cf66d3d01c905 Mon Sep 17 00:00:00 2001 From: abose Date: Thu, 29 Jan 2026 18:33:07 +0530 Subject: [PATCH] chore: metrics ga migration to electron --- src/desktop-metrics.html | 37 ++++++++++++++++++++++++++----------- src/utils/Metrics.js | 8 ++++++-- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/src/desktop-metrics.html b/src/desktop-metrics.html index d97da34b1a..937b87d5e8 100644 --- a/src/desktop-metrics.html +++ b/src/desktop-metrics.html @@ -5,6 +5,11 @@ Desktop Metrics logger with Google Analytics Phoenix Desktop Metrics emitter to GA. - \ No newline at end of file + diff --git a/src/utils/Metrics.js b/src/utils/Metrics.js index 7e6ad646bf..19c72b3bbb 100644 --- a/src/utils/Metrics.js +++ b/src/utils/Metrics.js @@ -196,10 +196,14 @@ define(function (require, exports, module) { function _sendNativeGAEvent(analyticsID, customUserID, events=[]) { if(window.__TAURI__){ - return _sendTauriGAEvent(analyticsID, customUserID, events=[]); + return _sendTauriGAEvent(analyticsID, customUserID, events); } if(window.__ELECTRON__){ - // todo electron send event to metrics window with electron + window.electronAPI.sendHealthMetric({ + analyticsID: analyticsID, + customUserID: customUserID, + events: events + }); return; } console.error("Metrics send event failed. Unknown native platform");