1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01:00

Additional analytics events

This commit is contained in:
Kyle Spearrin 2017-04-25 18:52:25 -04:00
parent e411170a90
commit a20881383e
2 changed files with 6 additions and 1 deletions

View File

@ -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' });
}
});

View File

@ -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);