1
0
mirror of https://github.com/bitwarden/web synced 2025-12-16 00:03:25 +00:00

Added analytics telemetry throughout the application. Make sure angulartics bundles before the ga dependency.

This commit is contained in:
Kyle Spearrin
2016-08-11 20:43:05 -04:00
parent ffbf25b62f
commit 92e0537bed
18 changed files with 76 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
angular
.module('bit.accounts')
.controller('accountsLoginController', function ($scope, $rootScope, $cookies, apiService, cryptoService, authService, $state, appSettings) {
.controller('accountsLoginController', function ($scope, $rootScope, $cookies, apiService, cryptoService, authService, $state, appSettings, $analytics) {
var rememberedEmail = $cookies.get(appSettings.rememberdEmailCookieName);
if (rememberedEmail) {
$scope.model = {
@@ -29,9 +29,11 @@ angular
var profile = authService.getUserProfile();
if (profile.twoFactor) {
$analytics.eventTrack('Logged In To Two-step');
$state.go('frontend.login.twoFactor');
}
else {
$analytics.eventTrack('Logged In');
$state.go('backend.vault');
}
});
@@ -42,6 +44,7 @@ angular
$scope.twoFactorPromise = authService.logInTwoFactor(model.code, "Authenticator");
$scope.twoFactorPromise.then(function () {
$analytics.eventTrack('Logged In From Two-step');
$state.go('backend.vault');
});
};