DC-474: fix missing analytics events on login pages#358
Open
adbergen wants to merge 1 commit into
Open
Conversation
Contributor
Author
QA Summary — feature/DC-474-login-page-eventsWhat ChangedAdded missing analytics events to the login pages for both DC and CO so the auth funnel can be measured end-to-end. Previously, only generic CTA-click tracking fired when users initiated sign-in; the domain-level "user started auth" event was missing in both states.
No UI changes are visible to users. The changes are purely instrumentation, observable in the browser's DevTools console and the analytics vendor (Mixpanel) Network requests. Affected Areas
Test CasesHappy Path — DC
Happy Path — CO
Edge Cases
Regression Checks
Test Credentials
Environment Notes
|
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.
🔗 Jira ticket
https://codeforamerica.atlassian.net/browse/DC-474
✍️ Description
On both DC and CO login pages, the domain-level "user initiated auth" event was missing — only the generic
cta_clickwas firing. This left a gap in the auth funnel: analytics could see which button was pressed but not how many users entered the auth flow./login, email + OTP):LoginFormnow firesotp_requestimmediately after client-side email validation passes and before the API call. Mirrors the existing pattern inVerifyOtpForm(which firesotp_requeston resend, plusotp_challenge/otp_result)./login, OIDC redirect to MyColorado):COLoginPagenow fires a newoidc_startevent the moment the user clicks either auth button. Naming is distinct fromotp_requestbecause the flows are mechanically different (OIDC handoff to an external IdP vs. portal-owned OTP) and analytics needs to compare the funnels independently. Confirmed in #DC-474 thread (Morgan: "No, I was saying in addition" — bothcta_clickandoidc_startshould fire).data-analytics-cta(login_ctafor the primary / current-language button,login_cta_alt_langfor the secondary / other-language button) so the existing global CTA delegation also picks them up.OIDC_STARTconstant added topackages/analytics/src/events.tsunder the Authentication section.🔗 Links to related PRs
None.
✅ Completion tasks