diff --git a/app/services/irs_attempts_api/tracker_events.rb b/app/services/irs_attempts_api/tracker_events.rb index 61180291ee4..aefb7eadb77 100644 --- a/app/services/irs_attempts_api/tracker_events.rb +++ b/app/services/irs_attempts_api/tracker_events.rb @@ -29,6 +29,15 @@ def logout_initiated(success:) ) end + # Tracks when the user has attempted to enroll the Backup Codes MFA method to their account + # @param [Boolean] success + def mfa_enroll_backup_code(success:) + track_event( + :mfa_enroll_backup_code, + success: success, + ) + end + # @param [Boolean] success True if selection was valid # @param [Array] mfa_device_types List of MFA options users selected on account creation # A user has selected MFA options @@ -40,15 +49,6 @@ def mfa_enroll_options_selected(success:, mfa_device_types:) ) end - # Tracks when the user has attempted to enroll the Backup Codes MFA method to their account - # @param [Boolean] success - def mfa_enroll_backup_code(success:) - track_event( - :mfa_enroll_backup_code, - success: success, - ) - end - # @param [String] phone_number - The user's phone_number used for multi-factor authentication # @param [Boolean] success - True if the OTP Verification was sent # Relevant only when the user is enrolling a phone as their MFA. @@ -71,6 +71,23 @@ def mfa_enroll_phone_otp_submitted(success:) ) end + # Tracks when the user has attempted to enroll the piv cac MFA method to their account + # @param [String] subject_dn + # @param [Boolean] success + # @param [Hash>] failure_reason + def mfa_enroll_piv_cac( + success:, + subject_dn: nil, + failure_reason: nil + ) + track_event( + :mfa_enroll_piv_cac, + success: success, + subject_dn: subject_dn, + failure_reason: failure_reason, + ) + end + # Tracks when the user has attempted to enroll the TOTP MFA method to their account # @param [Boolean] success def mfa_enroll_totp(success:) @@ -131,6 +148,23 @@ def mfa_login_phone_otp_submitted(reauthentication:, success:) ) end + # Tracks when the user has attempted to log in with the piv cac MFA method to their account + # @param [String] subject_dn + # @param [Boolean] success + # @param [Hash>] failure_reason + def mfa_login_piv_cac( + success:, + subject_dn: nil, + failure_reason: nil + ) + track_event( + :mfa_login_piv_cac, + success: success, + subject_dn: subject_dn, + failure_reason: failure_reason, + ) + end + # Tracks when the user has attempted to log in with the TOTP MFA method to access their account # @param [Boolean] success def mfa_login_totp(success:) @@ -158,40 +192,6 @@ def mfa_login_webauthn_roaming(success:) ) end - # Tracks when the user has attempted to enroll the piv cac MFA method to their account - # @param [String] subject_dn - # @param [Boolean] success - # @param [Hash>] failure_reason - def mfa_enroll_piv_cac( - success:, - subject_dn: nil, - failure_reason: nil - ) - track_event( - :mfa_enroll_piv_cac, - success: success, - subject_dn: subject_dn, - failure_reason: failure_reason, - ) - end - - # Tracks when the user has attempted to log in with the piv cac MFA method to their account - # @param [String] subject_dn - # @param [Boolean] success - # @param [Hash>] failure_reason - def mfa_login_piv_cac( - success:, - subject_dn: nil, - failure_reason: nil - ) - track_event( - :mfa_login_piv_cac, - success: success, - subject_dn: subject_dn, - failure_reason: failure_reason, - ) - end - # Tracks when user confirms registration email # @param [Boolean] success # @param [String] email