Commit 4cb44e9
feat(telemetry): split nudge events by how the tour ended (#15107)
@MaanilVerma — **your call entirely; close it if you'd rather not.** I
owe you
context on why it's arriving as a PR eight days late rather than as a
question.
## The gap
`OnboardingTourNudgeMetadata` is `{ tour }` only, so `nudge_shown` and
`explore_templates_clicked` cannot be split by how the tour ended.
That matters more here than it would elsewhere, because **every ending
arms the
nudge** — deliberately, per your call in #14144: *"a user who saw no
tour is the
one who most needs somewhere to go next."* So the nudge's audience is
deliberately a mix of *finished the tour* and *never saw one*, and right
now the
funnel cannot tell those two apart. A conversion from someone who
completed the
walkthrough and one from someone the tour never started for land in the
same
bucket.
## The change
`tourWasCompleted` is already in scope in the component — it picks the
copy one
line above the telemetry call. This carries the same value onto both
events:
```ts
telemetry?.trackOnboardingTour('nudge_shown', {
tour: 'firstRun',
tour_completed: tourWasCompleted.value
})
```
Optional field, no new event, **no visibility rule changed**, nothing
added to
any other event.
## Verification
`FirstRunTourNudge.test.ts` **12/12**. The two existing assertions
pinned the
exact metadata shape, so they failed until updated — which is the suite
working.
Added one case asserting both events carry `false` when the tour did not
complete.
Mutation-checked: hard-coding `tour_completed: true` fails exactly that
new
case, 11 others still pass. `typecheck` and `format:check` clean.
## Why it's late
I drafted this as part of a Slack reply to you on **2026-08-04** and
never sent
it, so you have never actually seen the offer. That's the failure, not
the
telemetry. It was the one item in that draft still worth acting on — the
rest
of it has since been overtaken (the nudge copy landed in #14677, and
you've
since settled the OG image on #14957).
If you'd rather have the *full* ending instead of a boolean —
`completed` vs
`skipped` with its `skipReason` — say so and I'll rework it; the
controller has
`engine.lastEnding` and only exposes the boolean today. I went with the
boolean
because it needed no change to the controller's surface.
Co-authored-by: t <t@t.t>1 parent 2026348 commit 4cb44e9
3 files changed
Lines changed: 38 additions & 4 deletions
File tree
- src
- platform/telemetry
- renderer/extensions/firstRunTour/nudge
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
159 | 166 | | |
160 | 167 | | |
161 | 168 | | |
| |||
Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
226 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
227 | 250 | | |
228 | 251 | | |
229 | 252 | | |
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| |||
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
120 | | - | |
| 123 | + | |
| 124 | + | |
121 | 125 | | |
122 | 126 | | |
123 | 127 | | |
| |||
0 commit comments