-
Notifications
You must be signed in to change notification settings - Fork 112
/
analytics_events.rb
7173 lines (6842 loc) · 260 KB
/
analytics_events.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# frozen_string_literal: true
# ______________________________________
# / Adding something new in here? Please \
# \ keep methods sorted alphabetically. /
# --------------------------------------
# \ ^__^
# \ (oo)\_______
# (__)\ )\/\
# ||----w |
# || ||
module AnalyticsEvents
# @param [Boolean] success Check whether threatmetrix succeeded properly.
# @param [String] transaction_id Vendor-specific transaction ID for the request.
# @param [String, nil] client Client user was directed from when creating account
# @param [array<String>, nil] errors error response from api call
# @param [String, nil] exception Error exception from api call
# @param [Boolean] timed_out set whether api call timed out
# @param [String] review_status TMX decision on the user
# @param [String] account_lex_id LexID associated with the response.
# @param [String] session_id Session ID associated with response
# @param [Hash] response_body total response body for api call
# Result when threatmetrix is completed for account creation and result
def account_creation_tmx_result(
client:,
success:,
errors:,
exception:,
timed_out:,
transaction_id:,
review_status:,
account_lex_id:,
session_id:,
response_body:,
**extra
)
track_event(
:account_creation_tmx_result,
client:,
success:,
errors:,
exception:,
timed_out:,
transaction_id:,
review_status:,
account_lex_id:,
session_id:,
response_body:,
**extra,
)
end
# @param [Boolean] success
# When a user submits a form to delete their account
def account_delete_submitted(success:, **extra)
track_event('Account Delete submitted', success: success, **extra)
end
# When a user visits the page to delete their account
def account_delete_visited
track_event('Account Delete visited')
end
# @param [String] request_came_from the controller/action the request came from
# When a user deletes their account
def account_deletion(request_came_from:, **extra)
track_event('Account Deletion Requested', request_came_from: request_came_from, **extra)
end
# @identity.idp.previous_event_name Account Reset
# @param [Boolean] success Whether form validation was successful
# @param [Hash] errors Errors resulting from form validation
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# @param [String] user_id
# @param [String, nil] message_id from AWS Pinpoint API
# @param [String, nil] request_id from AWS Pinpoint API
# An account reset was cancelled
def account_reset_cancel(
success:,
errors:,
user_id:,
error_details: nil,
message_id: nil,
request_id: nil,
**extra
)
track_event(
'Account Reset: cancel',
success:,
errors:,
error_details:,
user_id:,
message_id:,
request_id:,
**extra,
)
end
# @identity.idp.previous_event_name Account Reset
# @param [String] user_id
# @param [Boolean] success Whether form validation was successful
# @param [Hash] errors Errors resulting from form validation
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# Validates the token used for cancelling an account reset
def account_reset_cancel_token_validation(
user_id:,
success:,
errors:,
error_details: nil,
**extra
)
track_event(
'Account Reset: cancel token validation',
user_id:,
success:,
errors:,
error_details:,
**extra,
)
end
# @identity.idp.previous_event_name Account Reset
# @param [Boolean] success Whether form validation was successful
# @param [String] user_id
# @param [Integer, nil] account_age_in_days number of days since the account was confirmed
# @param [Time] account_confirmed_at date that account creation was confirmed
# (rounded) or nil if the account was not confirmed
# @param [Hash] mfa_method_counts Hash of MFA method with the number of that method on the account
# @param [Boolean] identity_verified if the deletion occurs on a verified account
# @param [Hash] errors Errors resulting from form validation
# @param [String, nil] profile_idv_level shows how verified the user is
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# An account has been deleted through the account reset flow
def account_reset_delete(
success:,
user_id:,
account_age_in_days:,
account_confirmed_at:,
mfa_method_counts:,
identity_verified:,
errors:,
profile_idv_level: nil,
error_details: nil,
**extra
)
track_event(
'Account Reset: delete',
success:,
user_id:,
account_age_in_days:,
account_confirmed_at:,
mfa_method_counts:,
profile_idv_level:,
identity_verified:,
errors:,
error_details:,
**extra,
)
end
# @identity.idp.previous_event_name Account Reset
# @param [String] user_id
# @param [Boolean] success Whether form validation was successful
# @param [Hash] errors Errors resulting from form validation
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# Validates the granted token for account reset
def account_reset_granted_token_validation(
success:,
errors:,
error_details: nil,
user_id: nil,
**extra
)
track_event(
'Account Reset: granted token validation',
success:,
errors:,
error_details:,
user_id:,
**extra,
)
end
# @identity.idp.previous_event_name Account Reset
# @param [Integer] count number of email notifications sent
# Account reset was performed, logs the number of email notifications sent
def account_reset_notifications(count:, **extra)
track_event('Account Reset: notifications', count: count, **extra)
end
# Tracks users visiting the recovery options page
def account_reset_recovery_options_visit
track_event('Account Reset: Recovery Options Visited')
end
# @identity.idp.previous_event_name Account Reset
# @param [Boolean] success
# @param [Hash] errors Errors resulting from form validation
# @param [Boolean] sms_phone does the user have a phone factor configured?
# @param [Boolean] totp does the user have an authentication app as a 2FA option?
# @param [Boolean] piv_cac does the user have PIV/CAC as a 2FA option?
# @param [Integer] email_addresses number of email addresses the user has
# @param [String, nil] message_id from AWS Pinpoint API
# @param [String, nil] request_id from AWS Pinpoint API
# An account reset has been requested
def account_reset_request(
success:,
errors:,
sms_phone:,
totp:,
piv_cac:,
email_addresses:,
request_id: nil,
message_id: nil,
**extra
)
track_event(
'Account Reset: request',
success:,
errors:,
sms_phone:,
totp:,
piv_cac:,
email_addresses:,
request_id:,
message_id:,
**extra,
)
end
# User visited the account deletion and reset page
def account_reset_visit
track_event('Account deletion and reset visited')
end
# When a user views the account page
def account_visit
track_event('Account Page Visited')
end
# @param [Boolean] success Whether form validation was successful
# @param [Hash] errors Errors resulting from form validation
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# @param [String] user_id User the email is linked to
# A user has clicked the confirmation link in an email
def add_email_confirmation(user_id:, success:, errors:, error_details: nil, **extra)
track_event(
'Add Email: Email Confirmation',
user_id:,
success:,
errors:,
error_details:,
**extra,
)
end
# @param [Boolean] success Whether form validation was successful
# @param [Hash] errors Errors resulting from form validation
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# @param [String] domain_name Domain name of email address submitted
# Tracks request for adding new emails to an account
def add_email_request(success:, errors:, domain_name:, error_details: nil, **extra)
track_event(
'Add Email Requested',
success:,
errors:,
error_details:,
domain_name:,
**extra,
)
end
# When a user views the add email address page
def add_email_visit
track_event('Add Email Address Page Visited')
end
# Tracks When users visit the add phone page
def add_phone_setup_visit
track_event(
'Phone Setup Visited',
)
end
# @identity.idp.previous_event_name TOTP: User Disabled
# Tracks when a user deletes their auth app from account
# @param [Boolean] success
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# @param [Integer] configuration_id
def auth_app_delete_submitted(
success:,
configuration_id:,
error_details: nil,
**extra
)
track_event(
:auth_app_delete_submitted,
success:,
error_details:,
configuration_id:,
**extra,
)
end
# When a user updates name for auth app
# @param [Boolean] success
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# @param [Integer] configuration_id
# Tracks when user submits a name change for an Auth App configuration
def auth_app_update_name_submitted(
success:,
configuration_id:,
error_details: nil,
**extra
)
track_event(
:auth_app_update_name_submitted,
success:,
error_details:,
configuration_id:,
**extra,
)
end
# When a user views the "you are already signed in with the following email" screen
def authentication_confirmation
track_event('Authentication Confirmation')
end
# When a user views the "you are already signed in with the following email" screen and
# continues with their existing logged-in email
def authentication_confirmation_continue
track_event('Authentication Confirmation: Continue selected')
end
# When a user views the "you are already signed in with the following email" screen and
# signs out of their current logged in email to choose a different email
def authentication_confirmation_reset
track_event('Authentication Confirmation: Reset selected')
end
# @param [DateTime] fraud_rejection_at Date when profile was rejected
# Tracks when a profile is automatically rejected due to being under review for 30 days
def automatic_fraud_rejection(fraud_rejection_at:, **extra)
track_event(
'Fraud: Automatic Fraud Rejection',
fraud_rejection_at: fraud_rejection_at,
**extra,
)
end
# Tracks when the user creates a set of backup mfa codes.
# @param [Integer] enabled_mfa_methods_count Number of enabled MFA methods on the account
# @param [Boolean] in_account_creation_flow Whether user is going through creation flow
def backup_code_created(enabled_mfa_methods_count:, in_account_creation_flow:, **extra)
track_event(
'Backup Code Created',
enabled_mfa_methods_count:,
in_account_creation_flow:,
**extra,
)
end
# Tracks when the user visits the Backup Code Regenerate page.
# @param [Boolean] in_account_creation_flow whether user is going through creation flow
def backup_code_regenerate_visit(in_account_creation_flow:, **extra)
track_event('Backup Code Regenerate Visited', in_account_creation_flow:, **extra)
end
# Track user creating new BackupCodeSetupForm, record form submission Hash
# @param [Boolean] success Whether form validation was successful
# @param [Hash] mfa_method_counts Hash of MFA method with the number of that method on the account
# @param [Integer] enabled_mfa_methods_count Number of enabled MFA methods on the account
# @param [Boolean] in_account_creation_flow Whether page is visited as part of account creation
# @param [Hash] errors Errors resulting from form validation
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
def backup_code_setup_visit(
success:,
mfa_method_counts:,
enabled_mfa_methods_count:,
in_account_creation_flow:,
errors:,
error_details: nil,
**extra
)
track_event(
'Backup Code Setup Visited',
success:,
errors:,
error_details:,
mfa_method_counts:,
enabled_mfa_methods_count:,
in_account_creation_flow:,
**extra,
)
end
# A user that has been banned from an SP has authenticated, they are redirected
# to a page showing them that they have been banned
def banned_user_redirect
track_event('Banned User redirected')
end
# A user that has been banned from an SP has authenticated, they have visited
# a page showing them that they have been banned
def banned_user_visited
track_event('Banned User visited')
end
# A user that had a broken personal key was routed to a page to regenerate their personal key,
# so that they no longer have a broken one
def broken_personal_key_regenerated
track_event('Broken Personal Key: Regenerated')
end
# Tracks users going back or cancelling acoount recovery
def cancel_account_reset_recovery
track_event('Account Reset: Cancel Account Recovery Options')
end
# User visits the "Are you sure you want to cancel and exit" page
def completions_cancellation_visited
track_event(:completions_cancellation_visited)
end
# User was logged out due to an existing active session
def concurrent_session_logout
track_event(:concurrent_session_logout)
end
# @param [String] redirect_url URL user was directed to
# @param [String, nil] step which step
# @param [String, nil] location which part of a step, if applicable
# @param ["idv", String, nil] flow which flow
# User was redirected to the login.gov contact page
def contact_redirect(redirect_url:, step: nil, location: nil, flow: nil, **extra)
track_event(
'Contact Page Redirect',
redirect_url: redirect_url,
step: step,
location: location,
flow: flow,
**extra,
)
end
# New device sign-in alerts sent after expired notification timeframe
# @param [Integer] count Number of emails sent
def create_new_device_alert_job_emails_sent(count:, **extra)
track_event(:create_new_device_alert_job_emails_sent, count:, **extra)
end
# @param [String] message the warning
# @param [Array<String>] unknown_alerts Names of alerts not recognized by our code
# @param [Hash] response_info Response payload
# Logged when there is a non-user-facing error in the doc auth process, such as an unrecognized
# field from a vendor
def doc_auth_warning(message: nil, unknown_alerts: nil, response_info: nil, **extra)
track_event(
'Doc Auth Warning',
message:,
unknown_alerts:,
response_info:,
**extra,
)
end
# @param [Boolean] required_password_change if user forced to change password
# When a user views the edit password page
def edit_password_visit(required_password_change: false, **extra)
track_event(
'Edit Password Page Visited',
required_password_change: required_password_change,
**extra,
)
end
# @param [Boolean] success Whether form validation was successful
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# @param [String] user_id UUID for user associated with attempted email address
# @param [Boolean] user_locked_out if the user is currently locked out of their second factor
# @param [Boolean] rate_limited Whether the user has exceeded user IP rate limiting
# @param [Boolean] valid_captcha_result Whether user passed the reCAPTCHA check or was exempt
# @param [Boolean] captcha_validation_performed Whether a reCAPTCHA check was performed
# @param [String] bad_password_count represents number of prior login failures
# @param [Boolean] sp_request_url_present if was an SP request URL in the session
# @param [Boolean] remember_device if the remember device cookie was present
# @param [Boolean, nil] new_device Whether the user is authenticating from a new device. Nil if
# the attempt was unsuccessful, since it cannot be known whether it's a new device.
# Tracks authentication attempts at the email/password screen
def email_and_password_auth(
success:,
user_id:,
user_locked_out:,
rate_limited:,
valid_captcha_result:,
captcha_validation_performed:,
bad_password_count:,
sp_request_url_present:,
remember_device:,
new_device:,
error_details: nil,
**extra
)
track_event(
'Email and Password Authentication',
success:,
error_details:,
user_id:,
user_locked_out:,
rate_limited:,
valid_captcha_result:,
captcha_validation_performed:,
bad_password_count:,
sp_request_url_present:,
remember_device:,
new_device:,
**extra,
)
end
# @param [Boolean] success Whether form validation was successful
# @param [Hash] errors Errors resulting from form validation
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# Tracks request for deletion of email address
def email_deletion_request(success:, errors:, error_details: nil, **extra)
track_event(
'Email Deletion Requested',
success:,
errors:,
error_details:,
**extra,
)
end
# @param [Boolean] success Whether form validation was successful
# @param [Hash] errors Errors resulting from form validation
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# Tracks if Email Language is updated
def email_language_updated(success:, errors:, error_details: nil, **extra)
track_event(
'Email Language: Updated',
success:,
errors:,
error_details:,
**extra,
)
end
# Tracks if Email Language is visited
def email_language_visited
track_event('Email Language: Visited')
end
# Logs after an email is sent
# @param [String] action type of email being sent
# @param [String, nil] ses_message_id AWS SES Message ID
# @param [Integer] email_address_id Database identifier for email address record
def email_sent(action:, ses_message_id:, email_address_id:, **extra)
track_event(
'Email Sent',
action: action,
ses_message_id: ses_message_id,
email_address_id: email_address_id,
**extra,
)
end
# @param [Boolean] success Whether form validation was successful
# @param [Hash] errors Errors resulting from form validation
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# @param [Time, nil] event_created_at timestamp for the event
# @param [Time, nil] disavowed_device_last_used_at
# @param [String, nil] disavowed_device_user_agent
# @param [String, nil] disavowed_device_last_ip
# @param [Integer, nil] event_id events table id
# @param [String, nil] event_type (see Event#event_type)
# @param [String, nil] event_ip ip address for the event
# @param [String, nil] user_id UUID of the user
# Tracks disavowed event
def event_disavowal(
success:,
errors:,
user_id:,
error_details: nil,
event_created_at: nil,
disavowed_device_last_used_at: nil,
disavowed_device_user_agent: nil,
disavowed_device_last_ip: nil,
event_id: nil,
event_type: nil,
event_ip: nil,
**extra
)
track_event(
'Event disavowal visited',
success:,
errors:,
error_details:,
event_created_at:,
disavowed_device_last_used_at:,
disavowed_device_user_agent:,
disavowed_device_last_ip:,
event_id:,
event_type:,
event_ip:,
user_id:,
**extra,
)
end
# @param [Boolean] success Whether form validation was successful
# @param [Hash] errors Errors resulting from form validation
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# @param [Time, nil] event_created_at timestamp for the event
# @param [Time, nil] disavowed_device_last_used_at
# @param [String, nil] disavowed_device_user_agent
# @param [String, nil] disavowed_device_last_ip
# @param [Integer, nil] event_id events table id
# @param [String, nil] event_type (see Event#event_type)
# @param [String, nil] event_ip ip address for the event
# @param [String, nil] user_id UUID of the user
# Event disavowal password reset was performed
def event_disavowal_password_reset(
success:,
errors:,
user_id:,
error_details: nil,
event_created_at: nil,
disavowed_device_last_used_at: nil,
disavowed_device_user_agent: nil,
disavowed_device_last_ip: nil,
event_id: nil,
event_type: nil,
event_ip: nil,
**extra
)
track_event(
'Event disavowal password reset',
success:,
errors:,
error_details:,
event_created_at:,
disavowed_device_last_used_at:,
disavowed_device_user_agent:,
disavowed_device_last_ip:,
event_id:,
event_type:,
event_ip:,
user_id:,
**extra,
)
end
# @param [Boolean] success Whether form validation was successful
# @param [Hash] errors Errors resulting from form validation
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# @param [Time, nil] event_created_at timestamp for the event
# @param [Time, nil] disavowed_device_last_used_at
# @param [String, nil] disavowed_device_user_agent
# @param [String, nil] disavowed_device_last_ip
# @param [Integer, nil] event_id events table id
# @param [String, nil] event_type (see Event#event_type)
# @param [String, nil] event_ip ip address for the event
# An invalid disavowal token was clicked
def event_disavowal_token_invalid(
success:,
errors:,
error_details: nil,
event_created_at: nil,
disavowed_device_last_used_at: nil,
disavowed_device_user_agent: nil,
disavowed_device_last_ip: nil,
event_id: nil,
event_type: nil,
event_ip: nil,
**extra
)
track_event(
'Event disavowal token invalid',
success:,
errors:,
error_details:,
event_created_at:,
disavowed_device_last_used_at:,
disavowed_device_user_agent:,
disavowed_device_last_ip:,
event_id:,
event_type:,
event_ip:,
**extra,
)
end
# User visited the events page
def events_visit
track_event('Events Page Visited')
end
# @param [String] redirect_url URL user was directed to
# @param [String, nil] step which step
# @param [String, nil] location which part of a step, if applicable
# @param ["idv", String, nil] flow which flow
# User was redirected to a page outside the IDP
def external_redirect(redirect_url:, step: nil, location: nil, flow: nil, **extra)
track_event(
'External Redirect',
redirect_url: redirect_url,
step: step,
location: location,
flow: flow,
**extra,
)
end
# The user chose to "forget all browsers"
def forget_all_browsers_submitted
track_event('Forget All Browsers Submitted')
end
# The user visited the "forget all browsers" page
def forget_all_browsers_visited
track_event('Forget All Browsers Visited')
end
# @param [Boolean] success Whether form validation was successful
# @param [Hash] errors Errors resulting from form validation
# @param [String] exception
# @param [String] profile_fraud_review_pending_at
# @param [Integer] profile_age_in_seconds How many seconds have passed since profile created
# The user was passed by manual fraud review
def fraud_review_passed(
success:,
errors:,
exception:,
profile_fraud_review_pending_at:,
profile_age_in_seconds:,
**extra
)
track_event(
'Fraud: Profile review passed',
success: success,
errors: errors,
exception: exception,
profile_fraud_review_pending_at: profile_fraud_review_pending_at,
profile_age_in_seconds: profile_age_in_seconds,
**extra,
)
end
# @param [Boolean] success Whether form validation was successful
# @param [Hash] errors Errors resulting from form validation
# @param [String] exception
# @param [String] profile_fraud_review_pending_at
# @param [Integer] profile_age_in_seconds How many seconds have passed since profile created
# The user was rejected by manual fraud review
def fraud_review_rejected(
success:,
errors:,
exception:,
profile_fraud_review_pending_at:,
profile_age_in_seconds:,
**extra
)
track_event(
'Fraud: Profile review rejected',
success: success,
errors: errors,
exception: exception,
profile_fraud_review_pending_at: profile_fraud_review_pending_at,
profile_age_in_seconds: profile_age_in_seconds,
**extra,
)
end
# @param [Boolean] success Whether records were successfully uploaded
# @param [String] exception The exception that occured if an exception did occur
# @param [Number] gpo_confirmation_count The number of GPO Confirmation records uploaded
# GPO confirmation records were uploaded for letter sends
def gpo_confirmation_upload(
success:,
exception:,
gpo_confirmation_count:,
**extra
)
track_event(
:gpo_confirmation_upload,
success: success,
exception: exception,
gpo_confirmation_count: gpo_confirmation_count,
**extra,
)
end
# User visited sign-in URL from the "You've been successfully verified email" CTA button
# @param issuer [String] the ServiceProvider.issuer
# @param campaign_id [String] the email campaign ID
def idv_account_verified_cta_visited(
issuer:,
campaign_id:,
**extra
)
track_event(
:idv_account_verified_cta_visited,
issuer:,
campaign_id:,
**extra,
)
end
# @param [Boolean] acuant_sdk_upgrade_a_b_testing_enabled
# @param [String] acuant_version
# @param ["hybrid","standard"] flow_path Document capture user flow
# @param [Boolean] isCameraSupported
# @param [Boolean] success
# @param [Boolean] use_alternate_sdk
# @param [Boolean] liveness_checking_required
# The Acuant SDK was loaded
# rubocop:disable Naming/VariableName,Naming/MethodParameterName
def idv_acuant_sdk_loaded(
acuant_sdk_upgrade_a_b_testing_enabled:,
acuant_version:,
flow_path:,
isCameraSupported:,
success:,
use_alternate_sdk:,
liveness_checking_required:,
**extra
)
track_event(
'Frontend: IdV: Acuant SDK loaded',
acuant_sdk_upgrade_a_b_testing_enabled: acuant_sdk_upgrade_a_b_testing_enabled,
acuant_version: acuant_version,
flow_path: flow_path,
isCameraSupported: isCameraSupported,
success: success,
use_alternate_sdk: use_alternate_sdk,
liveness_checking_required: liveness_checking_required,
**extra,
)
end
# rubocop:enable Naming/VariableName,Naming/MethodParameterName
# @param [Boolean] success Whether form validation was successful
# @param [Boolean] address_edited
# @param [Hash] errors Errors resulting from form validation
# @param [Hash] error_details Details for errors that occurred in unsuccessful submission
# User submitted an idv address
def idv_address_submitted(
success:,
errors:,
address_edited: nil,
error_details: nil,
**extra
)
track_event(
'IdV: address submitted',
success: success,
errors: errors,
address_edited: address_edited,
error_details: error_details,
**extra,
)
end
# User visited idv address page
def idv_address_visit(**extra)
track_event('IdV: address visited', **extra)
end
# @param [String] acuantCaptureMode
# @param [Boolean] acuant_sdk_upgrade_a_b_testing_enabled
# @param [String] acuant_version
# @param [Boolean] assessment
# @param [Integer] captureAttempts number of attempts to capture / upload an image
# (previously called "attempt")
# @param [String] documentType
# @param [Integer] dpi dots per inch of image
# @param [Integer] failedImageResubmission
# @param [String] fingerprint fingerprint of the image added
# @param [String] flow_path whether the user is in the hybrid or standard flow
# @param [Integer] glare
# @param [Integer] glareScoreThreshold
# @param [Integer] height height of image added in pixels
# @param [Boolean] isAssessedAsBlurry
# @param [Boolean] isAssessedAsGlare
# @param [Boolean] isAssessedAsUnsupported
# @param [String] mimeType MIME type of image added
# @param [Integer] moire
# @param [Integer] sharpness
# @param [Integer] sharpnessScoreThreshold
# @param [Integer] size size of image added in bytes
# @param [String] source
# @param [Boolean] use_alternate_sdk
# @param [String] liveness_checking_required Whether or not the selfie is required
# @param [Integer] width width of image added in pixels
# Back image was added in document capture
# rubocop:disable Naming/VariableName,Naming/MethodParameterName
def idv_back_image_added(
acuantCaptureMode:,
acuant_sdk_upgrade_a_b_testing_enabled:,
acuant_version:,
assessment:,
captureAttempts:,
documentType:,
dpi:,
failedImageResubmission:,
fingerprint:,
flow_path:,
glare:,
glareScoreThreshold:,
height:,
isAssessedAsBlurry:,
isAssessedAsGlare:,
isAssessedAsUnsupported:,
mimeType:,
moire:,
sharpness:,
sharpnessScoreThreshold:,
size:,
source:,
use_alternate_sdk:,
liveness_checking_required:,
width:,
**extra
)
track_event(
'Frontend: IdV: back image added',
acuantCaptureMode: acuantCaptureMode,
acuant_sdk_upgrade_a_b_testing_enabled: acuant_sdk_upgrade_a_b_testing_enabled,
acuant_version: acuant_version,
assessment: assessment,
captureAttempts: captureAttempts,
documentType: documentType,
dpi: dpi,
failedImageResubmission: failedImageResubmission,
fingerprint: fingerprint,
flow_path: flow_path,
glare: glare,
glareScoreThreshold: glareScoreThreshold,
height: height,
isAssessedAsBlurry: isAssessedAsBlurry,
isAssessedAsGlare: isAssessedAsGlare,
isAssessedAsUnsupported: isAssessedAsUnsupported,
mimeType: mimeType,
moire: moire,
sharpness: sharpness,
sharpnessScoreThreshold: sharpnessScoreThreshold,
size: size,
source: source,
use_alternate_sdk: use_alternate_sdk,
liveness_checking_required: liveness_checking_required,
width: width,
**extra,
)
end
# @param [Boolean] acuant_sdk_upgrade_a_b_testing_enabled
# @param [String] acuant_version
# @param ["hybrid","standard"] flow_path Document capture user flow
# @param [Boolean] isDrop
# @param [Boolean] click_source
# @param [Boolean] use_alternate_sdk
# @param [Number] captureAttempts count of image capturing attempts
# @param [String] liveness_checking_required Whether or not the selfie is required
def idv_back_image_clicked(
acuant_sdk_upgrade_a_b_testing_enabled:,
acuant_version:,
flow_path:,
isDrop:,
click_source:,
use_alternate_sdk:,
captureAttempts:,
liveness_checking_required:,
**extra
)
track_event(
'Frontend: IdV: back image clicked',
acuant_sdk_upgrade_a_b_testing_enabled: acuant_sdk_upgrade_a_b_testing_enabled,
acuant_version: acuant_version,
flow_path: flow_path,
isDrop: isDrop,
click_source: click_source,
use_alternate_sdk: use_alternate_sdk,
liveness_checking_required: liveness_checking_required,
captureAttempts: captureAttempts,
**extra,
)
end
# rubocop:enable Naming/VariableName,Naming/MethodParameterName
# @param [String] liveness_checking_required Whether or not the selfie is required
def idv_barcode_warning_continue_clicked(liveness_checking_required:, **extra)
track_event(
'Frontend: IdV: barcode warning continue clicked',
liveness_checking_required: liveness_checking_required,
**extra,
)
end