diff --git a/src/desktop-metrics.html b/src/desktop-metrics.html index d97da34b1..937b87d5e 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 7e6ad646b..19c72b3bb 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");