From 912373a389d02c4d113125533d655f38ce16e798 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 5 Apr 2016 13:10:22 -0400 Subject: [PATCH] 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 --- lib/browser/modules/analytics.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/browser/modules/analytics.js b/lib/browser/modules/analytics.js index 23de3144..78f261c4 100644 --- a/lib/browser/modules/analytics.js +++ b/lib/browser/modules/analytics.js @@ -24,6 +24,7 @@ const _ = require('lodash'); const angular = require('angular'); const username = require('username'); const app = require('electron').remote.app; +const packageJSON = require('../../../package.json'); // Force Mixpanel snippet to load Mixpanel locally // instead of using a CDN for performance reasons @@ -50,7 +51,8 @@ analytics.config(function($mixpanelProvider) { electron: app.getVersion(), node: process.version, - arch: process.arch + arch: process.arch, + version: packageJSON.version }); }); @@ -59,7 +61,8 @@ analytics.config(function($mixpanelProvider) { analytics.run(function($window) { $window.trackJs.configure({ - userId: username.sync() + userId: username.sync(), + version: packageJSON.version }); });