From 75571029cb6d3bdf8d4742a45a9404428ca96ac8 Mon Sep 17 00:00:00 2001 From: Doug Price Date: Tue, 1 Oct 2024 12:30:24 -0400 Subject: [PATCH] LG-14171: add liveness_checking_required to all selfie events (#11292) While it is intuitively obvious that liveness checking is required if the user is generating selfie events, creating a dashboard on CW will be much easier if we can filter all events by one parameter. changelog: Internal, Logging, Add liveness flag to all relevant events. --- app/services/analytics_events.rb | 66 +++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index d7b9211ed51..ff15a1fec48 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -4356,14 +4356,21 @@ def idv_sdk_error_before_init( # @param [Integer] captureAttempts number of attempts to capture / upload an image # (previously called "attempt") # @param [Integer] selfie_attempts number of times SDK captured selfie, user may decide to retake + # @param [Boolean] liveness_checking_required Whether or not the selfie is required # rubocop:disable Naming/VariableName,Naming/MethodParameterName - def idv_sdk_selfie_image_capture_closed_without_photo(acuant_version:, captureAttempts: nil, - selfie_attempts: nil, **extra) + def idv_sdk_selfie_image_capture_closed_without_photo( + acuant_version:, + captureAttempts: nil, + selfie_attempts: nil, + liveness_checking_required: true, # default to true to facilitate CW filtering + **extra + ) track_event( :idv_sdk_selfie_image_capture_closed_without_photo, - acuant_version: acuant_version, - captureAttempts: captureAttempts, - selfie_attempts: selfie_attempts, + acuant_version:, + captureAttempts:, + selfie_attempts:, + liveness_checking_required:, **extra, ) end @@ -4378,6 +4385,7 @@ def idv_sdk_selfie_image_capture_closed_without_photo(acuant_version:, captureAt # @param [Integer] captureAttempts number of attempts to capture / upload an image # (previously called "attempt") # @param [Integer] selfie_attempts number of times SDK captured selfie, user may decide to retake + # @param [Boolean] liveness_checking_required Whether or not the selfie is required # rubocop:disable Naming/VariableName,Naming/MethodParameterName def idv_sdk_selfie_image_capture_failed( acuant_version:, @@ -4385,15 +4393,17 @@ def idv_sdk_selfie_image_capture_failed( sdk_error_message:, captureAttempts: nil, selfie_attempts: nil, + liveness_checking_required: true, # default to true to facilitate CW filtering **extra ) track_event( :idv_sdk_selfie_image_capture_failed, - acuant_version: acuant_version, - sdk_error_code: sdk_error_code, - sdk_error_message: sdk_error_message, - captureAttempts: captureAttempts, - selfie_attempts: selfie_attempts, + acuant_version:, + sdk_error_code:, + sdk_error_message:, + captureAttempts:, + selfie_attempts:, + liveness_checking_required:, **extra, ) end @@ -4403,17 +4413,20 @@ def idv_sdk_selfie_image_capture_failed( # @param [Integer] captureAttempts number of attempts to capture / upload an image # (previously called "attempt") # @param [Integer] selfie_attempts number of times SDK captured selfie, user may decide to retake + # @param [Boolean] liveness_checking_required Whether or not the selfie is required def idv_sdk_selfie_image_capture_initialized( acuant_version:, captureAttempts: nil, selfie_attempts: nil, + liveness_checking_required: true, # default to true to facilitate CW filtering **extra ) track_event( :idv_sdk_selfie_image_capture_initialized, - acuant_version: acuant_version, - captureAttempts: captureAttempts, - selfie_attempts: selfie_attempts, + acuant_version:, + captureAttempts:, + selfie_attempts:, + liveness_checking_required:, **extra, ) end @@ -4424,18 +4437,21 @@ def idv_sdk_selfie_image_capture_initialized( # @param [String] acuant_version # @param [Integer] captureAttempts number of attempts to capture / upload an image # @param [Integer] selfie_attempts number of times SDK captured selfie, user may decide to retake + # @param [Boolean] liveness_checking_required Whether or not the selfie is required # rubocop:disable Naming/VariableName,Naming/MethodParameterName def idv_sdk_selfie_image_capture_opened( acuant_version:, captureAttempts: nil, selfie_attempts: nil, + liveness_checking_required: true, # default to true to facilitate CW filtering **extra ) track_event( :idv_sdk_selfie_image_capture_opened, - acuant_version: acuant_version, - captureAttempts: captureAttempts, - selfie_attempts: selfie_attempts, + acuant_version:, + captureAttempts:, + selfie_attempts:, + liveness_checking_required:, **extra, ) end @@ -4444,17 +4460,20 @@ def idv_sdk_selfie_image_capture_opened( # @param [String] acuant_version # @param [Integer] captureAttempts number of attempts to capture / upload an image # @param [Integer] selfie_attempts number of selfie captured by SDK + # @param [Boolean] liveness_checking_required Whether or not the selfie is required def idv_sdk_selfie_image_re_taken( acuant_version:, captureAttempts: nil, selfie_attempts: nil, + liveness_checking_required: true, # default to true to facilitate CW filtering **extra ) track_event( :idv_sdk_selfie_image_re_taken, - acuant_version: acuant_version, - captureAttempts: captureAttempts, - selfie_attempts: selfie_attempts, + acuant_version:, + captureAttempts:, + selfie_attempts:, + liveness_checking_required:, **extra, ) end @@ -4463,17 +4482,20 @@ def idv_sdk_selfie_image_re_taken( # @param [String] acuant_version # @param [Integer] captureAttempts number of attempts to capture / upload an image # @param [Integer] selfie_attempts number of selfie captured by SDK + # @param [Boolean] liveness_checking_required Whether or not the selfie is required def idv_sdk_selfie_image_taken( acuant_version:, captureAttempts: nil, selfie_attempts: nil, + liveness_checking_required: true, # default to true to facilitate CW filtering **extra ) track_event( :idv_sdk_selfie_image_taken, - acuant_version: acuant_version, - captureAttempts: captureAttempts, - selfie_attempts: selfie_attempts, + acuant_version:, + captureAttempts:, + selfie_attempts:, + liveness_checking_required:, **extra, ) end