Distinguish between flash and validation events in Mixpanel (#347)

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
Juan Cruz Viotti 2016-04-20 14:56:58 -04:00
parent f683b841fa
commit 4d70676612
2 changed files with 9 additions and 2 deletions

View File

@ -247,10 +247,17 @@ app.controller('AppController', function(
$state.go('success');
} else {
OSNotificationService.send('Oops!', 'Looks like your flash has failed');
AnalyticsService.logEvent('Flash error');
AnalyticsService.logEvent('Validation error');
}
})
.catch(function(error) {
if (error.type === 'check') {
AnalyticsService.logEvent('Validation error');
} else {
AnalyticsService.logEvent('Flash error');
}
self.writer.resetState();
dialog.showError(error);
})

View File

@ -58,7 +58,7 @@
"lodash": "^4.5.1",
"ngstorage": "^0.3.10",
"open": "0.0.5",
"resin-image-write": "^3.0.3",
"resin-image-write": "^3.0.4",
"resin-zip-image": "^1.1.2",
"sudo-prompt": "^2.2.0",
"trackjs": "^2.1.16",