Skip to content

Registration Funnel#2979

Merged
lmuntaner merged 3 commits intomainfrom
lm-registration-funnel
Apr 1, 2025
Merged

Registration Funnel#2979
lmuntaner merged 3 commits intomainfrom
lm-registration-funnel

Conversation

@lmuntaner
Copy link
Copy Markdown
Contributor

@lmuntaner lmuntaner commented Apr 1, 2025

Motivation

Track registration flow as described in the design doc of the analytics baseline.

The main change is the replacement of the analytics.event calls with a new registrationFunnel system to track registration events more systematically.

Changes

Tests

Tested locally that events are triggered along the registration flow.


🟡 Some screens were changed

@lmuntaner lmuntaner marked this pull request as ready for review April 1, 2025 12:33
@lmuntaner lmuntaner requested a review from Copilot April 1, 2025 12:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the registration event tracking system from individual analytics.event calls to a centralized registrationFunnel trigger approach for the registration flow. The changes include introducing a new registrationFunnel utility, updating SPA initialization in index.ts to initialize the funnel, and replacing various analytics.event calls in the registration flows (including passkey creation, registration steps, and finish events).

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/frontend/src/utils/analytics/registrationFunnel.ts Introduces the registrationFunnel utility and RegistrationEvents object
src/frontend/src/index.ts Initializes the registrationFunnel within SPA creation
src/frontend/src/flows/register/passkey.ts Replaces analytics.event calls with a funnel trigger for passkey creation
src/frontend/src/flows/register/index.ts Updates the registration flow event tracking to use the funnel trigger
src/frontend/src/flows/register/finish.ts Adds a funnel trigger when a user copies their new identity number
src/frontend/src/components/authenticateBox/index.ts Removes analytics.event calls related to registration events
Comments suppressed due to low confidence (8)

src/frontend/src/flows/register/passkey.ts:142

  • The success event for passkey creation was removed without a replacement. Consider adding a registrationFunnel.trigger call to track passkey creation success.
            analytics.event("construct-passkey-success");

src/frontend/src/flows/register/passkey.ts:145

  • The error event for passkey creation was removed without a corresponding replacement. If error tracking is required, add a registrationFunnel.trigger call for passkey errors.
            analytics.event("construct-passkey-error");

src/frontend/src/flows/register/index.ts:152

  • The 'registration-pin' event is removed without a replacement. Consider adding a registrationFunnel.trigger call if tracking of PIN registration is required.
      analytics.event("registration-pin");

src/frontend/src/flows/register/index.ts:182

  • The 'registration-openid' event is removed without being replaced. If openid registration tracking is needed, add a registrationFunnel.trigger call.
        analytics.event("registration-openid");

src/frontend/src/flows/register/index.ts:235

  • The 'registration-final-error' event is removed without a registrationFunnel alternative. Consider adding a corresponding trigger for final error events.
      analytics.event("registration-final-error");

src/frontend/src/flows/register/index.ts:536

  • The 'registration-start-error' event is removed without a replacement. Consider adding a registrationFunnel.trigger call to handle errors during registration start.
    analytics.event("registration-start-error");

src/frontend/src/flows/register/index.ts:548

  • The 'registration-captcha-cancelled' event is removed without a replacement. Consider triggering a funnel event to capture captcha cancellation events.
      analytics.event("registration-captcha-cancelled");

src/frontend/src/flows/register/index.ts:551

  • The 'registration-captcha-error' event is removed without a replacement. If captcha errors should be tracked, add a call to registrationFunnel.trigger.
      analytics.event("registration-captcha-error");

@lmuntaner lmuntaner requested review from LXIF and sea-snake April 1, 2025 12:39
Copy link
Copy Markdown
Contributor

@LXIF LXIF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lmuntaner lmuntaner added this pull request to the merge queue Apr 1, 2025
Merged via the queue into main with commit f367c91 Apr 1, 2025
72 checks passed
@lmuntaner lmuntaner deleted the lm-registration-funnel branch April 1, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants