mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-29 14:16:36 +00:00
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:
parent
bdd541e90e
commit
912373a389
@ -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
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user