Skip to content

Commit

Permalink
LG-14171: add liveness_checking_required to all selfie events (#11292)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
solipet authored and colter-nattrass committed Oct 23, 2024
1 parent 8114f35 commit e30a968
Showing 1 changed file with 44 additions and 22 deletions.
66 changes: 44 additions & 22 deletions app/services/analytics_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -4378,22 +4385,25 @@ 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:,
sdk_error_code:,
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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e30a968

Please sign in to comment.