         if result
           $scope.isSaving = $scope.state.isAdding = false
           Message.toast Resource.string("msgAuthSuccess"), 3000
+          Analytics.sendEvent 'internal', 'auth', 'success'
           loadProject msg.account
         else
           failAuthentication null

  failAuthentication = (msg) ->
    $scope.isSaving = false
    Message.toast Resource.string("msgAuthFail"), 3000


  ###

timeTracker.controller 'AccountCtrl', ($scope, $modal, Redmine, Account, Project, Ticket, Message, State, Resource, Analytics) ->

  ID_PASS = 'id_pass'

