feat: Guided Tours Completion Metrics#2412
Draft
camielvs wants to merge 1 commit into
Draft
Conversation
🎩 PreviewA preview build has been created at: |
This was referenced Jun 12, 2026
Collaborator
Author
2cfbe6e to
586e87d
Compare
61e99a7 to
e5de95e
Compare
586e87d to
6bffb2c
Compare
3 tasks
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.

Description
Tours can now be marked as completed and restarted, and we capture progression telemetry so we can see how tours are used and where people bounce off.
Completion state is persisted per user on the backend via
/api/users/me/settings(key:completed_tours) — read with TanStack Query and updated with a read-modify-write PATCH, so it survives across sessions/devices and sits alongside any other user settings without overwriting them. There is no local-storage layer: when no backend is available (e.g. offline / GitHub Pages) completion state simply doesn't surface, which is acceptable for this low-stakes feature and can be revisited later.We deliberately do not resume partially-finished tours — restarting always begins from the first step — so no in-progress state is surfaced.
User-facing
Telemetry (analytics events, independent of the settings store)
learning_hub.tours.start— now carriesis_restartto distinguish redos from first runs.learning_hub.tours.step_viewed— fired once per step reached (step_index,step_count,interaction); gives a step-by-step drop-off funnel.learning_hub.tours.completed— on reaching the final step (step_count,completion_count,previously_completed,duration_ms).learning_hub.tours.exited— on leaving before completion (furthest_step,percent_complete,duration_ms,previously_completed) — the "bounce" signal.Together these cover issue 640's item 2 (how many started/completed, and how far users get before exiting).
Related Issue and Pull requests
Closes https://github.com/Shopify/oasis-frontend/issues/640
Note
Cross-device persistence depends on the backend
/api/users/me/settingsroute doing a key-level merge of thesettingsdict (confirmed) socompleted_toursis appended alongside other keys rather than replacing them.Type of Change
Checklist
Screenshots (if applicable)
Test Instructions
/api/users/me/settings). In DevTools, theGET .../api/users/me/settings?setting_names=completed_toursreturns thecompleted_toursmap; completing a tour fires aPATCHthat includes the full map undersettings.completed_tours.learning_hub.tours.exitedevent fires withfurthest_step. Walk a tour to the end →learning_hub.tours.completedfires; each step emitsstep_viewed.Additional Comments
completed_tourswrite is last-write-wins against the cached map within a session — a completion added by another tab/device between our GET and PATCH could be missed. Negligible here; true per-entry safety would require the backend to deep-mergecompleted_tours.