Repository navigation
Record what visitors do on the login screen before leaving - #1047
Merged
Merged
Conversation
…re leaving Between a third and a half of everyone who reaches this screen never clicks any sign-in method: 31.0% in May 2026 rising to 42.4% in October, which was 117 people that month. The screen only emitted "shown" and "method clicked", so someone with no Google session, someone who balked at the permissions wording and someone who only wanted a demo were one undifferentiated number. The August change that made the gated buttons live was aimed at a guess about which of those it was, and the rate kept climbing afterwards. This adds the events that would tell them apart: - `view_displayed` now says what the screen offered: whether terms were required, whether admin scopes were requested, and whether the layout was the narrow one-column form, so a phone-only drop-off is visible as such. - `terms_toggled` records engagement with the consent gate itself. - `terms_required_blocked` carries how many times that visitor was stopped. - `view_abandoned` fires when someone leaves having attempted nothing, carrying time on screen, whether terms were ticked and how often they were blocked. It listens on `pagehide`, which fires on mobile where `beforeunload` does not, and on unmount for in-app navigation. Both paths are guarded so it is sent at most once, and never after an attempt, so a successful sign-in does not read as an abandonment. The callback is read through a ref in that effect because host apps pass a fresh closure each render, which would otherwise resubscribe and fire the cleanup on every render. Firing of the existing events is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011VZh1qoNGKbXQrrrFiDoeQ
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.
Between a third and a half of everyone who reaches the Cloud login screen never clicks any sign-in method: 31.0% in May 2026 rising to 42.4% in October, which was 117 people that month. Over the same period the share who logged in fell from 64.7% to 51.1%.
The screen only emitted
view_displayedand*_attempt, with nothing in between, so someone arriving with no Google session, someone balking at thecloud-platformpermissions wording and someone who only wanted a demo were one undifferentiated number. The comment above the consent gate already records that this has run at "roughly a third... steadily, for a year"; the August change that made the gated buttons live was aimed at a guess about which of those it was, and the rate kept climbing afterwards (31.4% in July, before it; 38.8% in September and 42.4% in October, after).This adds the events that would tell them apart, so the next attempt is not another guess.
Events
view_displayedterms_required,admin_scopesandlayout(narrow/wide), so a phone-only drop-off is visible as suchterms_toggledterms_required_blockedtimes_blockedfor that visitorview_abandonedseconds_on_screen,terms_acceptedandtimes_blockedview_abandonedlistens onpagehide, which fires on mobile wherebeforeunloaddoes not, plus unmount for in-app navigation. Both paths are guarded so it is sent at most once, and never after an attempt — a successful sign-in unmounts this view and must not read as an abandonment. The callback is read through a ref in that effect because host apps pass a fresh closure each render, which would otherwise resubscribe and fire the cleanup on every render.Firing of the existing events is unchanged; the
view_displayeddependency array is deliberately untouched.Testing
packages/firecms_cloudhas no component test harness (itstestscript isnode --testover two unrelated files), so there is no behavioural test for this file and I did not add a runner to the package. Verified by review plus a full run of thefirecmsco/saasapp suite, which aliases@firecms/cloudto this source: 409 passing, 37 files.Worth a second pair of eyes on the
pagehide+ unmount guard pairing in particular.Generated by Claude Code