LG-11982: selfie related analytics log with selfie attempts.#10456
LG-11982: selfie related analytics log with selfie attempts.#10456dawei-nava merged 6 commits intomainfrom
Conversation
changelog: Internal, Doc Auth, Analytics for selfieAttempts.
| @@ -339,6 +339,7 @@ function AcuantCapture( | |||
| const { isMobile } = useContext(DeviceContext); | |||
There was a problem hiding this comment.
I tested this out manually and it mostly worked as expected! However I did see one extra selfie attempt - so if I took 2 pictures, it recorded 3.
| const { isMobile } = useContext(DeviceContext); | ||
| const { t, formatHTML } = useI18n(); | ||
| const [captureAttempts, incrementCaptureAttempts] = useCounter(1); | ||
| const selfieAttempts = useRef(1); |
There was a problem hiding this comment.
What does the 1 do here?
I wonder if this is adding the extra attempt.
There was a problem hiding this comment.
@night-jellyfish , tried to be consistent with captureAttempts which has a default 1. Was using 0 here, if this is the consent I can use 0.
There was a problem hiding this comment.
I see. I would be curious what other folks think / see.
Personally I think a default of 1 is fine, but not if it increases the actual number of attempts to one extra than it actually is.
app/javascript/packages/document-capture/components/acuant-capture.tsx
Outdated
Show resolved
Hide resolved
night-jellyfish
left a comment
There was a problem hiding this comment.
Tested manually again and saw the expected number of attempts! 🎉
Pretty neat too that if I add the selfie and then decide to retake again, it keeps the count.
Thanks for making the requested changes!
🎫 Ticket
Link to the relevant ticket:
LG-11982
🛠 Summary of changes
Added another counter of
selfieAttempts, which indicate SDK successfully detected face and took a selfie.User may decide to retake and it will be counted as another
selfieAttempts.📜 Testing Plan
Provide a checklist of steps to confirm the changes.
selfieAttemptscounted.