Use origin on login and registration funnel#2985
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances analytics funnel initialization by incorporating the request origin into both login and registration funnels for the authentication protocol and adjusting their initialization in the manage flow.
- Updated authenticationProtocol to pass the origin to both funnels.
- Adjusted funnel initialization in the default (manage) flow to initialize without origin.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/frontend/src/index.ts | Added loginFunnel import and updated funnel initialization order. |
| src/frontend/src/flows/authorize/postMessageInterface.ts | Updated funnel initialization to pass the request origin. |
sea-snake
approved these changes
Apr 2, 2025
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
Enable filtering the funnel per application.
Changes
This pull request includes changes to improve the initialization of analytics funnels and the authentication protocol in the frontend code. The most important changes include initializing both
loginFunnelandregistrationFunnelwith the request origin, and ensuring funnels are initialized in the manage flow (when user doesn't come from a dapp).Improvements to analytics funnels:
src/frontend/src/flows/authorize/postMessageInterface.ts: Initialized bothloginFunnelandregistrationFunnelwith the request origin in theauthenticationProtocolfunction.src/frontend/src/index.ts: Initialized bothloginFunnelandregistrationFunnelin the default flow without origin.src/frontend/src/index.ts: Removed redundantregistrationFunnel.init()call in the#authorizehash routing.Tests
Tested locally that events are triggered as expected.
🟡 Some screens were changed