From a20881383edcd78e96beef222adb65c8aacc7e38 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 25 Apr 2017 18:52:25 -0400 Subject: [PATCH] Additional analytics events --- src/popup/app/tools/toolsController.js | 6 +++++- src/popup/app/tools/toolsExportController.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/popup/app/tools/toolsController.js b/src/popup/app/tools/toolsController.js index 90de3f9516..11922a0cb1 100644 --- a/src/popup/app/tools/toolsController.js +++ b/src/popup/app/tools/toolsController.js @@ -1,17 +1,20 @@ angular .module('bit.tools') - .controller('toolsController', function ($scope, SweetAlert, i18nService) { + .controller('toolsController', function ($scope, SweetAlert, i18nService, $analytics) { $scope.i18n = i18nService; $scope.launchWebVault = function (createOrg) { + $analytics.eventTrack('Launch Web Vault' + (createOrg ? ' For Share' : '')); chrome.tabs.create({ url: 'https://vault.bitwarden.com/#/' + (createOrg ? '?org=free' : '') }); }; $scope.launchiOS = function () { + $analytics.eventTrack('Launch iOS'); chrome.tabs.create({ url: 'https://itunes.apple.com/us/app/bitwarden-free-password-manager/id1137397744?mt=8' }); }; $scope.launchAndroid = function () { + $analytics.eventTrack('Launch Android'); chrome.tabs.create({ url: 'https://play.google.com/store/apps/details?id=com.x8bit.bitwarden' }); }; @@ -24,6 +27,7 @@ cancelButtonText: i18nService.cancel }, function (confirmed) { if (confirmed) { + $analytics.eventTrack('Launch Web Vault For Import'); chrome.tabs.create({ url: 'https://vault.bitwarden.com' }); } }); diff --git a/src/popup/app/tools/toolsExportController.js b/src/popup/app/tools/toolsExportController.js index 1a5d9eb1d3..ebbfc7d377 100644 --- a/src/popup/app/tools/toolsExportController.js +++ b/src/popup/app/tools/toolsExportController.js @@ -10,6 +10,7 @@ $scope.submitPromise = checkPassword().then(function () { return getCsv(); }).then(function (csv) { + $analytics.eventTrack('Exported Data'); downloadFile(csv); }, function () { toastr.error(i18nService.invalidMasterPassword, i18nService.errorsOccurred);