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
4 changes: 2 additions & 2 deletions app/controllers/idv/address_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ class AddressController < ApplicationController
before_action :confirm_pii_from_doc

def new
analytics.track_event(Analytics::IDV_ADDRESS_VISIT)
analytics.idv_address_visit
end

def update
form_result = idv_form.submit(profile_params)
analytics.track_event(Analytics::IDV_ADDRESS_SUBMITTED, form_result.to_h)
analytics.idv_address_submitted(**form_result.to_h)
capture_address_edited(form_result)
if form_result.success?
success
Expand Down
5 changes: 0 additions & 5 deletions app/services/analytics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ def browser_attributes
# rubocop:disable Layout/LineLength
ACCOUNT_RESET_VISIT = 'Account deletion and reset visited'
DOC_AUTH = 'Doc Auth' # visited or submitted is appended
IDV_ADDRESS_VISIT = 'IdV: address visited'
IDV_ADDRESS_SUBMITTED = 'IdV: address submitted'
IDV_BASIC_INFO_VISIT = 'IdV: basic info visited'
IDV_BASIC_INFO_SUBMITTED_FORM = 'IdV: basic info form submitted'
IDV_BASIC_INFO_SUBMITTED_VENDOR = 'IdV: basic info vendor submitted'
Comment on lines -129 to -131
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just confirmed that these 3 events were removed in #3682 and seem to have been unused at that time, so I think there's no need to link these to current events, they're super out of date

IDV_CANCELLATION = 'IdV: cancellation visited'
IDV_CANCELLATION_GO_BACK = 'IdV: cancellation go back'
IDV_CANCELLATION_CONFIRMED = 'IdV: cancellation confirmed'
Expand Down
32 changes: 32 additions & 0 deletions app/services/analytics_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,38 @@ def forget_all_browsers_visited
track_event('Forget All Browsers Visited')
end

# @identity.idp.event_name Idv address submitted
# @param [Boolean] success
# @param [Boolean] address_edited
# @param [Hash] pii_like_keypaths
# @param [Hash] errors
# @param [Hash] error_details
# User submitted an idv address
def idv_address_submitted(
success:,
errors:,
address_edited: nil,
pii_like_keypaths: nil,
error_details: nil,
**extra
)
track_event(
'IdV: address submitted',
success: success,
errors: errors,
address_edited: address_edited,
pii_like_keypaths: pii_like_keypaths,
error_details: error_details,
**extra,
)
end

# @identity.idp.event_name Idv Address Visit
# User visited idv address page
def idv_address_visit
track_event('IdV: address visited')
end

# @deprecated
# A user has downloaded their personal key. This event is no longer emitted.
# @identity.idp.event_name IdV: personal key downloaded
Expand Down