Merged
Conversation
added 2 commits
April 2, 2025 11:56
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds a new login funnel to standardize and improve logging of user interactions during the login process. Key changes include:
- Creating a dedicated Funnel and LoginEvents in the analytics module.
- Replacing several direct analytics event calls with loginFunnel trigger invocations across multiple files.
- Initializing and integrating the login funnel in authentication flows and components.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/frontend/src/utils/iiConnection.ts | Replaces analytics event calls with loginFunnel triggers for webauthn start events but removes error event logging. |
| src/frontend/src/utils/analytics/loginFunnel.ts | Introduces the LoginEvents enum and a new loginFunnel instance for consistent tracking. |
| src/frontend/src/flows/authorize/postMessageInterface.ts | Initializes the login funnel within the authentication protocol with a TODO to add origin data. |
| src/frontend/src/components/authenticateBox/index.ts | Adds loginFunnel trigger calls for various user actions during the authentication flow. |
Comments suppressed due to low confidence (1)
src/frontend/src/utils/iiConnection.ts:470
- The logging for lookup errors has been removed without a corresponding loginFunnel trigger. Consider adding an appropriate error trigger to maintain consistent event tracking for failure scenarios.
analytics.event("login-passkey-error-lookup");
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.
Motivation
Create a funnel to track the user during logging from an application.
Changes
This pull request introduces significant enhancements to the login flow by integrating a new analytics funnel to track user interactions.
Key changes include:
src/frontend/src/utils/analytics/loginFunnel.ts: Defined theLoginEventsenum and created a newFunnelinstance for login events to standardize the logging of user interactions during the login process.src/frontend/src/components/authenticateBox/index.ts: Added triggers for various login events such asTriggerUseExisting,TriggerListItem, andGoUseExistingto theloginFunnelto track user actions during the authentication process.src/frontend/src/flows/authorize/postMessageInterface.ts: Initialized theloginFunnelin theauthenticationProtocolfunction to start tracking login-related events.src/frontend/src/utils/iiConnection.ts: Replaced severalanalytics.eventcalls withloginFunneltriggers to streamline the event logging process and ensure consistency.Tests
Tested locally that events are triggered as expected along the login flow, but not registration (except the "start-login" which is expected to be triggered)
🟡 Some screens were changed