Repository navigation
Conversation
- Word card: save-login-prompt_viewed fires once per word view when "Login to save this phrase" shows (a new word or a new view resets it). Clicking it sends save-login-prompt_clicked. - OpenLoginWindowMessage carries a source (save_prompt, practice, popup). The background puts it on the login window URL (popup.html#/login?source=...), and LoginView reads it. No source means the toolbar popup. - user_logged-in gains source. New login_failed with source and reason: window_closed (Google consent window closed), google_error (no Google token), server_error (our server failed or sent no token, or the password login was rejected). - The Google flow no longer stores an empty token when the server reply has none; it counts as a failed login. - practice-now_login-clicked is kept. - Tests: tests/save-login-prompt.test.ts, tests/login-analytics.test.ts. Work list: subturtle-doc docs/tech/analytics-fixes-implementation.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 16, 2026
Closed
Collaborator
Author
|
Replaced by #62, which combines all extension rows (E-01 to E-06) into one PR. |
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.
What
New and changed events for the "Login to save this phrase" path:
save-login-prompt_viewedsave-login-prompt_clickeduser_logged-insourcelogin_failed(new)source,reasonsource:save_prompt(word card),practice(practice page),popup(toolbar popup, or no source).reason:window_closed: the user closed the Google consent window.google_error: Google gave no token (also the "Current Chrome User" button when Chrome has no token).server_error: our server failed or sent no token, or the email/password login was rejected.practice-now_login-clickedis kept.How the source reaches the login window
The login runs in a separate window (
popup.html#/login), opened by the background. SoOpenLoginWindowMessagenow carries an optionalsource. The background adds it to the URL (#/login?source=save_prompt).LoginViewreads it from the route.Why
94% of people who look up a word are not logged in. They see this button instead of Save, but we could not tell if they ignore it, click it, or click it and fail. Work list: subturtle-doc
docs/tech/analytics-fixes-implementation.md(row E-03). The funnel viewed → clicked →user_logged-in(sourcesave_prompt) →phrase_savednow works in Mixpanel.Small fix on the way
In the Google flow, a server reply with no token used to be stored as a login (an empty token). Now it counts as
login_failedwithserver_error, and nothing is stored.How tested
tests/save-login-prompt.test.ts(viewed once, again for a new word, not for a logged-in user, clicked + source) andtests/login-analytics.test.ts(helpers, source onuser_logged-in, each failure reason).yarn typecheck: clean.yarn test: 42 files, 370 tests pass.yarn build: OK.npx playwright test tests/e2e/password-login.spec.ts: 4 passed (this spec drivesLoginView).Dependencies
🤖 Generated with Claude Code