Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/controllers/idv/hybrid_handoff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class HybridHandoffController < ApplicationController
before_action :confirm_hybrid_handoff_needed, only: :show

def show
analytics.idv_doc_auth_upload_visited(**analytics_arguments)
analytics.idv_doc_auth_hybrid_handoff_visited(**analytics_arguments)

Funnel::DocAuth::RegisterStep.new(current_user.id, sp_session[:issuer]).call(
'upload', :view,
Expand Down Expand Up @@ -63,7 +63,7 @@ def handle_phone_submission
idv_session.flow_path = nil
end

analytics.idv_doc_auth_upload_submitted(
analytics.idv_doc_auth_hybrid_handoff_submitted(
**analytics_arguments.merge(telephony_form_response.to_h),
)
end
Expand Down Expand Up @@ -116,7 +116,7 @@ def bypass_send_link_steps
idv_session.flow_path = 'standard'
redirect_to idv_document_capture_url

analytics.idv_doc_auth_upload_submitted(
analytics.idv_doc_auth_hybrid_handoff_submitted(
**analytics_arguments.merge(
form_response(destination: :document_capture).to_h,
),
Expand Down Expand Up @@ -153,7 +153,7 @@ def rate_limiter

def analytics_arguments
{
step: 'upload',
step: 'hybrid_handoff',
analytics_id: 'Doc Auth',
irs_reproofing: irs_reproofing?,
redo_document_capture: params[:redo] ? true : nil,
Expand Down
28 changes: 15 additions & 13 deletions app/services/analytics_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,21 @@ def idv_doc_auth_exception_visited(step_name:, remaining_attempts:, **extra)
)
end

# The "hybrid handoff" step: Desktop user has submitted their choice to
# either continue via desktop ("document_capture" destination) or switch
# to mobile phone ("send_link" destination) to perform document upload.
# Mobile users still log this event but with skip_upload_step = true
# @identity.idp.previous_event_name IdV: doc auth upload submitted
def idv_doc_auth_hybrid_handoff_submitted(**extra)
track_event('IdV: doc auth hybrid handoff submitted', **extra)
end

# Desktop user has reached the above "hybrid handoff" view
# @identity.idp.previous_event_name IdV: doc auth upload visited
def idv_doc_auth_hybrid_handoff_visited(**extra)
track_event('IdV: doc auth hybrid handoff visited', **extra)
end

# @identity.idp.previous_event_name IdV: doc auth send_link submitted
def idv_doc_auth_link_sent_submitted(**extra)
track_event('IdV: doc auth link_sent submitted', **extra)
Expand Down Expand Up @@ -839,19 +854,6 @@ def idv_doc_auth_submitted_pii_validation(
)
end

# The "hybrid handoff" step: Desktop user has submitted their choice to
# either continue via desktop ("document_capture" destination) or switch
# to mobile phone ("send_link" destination) to perform document upload.
# Mobile users still log this event but with skip_upload_step = true
def idv_doc_auth_upload_submitted(**extra)
track_event('IdV: doc auth upload submitted', **extra)
end

# Desktop user has reached the above "hybrid handoff" view
def idv_doc_auth_upload_visited(**extra)
track_event('IdV: doc auth upload visited', **extra)
end

def idv_doc_auth_verify_proofing_results(**extra)
track_event('IdV: doc auth verify proofing results', **extra)
end
Expand Down
10 changes: 5 additions & 5 deletions spec/controllers/idv/hybrid_handoff_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
end

describe '#show' do
let(:analytics_name) { 'IdV: doc auth upload visited' }
let(:analytics_name) { 'IdV: doc auth hybrid handoff visited' }
let(:analytics_args) do
{ step: 'upload',
{ step: 'hybrid_handoff',
analytics_id: 'Doc Auth',
irs_reproofing: false }
end
Expand Down Expand Up @@ -137,15 +137,15 @@
end

describe '#update' do
let(:analytics_name) { 'IdV: doc auth upload submitted' }
let(:analytics_name) { 'IdV: doc auth hybrid handoff submitted' }

context 'hybrid flow' do
let(:analytics_args) do
{ success: true,
errors: { message: nil },
destination: :link_sent,
flow_path: 'hybrid',
step: 'upload',
step: 'hybrid_handoff',
analytics_id: 'Doc Auth',
irs_reproofing: false,
telephony_response: { errors: {},
Expand All @@ -168,7 +168,7 @@
errors: {},
destination: :document_capture,
flow_path: 'standard',
step: 'upload',
step: 'hybrid_handoff',
analytics_id: 'Doc Auth',
irs_reproofing: false,
skip_upload_step: false }
Expand Down
12 changes: 6 additions & 6 deletions spec/features/idv/analytics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
'IdV: doc auth agreement visited' => { step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: consent checkbox toggled' => { checked: true },
'IdV: doc auth agreement submitted' => { success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth upload visited' => { step: 'upload', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth upload submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'upload', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false },
'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth hybrid handoff submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false },
'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'Frontend: IdV: front image added' => { 'width' => 284, 'height' => 38, 'mimeType' => 'image/png', 'source' => 'upload', 'size' => 3694, 'attempt' => 1, 'flow_path' => 'standard', 'acuant_sdk_upgrade_a_b_testing_enabled' => 'false', 'use_alternate_sdk' => anything, 'acuant_version' => anything },
'Frontend: IdV: back image added' => { 'width' => 284, 'height' => 38, 'mimeType' => 'image/png', 'source' => 'upload', 'size' => 3694, 'attempt' => 1, 'flow_path' => 'standard', 'acuant_sdk_upgrade_a_b_testing_enabled' => 'false', 'use_alternate_sdk' => anything, 'acuant_version' => anything },
Expand Down Expand Up @@ -51,8 +51,8 @@
'IdV: doc auth welcome submitted' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth agreement visited' => { step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth agreement submitted' => { success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth upload visited' => { step: 'upload', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth upload submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'upload', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false },
'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth hybrid handoff submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false },
'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'Frontend: IdV: front image added' => { 'width' => 284, 'height' => 38, 'mimeType' => 'image/png', 'source' => 'upload', 'size' => 3694, 'attempt' => 1, 'flow_path' => 'standard', 'acuant_sdk_upgrade_a_b_testing_enabled' => 'false', 'use_alternate_sdk' => anything, 'acuant_version' => anything },
'Frontend: IdV: back image added' => { 'width' => 284, 'height' => 38, 'mimeType' => 'image/png', 'source' => 'upload', 'size' => 3694, 'attempt' => 1, 'flow_path' => 'standard', 'acuant_sdk_upgrade_a_b_testing_enabled' => 'false', 'use_alternate_sdk' => anything, 'acuant_version' => anything },
Expand All @@ -79,8 +79,8 @@
'IdV: doc auth welcome submitted' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth agreement visited' => { step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth agreement submitted' => { success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth upload visited' => { step: 'upload', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth upload submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'upload', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false },
'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth hybrid handoff submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false },
'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'Frontend: IdV: front image added' => { 'width' => 284, 'height' => 38, 'mimeType' => 'image/png', 'source' => 'upload', 'size' => 3694, 'attempt' => 1, 'flow_path' => 'standard', 'acuant_sdk_upgrade_a_b_testing_enabled' => 'false', 'use_alternate_sdk' => anything, 'acuant_version' => anything },
'Frontend: IdV: back image added' => { 'width' => 284, 'height' => 38, 'mimeType' => 'image/png', 'source' => 'upload', 'size' => 3694, 'attempt' => 1, 'flow_path' => 'standard', 'acuant_sdk_upgrade_a_b_testing_enabled' => 'false', 'use_alternate_sdk' => anything, 'acuant_version' => anything },
Expand Down
4 changes: 2 additions & 2 deletions spec/features/idv/doc_auth/hybrid_handoff_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@

expect(page).to have_current_path(idv_link_sent_path)
expect(fake_analytics).to have_logged_event(
'IdV: doc auth upload submitted',
hash_including(step: 'upload', destination: :link_sent),
'IdV: doc auth hybrid handoff submitted',
hash_including(step: 'hybrid_handoff', destination: :link_sent),
)

visit(idv_hybrid_handoff_url)
Expand Down
2 changes: 1 addition & 1 deletion spec/features/idv/doc_auth/redo_document_capture_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

expect(current_path).to eq(idv_hybrid_handoff_path)
expect(fake_analytics).to have_logged_event(
'IdV: doc auth upload visited',
'IdV: doc auth hybrid handoff visited',
hash_including(redo_document_capture: true),
)
complete_hybrid_handoff_step
Expand Down