Skip to content

My Jetpack: report what happens in the onboarding wizard - #52842

Merged
DevinWalker merged 4 commits into
add/my-jetpack-onboarding-stepsfrom
add/my-jetpack-onboarding-telemetry
Oct 20, 2026
Merged

DevinWalker merged 4 commits into
add/my-jetpack-onboarding-stepsfrom
add/my-jetpack-onboarding-telemetry

Conversation

@adampickering

@adampickering adampickering commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Both question steps in the onboarding wizard collected an answer and sent it nowhere, so there was no way to tell whether the flow works. This wires up the funnel.

Based on #52775 (which now includes the animation work from #52844), so the diff below is only the tracking. It retargets to trunk on its own once that merges.

What it reports

Every event carries the run's flow_id and the step's slug on top of what useAnalytics already adds.

Event Fires Its own properties
jetpack_my_jetpack_onboarding_wizard_step_view a step becomes visible none
jetpack_my_jetpack_onboarding_click "Get started" is clicked (shared with the single-screen flow) flow: 'wizard'
jetpack_my_jetpack_onboarding_connect_error registration or the hand-off fails error_code
jetpack_my_jetpack_onboarding_wizard_site_type_select an option is chosen site_type
jetpack_my_jetpack_onboarding_wizard_site_type_detail Continue on the site-type step, only for "Something else" length_bucket
jetpack_my_jetpack_onboarding_wizard_module_toggle a switch moves module, enabled
jetpack_my_jetpack_onboarding_wizard_step_complete Continue advances none
jetpack_my_jetpack_onboarding_wizard_apply_result the module switches resolve offered, switched_on (by this run only), failed
jetpack_my_jetpack_onboarding_wizard_complete the user finishes site_type
jetpack_my_jetpack_onboarding_wizard_skip the user skips or leaves none

There's no abandonment event. Abandonment is a step_view with no later complete or skip for the same flow_id.

A successful connection is calypso_jpc_authorize_success on WordPress.com, which already carries from: jetpack-onboarding-wizard. So the funnel is wizard click, then authorize success, with failures counted here by connect_error. That event stays until CONNECT-502 has the connection package record registration failures itself.

Decisions worth checking

  • The step is a slug, never an index. A connected site opens on the second step, so an index wouldn't mean the same screen for everyone.
  • The run id lives in sessionStorage. Connecting leaves wp-admin for WordPress.com and comes back to a fresh page, so without it the two halves of a run can't be joined. It's made with getRandomValues() where randomUUID() is missing (plain-HTTP wp-admin), ends when the user leaves the wizard, and falls back to none where storage is blocked.
  • One exit per run. A double click, or the finish link then the rail's, reports and settles once.
  • What someone types about their own site never leaves the browser. Only a length bucket is sent, once per run, when they press Continue. The test for this runs over every call the wizard makes, not just the one that handles the field.
  • Names are checked. Tracks silently drops events whose name misses Jetpack_Tracks_Event::EVENT_NAME_REGEX or whose property keys aren't snake_case, so a test asserts every name and key against both.

A limit to know before reading the numbers

Tracks only loads once the site has agreed to the terms or has a connected user (Tracking::should_enable_tracking() in packages/connection). On a fresh install the start screen's events queue and are never sent. That's the gate doing its job, but it means the denominator for the connect step has to come from the server side. Everything from step 2 on is complete.

Does this pull request change what data or activity we track or use?

Yes, the events above, only while the my-jetpack-onboarding-wizard flag is on. None of them are registered yet. They'll be registered in the Tracks registration tool once they've fired from a flag-on test site.

Testing instructions

The wizard is behind my-jetpack-onboarding-wizard, which is off. With it off nothing in this PR runs.

add_filter( 'jetpack_feature_flag_enabled_my-jetpack-onboarding-wizard', '__return_true' );

With it on, open the wizard on a site that has accepted the terms and watch window._tkq while going through it. You should see one flow_id across the whole run, step as a slug rather than a number, and, if you choose "Something else" and type, filled and length_bucket but never a word of what you wrote.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the add/my-jetpack-onboarding-telemetry branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack add/my-jetpack-onboarding-telemetry

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@jp-launch-control

jp-launch-control Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

No summary data is available for parent commit 8b73e40, so cannot calculate coverage changes. 😴

If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, this should be updated once coverage for 8b73e40 is available.

Full summary · PHP report · JS report

@adampickering
adampickering force-pushed the add/my-jetpack-onboarding-telemetry branch 2 times, most recently from 9fa2c4b to 1b5f48e Compare September 26, 2026 15:46
@adampickering
adampickering requested a review from a team as a code owner September 26, 2026 16:11
@adampickering
adampickering force-pushed the add/my-jetpack-onboarding-telemetry branch 2 times, most recently from a27592c to 5f807a0 Compare September 26, 2026 16:39
@adampickering
adampickering force-pushed the add/my-jetpack-onboarding-telemetry branch from 5f807a0 to 6ae7f21 Compare September 26, 2026 16:48
@adampickering
adampickering force-pushed the add/my-jetpack-onboarding-telemetry branch 5 times, most recently from 5815db0 to 9d265c7 Compare September 27, 2026 00:06
@DevinWalker DevinWalker added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Oct 15, 2026
@DevinWalker
DevinWalker requested a review from enejb October 15, 2026 03:03
@github-actions github-actions Bot added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review This PR is ready for review. labels Oct 15, 2026

@kraftbj kraftbj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the point of this PR is numbers we can trust, I'd fix two things here: switched_on and the flow_id on HTTP sites. The rest inline is minor.

@DevinWalker DevinWalker removed the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Oct 16, 2026
@DevinWalker DevinWalker added the [Status] Needs Review This PR is ready for review. label Oct 16, 2026
@DevinWalker
DevinWalker requested a review from kraftbj October 16, 2026 20:05
@DevinWalker
DevinWalker force-pushed the add/my-jetpack-onboarding-telemetry branch from 6848428 to a6fa7a9 Compare October 16, 2026 20:20
@DevinWalker
DevinWalker force-pushed the add/my-jetpack-onboarding-telemetry branch from a6fa7a9 to 78651e6 Compare October 16, 2026 21:28
DevinWalker and others added 4 commits October 20, 2026 09:48
Tracks events for the wizard funnel, sent only while the flag is on. Every
event carries the run's `flow_id` and the step's slug. What someone types
about their own site never leaves the browser; only a length bucket is sent.
`apply_result` counts what the run changed, a run records one exit, and the
run id works on plain-HTTP wp-admin.

Co-authored-by: Adam Pickering <adam.pickering@a8c.com>
- The step property reads the step's own id, so `stepSlug()` and its tests go.
- `apply_result` counts with the shared `tallyResults()`.
apply() never rejects, so request_failed could never be true. The property-key
check now reads the keys a real run records instead of a hand-kept list, and the
telemetry comments fit the comment budget.
@DevinWalker
DevinWalker force-pushed the add/my-jetpack-onboarding-telemetry branch from 78651e6 to 790bb41 Compare October 20, 2026 17:15
@DevinWalker
DevinWalker merged commit 790bb41 into trunk Oct 20, 2026
121 of 166 checks passed
@DevinWalker
DevinWalker deleted the add/my-jetpack-onboarding-telemetry branch October 20, 2026 18:40
@DevinWalker

Copy link
Copy Markdown
Contributor

Folded into #52775 so the whole wizard can be tested and reviewed in one place. GitHub marks this one merged because its commits are now in #52775's branch, which was its base. Nothing has reached trunk, and it lands with #52775. The events table is in that description.

@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants