Repository navigation
sign in analytics - #191
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
A moderate active issue remains in src/js/app.js that can suppress the first user prompt’s “Prompt Sent” analytics event when a composer send is queued behind an automatic or resumed send.
1 open issue
What changed in this PR
Adds sign-in funnel analytics across composer sends and authentication entry points, recording prompt sign-in state and sign-in outcomes.
Changes:
- Tracks
Prompt Sentevents for composer-initiated prompts. - Tracks
Sign In Resultevents across send, button, template, voice, and account-menu flows. - Adds focused regression coverage and registers the analytics test in the standard suite.
| File | Description |
|---|---|
| src/js/voice-input.js | Labels voice-input authentication requests with their analytics source. |
| src/js/ui.js | Adds source tracking for toolbar and account-menu authentication flows. |
| src/js/templates.js | Labels template-triggered authentication requests for sign-in analytics. |
| src/js/app.js | Implements sign-in analytics helpers, source-aware authentication, result tracking, and prompt tracking. |
| scripts/test-sign-in-analytics.mjs | Adds regression coverage for sign-in results, prompt tracking, and authentication sources. |
| scripts/test-message-queue.mjs | Updates message-queue assertions for source-aware authentication calls. |
| scripts/test-composer-drafts.mjs | Updates composer-draft assertions for source-aware authentication calls. |
| package.json | Registers the sign-in analytics test in the project test suite. |
Review effort: Lite
Comment on lines
+5481
to
+5483
| if (!_promptSentTracked && userInput == null && chat_input_message == null && !opts.resume && !opts.queued) { | ||
| _promptSentTracked = true; | ||
| window.track?.('Prompt Sent', { signed_in: isSignedInNow() }); |
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.

No description provided.