Skip to content

Record what visitors do on the login screen before leaving - #1047

Merged
fgatti675 merged 1 commit into
mainfrom
instrument-login-screen
Nov 17, 2026
Merged

fgatti675 merged 1 commit into
mainfrom
instrument-login-screen

Conversation

@fgatti675

Copy link
Copy Markdown
Member

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_displayed and *_attempt, with nothing in between, so someone arriving with no Google session, someone balking at the cloud-platform permissions 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

Event What it adds
view_displayed now carries terms_required, admin_scopes and layout (narrow/wide), so a phone-only drop-off is visible as such
terms_toggled engagement with the consent gate itself
terms_required_blocked now carries times_blocked for that visitor
view_abandoned the point of the change — fires when someone leaves having attempted nothing, with seconds_on_screen, terms_accepted and times_blocked

view_abandoned listens on pagehide, which fires on mobile where beforeunload does 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_displayed dependency array is deliberately untouched.

Testing

packages/firecms_cloud has no component test harness (its test script is node --test over 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 the firecmsco/saas app suite, which aliases @firecms/cloud to this source: 409 passing, 37 files.

Worth a second pair of eyes on the pagehide + unmount guard pairing in particular.


Generated by Claude Code

…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
@fgatti675
fgatti675 merged commit d139c76 into main Nov 17, 2026
4 checks passed
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.

2 participants