Skip to content

LG-11427: add phone_with_camera to analytics#9461

Merged
amirbey merged 14 commits intomainfrom
amirbey/LG-11427-be-log-phone-with-camera
Oct 30, 2023
Merged

LG-11427: add phone_with_camera to analytics#9461
amirbey merged 14 commits intomainfrom
amirbey/LG-11427-be-log-phone-with-camera

Conversation

@amirbey
Copy link
Contributor

@amirbey amirbey commented Oct 26, 2023

🎫 Ticket

LG-11427

🛠 Summary of changes

Store phone_with_camera in idv_session and log in analytics for IdV events.

📜 Testing Plan

Bypass phone question page

  1. Complete identity verification
  2. verify phone_with_camera=nil is logged for most Idv events post agreement step.

Phone question page with camera

  1. Complete Idv steps until hybrid handoff page is rendered
  2. visit /verify/phone_question
  3. Select I have a phone and complete Idv
  4. verify phone_with_camera=true is logged for most Idv events post agreement step.

Phone question page without camera

  1. Complete Idv steps until hybrid handoff page is rendered
  2. visit /verify/phone_question
  3. Select I do have a phone and complete Idv
  4. verify phone_with_camera=false is logged for most Idv events post agreement step.

NOTE: events not logged
hybrid document capture events
image upload submitted
image upload pii validation

@amirbey amirbey changed the title add phone with camera to ab test analytics LG-11427: add phone_with_camera to analytics Oct 27, 2023
@amirbey amirbey marked this pull request as ready for review October 27, 2023 15:38
@amirbey amirbey requested review from a team and night-jellyfish and removed request for a team October 27, 2023 15:48
@amirbey amirbey self-assigned this Oct 27, 2023
**analytics_arguments.
merge(phone_with_camera: true),
)
idv_session.phone_with_camera = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amirbey , so basically user is presented(based on bucket) this question, and answered with true or false. If user is not presented with question, this flag will be nil.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct 👍🏿

return if request.referer == idv_link_sent_url
return if request.referer == idv_hybrid_handoff_url
return if request.referer == idv_hybrid_handoff_url(redo: true)
return if request.referer == idv_cancel_url(step: 'hybrid_handoff')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering whether we can consolidate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @dawei-nava - @soniaconnolly and I are looking to refactor our implementation here 😄

Comment on lines +89 to +91
def phone_with_camera
{ phone_with_camera: phone_question_ab_test_bucket == :show_phone_question ? true : nil }
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I think this should move into phone_question_ab_test_concern
  2. I think that everything we do here in hybrid_mobile/document_capture_controller.rb we also need to do in idv/document_capture_controller.rb ?

Copy link
Contributor Author

@amirbey amirbey Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@charleyf - this is present because we don't have idv session here .. this logic is exclusive to the hybrid document capture

changelog: Internal, Logging, log phone_with_camera for phone question ab tests

Co-authored-by: Sonia Connolly <sonia.connolly@gsa.gov>
Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, talked through logging both phone_with_camera and the phone question bucket.

@amirbey amirbey merged commit e6f06cf into main Oct 30, 2023
@amirbey amirbey deleted the amirbey/LG-11427-be-log-phone-with-camera branch October 30, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants