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:
@@ -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');
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user