Skip to content

Report where each tab keeps its project as a user property - #1438

Merged
microbit-matt-hillsdon merged 1 commit into
home-pagefrom
storage-mode-analytics
Nov 20, 2026
Merged

microbit-matt-hillsdon merged 1 commit into
home-pagefrom
storage-mode-analytics

Conversation

@microbit-matt-hillsdon

Copy link
Copy Markdown
Collaborator

The session-storage fallback costs code and test surface, and we do not know how many sessions use it. This adds a project_storage user property so we can decide whether to keep it.

Value Meaning
database The projects database opened (IndexedDB).
session_no_indexeddb Session-storage fallback: the browser has no indexedDB.
session_open_failed Session-storage fallback: IndexedDB exists but the database would not open.
host Iframe controller mode, where the embedding page keeps the project.

The first three are set in openProjectsDatabase. host is set at boot in App.tsx, as iframe mode never opens the database.

session_open_failed covers both a database from a newer version of the editor and any other open failure. Other failures already go to the error log, so they are not split here.

For manual follow-up

  • Register project_storage as a user-scoped custom dimension in GA4, or it will not appear in reports.
  • When reading the numbers, compare users rather than page views: the property is set once the database has opened or failed to, so the first page_view of a visit does not carry it.

The session-storage fallback costs code and test surface, and we do not
know how many sessions use it. project_storage says whether a tab is on
the projects database, on the fallback because the browser has no
IndexedDB, on the fallback because the database would not open, or in
iframe controller mode where the embedding page keeps the project.
@github-actions

Copy link
Copy Markdown

Preview build will be at
https://review-python.microbit.org/storage-mode-analytics/

@microbit-matt-hillsdon

Copy link
Copy Markdown
Collaborator Author

I created the user-scoped dimension.

@microbit-matt-hillsdon
microbit-matt-hillsdon merged commit a829321 into home-page Nov 20, 2026
4 checks passed
@microbit-matt-hillsdon
microbit-matt-hillsdon deleted the storage-mode-analytics branch November 20, 2026 19:03
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.

1 participant