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
1 change: 1 addition & 0 deletions app/controllers/frontend_log_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class FrontendLogController < ApplicationController
'IdV: personal key submitted' => :idv_personal_key_submitted,
'IdV: personal key confirm visited' => :idv_personal_key_confirm_visited,
'IdV: personal key confirm submitted' => :idv_personal_key_confirm_submitted,
'IdV: download personal key' => :idv_personal_key_downloaded,
}.transform_values { |method| AnalyticsEvents.instance_method(method) }.freeze

def create
Expand Down
5 changes: 5 additions & 0 deletions app/javascript/packs/personal-key-page-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,14 @@ function downloadForIE(event) {
window.navigator.msSaveBlob(blob, filename);
}

function trackDownload() {
trackEvent('IdV: download personal key');
}

modalTrigger.addEventListener('click', show);
modalDismiss.addEventListener('click', hide);
formEl.addEventListener('submit', handleSubmit);
downloadLink.addEventListener('click', trackDownload);

if (window.navigator.msSaveBlob) {
downloadLink.addEventListener('click', downloadForIE);
Expand Down
1 change: 0 additions & 1 deletion app/services/analytics_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@ def idv_personal_key_submitted
track_event('IdV: personal key submitted')
end

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