Log Etcher version in Mixpanel and TrackJS

Its hard to attempt to debug or reproduce an issue if we don't know the

version the user is running.



Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
Juan Cruz Viotti 2016-04-05 13:10:22 -04:00
parent bdd541e90e
commit 912373a389

View File

@ -24,6 +24,7 @@ const _ = require('lodash');
const angular = require('angular'); const angular = require('angular');
const username = require('username'); const username = require('username');
const app = require('electron').remote.app; const app = require('electron').remote.app;
const packageJSON = require('../../../package.json');
// Force Mixpanel snippet to load Mixpanel locally // Force Mixpanel snippet to load Mixpanel locally
// instead of using a CDN for performance reasons // instead of using a CDN for performance reasons
@ -50,7 +51,8 @@ analytics.config(function($mixpanelProvider) {
electron: app.getVersion(), electron: app.getVersion(),
node: process.version, node: process.version,
arch: process.arch arch: process.arch,
version: packageJSON.version
}); });
}); });
@ -59,7 +61,8 @@ analytics.config(function($mixpanelProvider) {
analytics.run(function($window) { analytics.run(function($window) {
$window.trackJs.configure({ $window.trackJs.configure({
userId: username.sync() userId: username.sync(),
version: packageJSON.version
}); });
}); });