From 7fe503c89a189fdba640ad65c9e0ebf7a2e5bb6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Daniel=20Mih=C4=83il=C4=83?= Date: Thu, 6 Apr 2017 19:39:49 +0100 Subject: [PATCH] feat(GUI): add analytics image / drive info on flash done / error events (#1255) Change-Type: patch --- lib/gui/pages/main/controllers/flash.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/gui/pages/main/controllers/flash.js b/lib/gui/pages/main/controllers/flash.js index 2beff46c..0f96d724 100644 --- a/lib/gui/pages/main/controllers/flash.js +++ b/lib/gui/pages/main/controllers/flash.js @@ -72,7 +72,10 @@ module.exports = function( } OSNotificationService.send('Success!', messages.info.flashComplete()); - AnalyticsService.logEvent('Done'); + AnalyticsService.logEvent('Done', { + image, + drive + }); $state.go('success'); }) .catch((error) => { @@ -80,15 +83,23 @@ module.exports = function( if (error.code === 'EVALIDATION') { FlashErrorModalService.show(messages.error.validation()); - AnalyticsService.logEvent('Validation error'); + AnalyticsService.logEvent('Validation error', { + image, + drive + }); } else if (error.code === 'ENOSPC') { FlashErrorModalService.show(messages.error.notEnoughSpaceInDrive()); - AnalyticsService.logEvent('Out of space'); + AnalyticsService.logEvent('Out of space', { + image, + drive + }); } else { FlashErrorModalService.show(messages.error.genericFlashError()); ErrorService.reportException(error); AnalyticsService.logEvent('Flash error', { - error + error, + image, + drive }); }