@@ -766,10 +766,14 @@ const processCLI = function (cmdRun, session) {
766766 const username = readlineSync . questionEMail ( ` - ${ CPROMPT } Your identity${ CRESET } : ` , { limitMessage : " * Your login email is invalid." } )
767767 const password = readlineSync . question ( ` - ${ CPROMPT } Your password${ CRESET } : ` , { hideEchoBack : true } )
768768 return new Promise ( function ( resolve ) {
769+ analytics . updateEvent ( "_userauth.sign_in" , undefined , undefined , true )
769770 authenticate ( username , password ) . then ( function ( userSession ) {
770771 showSubscriptionPlan ( userSession )
771772 resolve ( )
772- } ) . catch ( error => console . error ( error ) && resolve ( ) )
773+ } ) . catch ( error => {
774+ analytics . updateEvent ( "_userauth.auth_fail" , undefined , undefined , false )
775+ console . error ( error ) && resolve ( )
776+ } )
773777 } )
774778 } else if ( cmdRun === "UPGRADE" ) {
775779 const subscriptionPlan = readlineSync . keyInSelect ( [
@@ -792,6 +796,7 @@ const processCLI = function (cmdRun, session) {
792796 min : 8 , max : 24 ,
793797 confirmMessage : ` - ${ CPROMPT } Confirm password${ CRESET } : `
794798 } )
799+ analytics . updateEvent ( "_userauth.sign_up" , undefined , undefined , true )
795800 registerUser ( fullname , username , password ) . then ( function ( user ) {
796801 const activation = readlineSync . question ( ` - ${ CPROMPT } Activation code${ CRESET } : ` , { hideEchoBack : false } )
797802 confirmRegistration ( user . username , activation ) . then ( function ( resultCode ) {
0 commit comments