LG-7205: Add logging for initial in-person step visits, submissions#6918
Merged
LG-7205: Add logging for initial in-person step visits, submissions#6918
Conversation
So that it's logged correctly in analytics
**Why**: So that we have better insight into the user's journey through the in-person proofing flow. changelog: Upcoming Features, In-person proofing, Improve analytics for in-person proofing actions
aduth
commented
Sep 6, 2022
app/javascript/packages/document-capture/components/in-person-prepare-step.tsx
Outdated
Show resolved
Hide resolved
aduth
commented
Sep 6, 2022
Appease linter
aduth
commented
Sep 6, 2022
app/javascript/packages/document-capture/hooks/use-step-logger.ts
Outdated
Show resolved
Hide resolved
Contributor
Author
|
I'm going to revert this back to draft status while I think through #6918 (comment) a bit more. I'm considering revising the approach to one where const { setSubmitEventMetadata } = useContext(AnalyticsContext);
setSubmitEventMetadata({ location: '...' });const { trackStepSubmit } = useContext(AnalyticsContext);
return <FormSteps onStepSubmit={trackStepSubmit} />; |
To centralize storage of step metadata Reverts to string step names (for now) to avoid dependency cycle between analytics context and steps
Use provider wrapper to handle creation of full context value
Contributor
Author
This is now addressed as part of the revised approach in d46eda7. |
**Why**: - Prevent multiple event logging if user were to click multiple times in quick succession - Present feedback to user for pending network request before navigation
Contributor
Author
|
I made a small revision in 1874c93 to use a
|
aduth
added a commit
that referenced
this pull request
Sep 9, 2022
**Why**: - To avoid confusion where a developer would expect analytics method parameters to be fulfilled from the frontend payload (#6791) - To ensure that all of the analytics methods are explicit and documented in the parameters they're expecting See: #6918 (comment) changelog: Internal, Analytics, Improve frontend analytics payload documentation
Merged
aduth
added a commit
that referenced
this pull request
Sep 12, 2022
* Build frontend analytics method parameters from method signature **Why**: - To avoid confusion where a developer would expect analytics method parameters to be fulfilled from the frontend payload (#6791) - To ensure that all of the analytics methods are explicit and documented in the parameters they're expecting See: #6918 (comment) changelog: Internal, Analytics, Improve frontend analytics payload documentation * Fix YARDoc parameter name documentation * Restore flow path parameter to front-end mapped events * Add flow_path handling to specs * Destructure, use compact for kwarg aggregation * Extract hash_from_method_kwargs to service class See: #6927 (comment) * Extract FrontendLogger service class from FrontendLogController See: #6927 (comment) * Remove leftover code from earlier iterations * Collapse MethodSignatureHashBuilder to FrontendLogger See: #6927 (comment)
aduth
added a commit
that referenced
this pull request
Sep 12, 2022
* Refactor step indicator as ViewComponent component (#6910) **Why**: - All the standard benefits of ViewComponent (better separation of view and logic, testability, performance, etc) - Toward a consistent reusable UI component library - Remove more unused "pending" status logic [skip changelog] * LG-7305 Make sure ThreatMetrix failure disables profile Part 2 (#6925) * LG-6497: Create and use new Memorable Date component in State ID step of IPP flow (#6713) * date strings in en * add uswds memorable date component to ruby components * wip on wrapper * LG-6497: Allow DateTime input to accept labels for each part of the date * error highlight showing for component * get inputs from memorable date fields * change input padding so numbers show * memorable date component spec * check date input by user is in the past * update textContent of err class with err message * display error message and state when date is in future or today * remove unused strings * move error msg to strings * refactor js file to ts * LG-6497: Update memorable date component to include validation * LG-6497: Improve validation and cover additional scenarios for memorable date component * LG-6497: Allow memorable date validation with multiple ranges * LG-6497: Add missing error messages; change error message without changing selected field * LG-6497: Integrate memorable date component into IPP state ID form * LG-6497: Correct lint errors * changelog: Upcoming Features, In-person proofing, Replace State ID date input with Memorable Date component * LG-6497: Work on internationalization and test fixes * LG-6497: Fix i18n errors and add component documentation * LG-6497: Write tests covering memorable date component rendering * LG-6497: Update InPersonHelper so tests use memorable date DOB component correctly * LG-6497: Remove extra line in memorable-date package.json Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov> * LG-6497: More semantically represent error message lookup filtering Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov> * LG-6497: Use more common idiom for filtering out null/empty values for memorable date inputs Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov> * Lg-6497: Remove unnecessary array type check Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov> * LG-6497: Simplify JS logic, ERB formatting, and CSS class for memorable date component * LG-6497: Get min/max attributes for memorable date using new Date() instead of Date.parse() * LG-6497: Prevent built-in errors from overriding custom errors * LG-6497: Follow JS lower camel case standard for naming error message fields * LG-6497: Allow conversion of additional types to ISO formats for min/max dates Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> * LG-6497: Update min/max docs to show additional types can be used Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> * LG-6497: Support date-like values for i18n conversion; update comments and docblock * LG-6497: Update comments * LG-6497: CSS code style fixes * LG-6497: Write tests for MemorableDateElement; refine regex for day to ensure valid day range is enforced * LG-6497: Rename parameter in forEach for clarity * LG-6497: Rename additional arrow function params for clarity * LG-6497: Prevent ValidatedFieldElement from changing focus away from inputs with errors * LG-6497: Ensure lg-validated-field selects correct error element * LG-6497: Add listeners to memorable date instead of child inputs * LG-6497: Update test to cover error message element selection via aria-describedby in lg-validated-field * LG-6497: Fix test lint issues * LG-6497: Start with error message element hidden to avoid inconsistent field spacing * LG-6497: Use tag_options; correct created error element ID; fix Safari issue; code cleanup * LG-6497: Update pattern in memorable date JS test * LG-6497: Update phone test to correctly use aria-describedby for find_by_id * LG-6497: Update send link test to correctly use aria-describedby for find_by_id Co-authored-by: Shannon Alexander <shannonalexander@Shannons-MBP.fios-router.home> Co-authored-by: Tim Bradley <timothy.bradley@gsa.gov> Co-authored-by: Shannon Alexander <shannonalexander@Shannons-MacBook-Pro.local> Co-authored-by: Tim Bradley <90272033+NavaTim@users.noreply.github.com> Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov> Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> * LG-6497: Minor style/doc fixes related to memorable date change (#6929) * LG-6497: Minor style/doc fixes * [skip changelog] * LG-7109 Add Event: IDV verification rate limited (#6928) * LG-7109 Add Event: IDV verification rate limited changelog: Internal, Attempts API, Track additional events * alphabetic order change * Enable Rubocop Style/MethodDefParentheses (#6930) **Why**: For consistency, and to reduce toil in code review. changelog: Internal, Linting, Enable new rules for Rubocop static analysis * LG-7429 | Login rate limit event (#6926) Trigger an AttemptEvent when a user is locked out for too many login attempts that fail. changelog: Internal, Attempts API, Login rate limit event * LG-7205: Add logging for initial in-person step visits, submissions (#6918) * Add missing flow_path parameter for API::DocumentCaptureController So that it's logged correctly in analytics * LG-7205: Add logging for initial step visits, submissions **Why**: So that we have better insight into the user's journey through the in-person proofing flow. changelog: Upcoming Features, In-person proofing, Improve analytics for in-person proofing actions * Remove parameters Appease linter * Manage step visit, submit events as part of AnalyticsContext To centralize storage of step metadata Reverts to string step names (for now) to avoid dependency cycle between analytics context and steps * Fix children type for AnalyticsProvider props * Add specs for InPersonLocationStep * Add specs for AnalyticsContextProvider * Resolve TypeScript errors for context value shape Use provider wrapper to handle creation of full context value * Absorb thrown network error in trackEvent * Add reference to spec * Use SpinnerButton for prepare step submission **Why**: - Prevent multiple event logging if user were to click multiple times in quick succession - Present feedback to user for pending network request before navigation * Avoid unnecessary variable assignment * LG-7396 Confirm connection to Lexis Nexis (#6931) * Add scripts to test call to lexis nexis Refactor scripts that call VA to get user's PII, so that it can also be used in the script to test Lexis Nexis Phone Finder call. changelog: Internal, Upcoming Features, Confirm Connection to Lexis Nexis (LG-7396) Add force failure switches Fix rubocop violations * Fix rubocop violations * LG-7194 Add Event: Account purged (#6934) changelog: Internal, Attempts API, Track additional events * LG-6497: Revert Memorable Date Changes (#6940) * Revert "LG-6497: Minor style/doc fixes related to memorable date change (#6929)" This reverts commit e0e8ad4. * Revert "LG-6497: Create and use new Memorable Date component in State ID step of IPP flow (#6713)" This reverts commit cead2c1. * [skip changelog] Co-authored-by: Steve Urciuoli <steve.urciuoli@gsa.gov> Co-authored-by: Shannon A <20867088+svalexander@users.noreply.github.com> Co-authored-by: Shannon Alexander <shannonalexander@Shannons-MBP.fios-router.home> Co-authored-by: Tim Bradley <timothy.bradley@gsa.gov> Co-authored-by: Shannon Alexander <shannonalexander@Shannons-MacBook-Pro.local> Co-authored-by: Tim Bradley <90272033+NavaTim@users.noreply.github.com> Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> Co-authored-by: olatifflexion <109746710+olatifflexion@users.noreply.github.com> Co-authored-by: Matt Wagner <mattwagner@navapbc.com> Co-authored-by: Gene M. Angelo, Jr <web.gma@gmail.com>
aduth
added a commit
that referenced
this pull request
Sep 15, 2022
* LG-6497: Revert Memorable Date Changes (#6940) * Revert "LG-6497: Minor style/doc fixes related to memorable date change (#6929)" This reverts commit e0e8ad4. * Revert "LG-6497: Create and use new Memorable Date component in State ID step of IPP flow (#6713)" This reverts commit cead2c1. * [skip changelog] * Build frontend analytics method parameters from method signature (#6927) * Build frontend analytics method parameters from method signature **Why**: - To avoid confusion where a developer would expect analytics method parameters to be fulfilled from the frontend payload (#6791) - To ensure that all of the analytics methods are explicit and documented in the parameters they're expecting See: #6918 (comment) changelog: Internal, Analytics, Improve frontend analytics payload documentation * Fix YARDoc parameter name documentation * Restore flow path parameter to front-end mapped events * Add flow_path handling to specs * Destructure, use compact for kwarg aggregation * Extract hash_from_method_kwargs to service class See: #6927 (comment) * Extract FrontendLogger service class from FrontendLogController See: #6927 (comment) * Remove leftover code from earlier iterations * Collapse MethodSignatureHashBuilder to FrontendLogger See: #6927 (comment) * LG-6497: Reintroduce Memorable Date on IPP State ID Page (#6943) * Revert "LG-6497: Revert Memorable Date Changes (#6940)" This reverts commit d2500a8. * [skip changelog] * Try to fix intermittent failure for in-person feature spec (#6933) **Why**: So that our builds pass reliably. changelog: Internal, Automated Testing, Reduce intermittent failures in automated testing * LG-7431 Logged In User Change Password (#6948) * LG-7431 Logged In User Change Password changelog: Internal, Attempts API, Track additional events * Qualify script rails executable properly with bin/ (#6951) changelog: Internal, Upcoming Features, Qualify script rails executable properly with bin/ * LG-6497: Workaround New Relic addEventListener bug and improve error styles (#6938) * LG-6497: Circumvent New Relic event bug * LG-6497: Ensure memorable date correctly assigns errors for error styling * [skip changelog] * Update app/javascript/packages/memorable-date/index.spec.ts Co-authored-by: Sheldon Bachstein <sheldon.bachstein@gsa.gov> * Revert "LG-6497: Revert Memorable Date Changes (#6940)" This reverts commit d2500a8. * [skip changelog] * Update app/javascript/packages/memorable-date/index.ts Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov> Co-authored-by: Sheldon Bachstein <sheldon.bachstein@gsa.gov> Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov> * Refactor PhoneFinder (#6920) This commit refactors the PhoneFinder proofer client so that it does not user the `Proofer::Base` super class any more. It converts the PhoneFinder proofer into a plain old ruby object with its own result object. [skip changelog] Co-authored-by: Jonathan Hooper <jonathan.hooper@gsa.gov> * ThreatMetrix JS verification (LG-7518) (#6937) * Add ThreatMetrix code signing cert to config Cert includes public key used to verify signature on ThreatMetrix Javascript * Add job to verify ThreatMetrix javascript Periodically request TMX JS and validate the signature at the end of the file * Remove stale job stuff * Don't hardcode test certs Generate keys / certs so we don't have scary-looking private keys in repo * Minor tweak to session_id arg changelog: Upcoming Features, ThreatMetrix, Periodically check signature on ThreatMetrix Javascript * Use pack to do hex-to-binary conversion * how do you spell Javascript * Fail if signing certificate is expired * Run ThreatMetrixJsVerificationJob on 1h intervals * Remove cert from application.default.yml will be in config, just not going to include in code * Lint * Trigger devops on merges to main. (#6944) * Trigger devops on merges to main. * typo * testing [skip changelog] * Only run on main * Update total-monthly-auths report to pull from the raw table (#6952) **Why**: We've found some discrepancies with the aggregated monthly table so this helps us have more precise reports changelog: Internal, Reporting, Update billing reports to be more accurate * Log digest of OIDC "code" param (LG-7440) (#6942) * Log digest of OIDC "code" param (LG-7440) **Why**: to assist with debugging requests from partners * Work around nil code **How**: By submitting the form a second time after the identity has been linked, because we need the session uuid from that linkage for the code, for the param. Somehow it was getting into the success_redirect_uri before changelog: Internal, Logging, Log hash of OpenID Connect "code" param Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov> * update ready to verify presenter to use enrollment_established_at (#6950) * update ready to verify presenter to use enrollment_established_at * [skip changelog] * refactor * fix lint errors * added new event for idv phone send link rate limit (#6958) changelog: Internal, Attempts API, Track additional events * Lg 7545 password change reauth (#6954) * LG-7545 Password Change Reauth Submit changelog: Internal, Attempts API, Track additional events * LG-7411 Analytics event for TM Proofing Failure Page (#6953) * added setup errors visited * Add redirect tracking to contact url on sorry page * add changelog changelog: Internal, Analytics, Add analytics to sorry for proofing page * add tracker method for contact page analytics * LG-6497: Set min date for State ID page to January 1, 1900 (#6960) * LG-6497: Set min date for State ID page to January 1, 1900; remove leading zero from day * [skip changelog] * LG-7203: Use DB for service provider IPP feature enablement (#6945) * LG-7203: Add in_person_proofing_enabled field to service_providers; update feature check to use new field * LG-7203: Replace use of hardcoded IPP issuer config and update tests * changelog: Upcoming Features, In-person proofing, Use DB for configuring service providers * LG-7203: Switch to leaner query query clear expected value for in_person_proofing_enabled * LG-7547-Password-Change-Reauthentication-Rate-Limit (#6955) * LG-7547-Password-Change-Reauthentication-Rate-Limit changelog: Internal, Attempts API, Track additional events * LG-7195 | Adds reproof completed event (#6957) changelog: Internal, Attempts API, Adds reproofing complete event * Update Password Change to Profile Change (#6962) changelog: Internal, Attempts API, Track additional events * Enforce YARD parameter documentation for tracker_events.rb, fix errors (#6964) [skip changelog] Co-authored-by: Tim Bradley <90272033+NavaTim@users.noreply.github.com> Co-authored-by: Luis H. Matos <ThatSpaceGuy@users.noreply.github.com> Co-authored-by: Gene M. Angelo, Jr <web.gma@gmail.com> Co-authored-by: Sheldon Bachstein <sheldon.bachstein@gsa.gov> Co-authored-by: Kimball Bighorse <kimball.bighorse@gsa.gov> Co-authored-by: Jonathan Hooper <jonathan.hooper@gsa.gov> Co-authored-by: Matt Hinz <matthinz@gmail.com> Co-authored-by: Alex Kritikos <alex.kritikos@gsa.gov> Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> Co-authored-by: Shannon A <20867088+svalexander@users.noreply.github.com> Co-authored-by: Rwolfe-Nava <87499456+Rwolfe-Nava@users.noreply.github.com> Co-authored-by: Alex Bradley <alexander.bradley@gsa.gov> Co-authored-by: Matt Wagner <mattwagner@navapbc.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why: So that we have better insight into the user's journey through the in-person proofing flow.
Previously, we did not have any logging for the location selection and preparation steps, since these occurred within the document capture React application.