Repository navigation
My Jetpack: report what happens in the onboarding wizard - #52842
DevinWalker merged 4 commits into
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
9fa2c4b to
1b5f48e
Compare
a27592c to
5f807a0
Compare
5f807a0 to
6ae7f21
Compare
5815db0 to
9d265c7
Compare
kraftbj
left a comment
There was a problem hiding this comment.
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.
6848428 to
a6fa7a9
Compare
a6fa7a9 to
78651e6
Compare
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.
78651e6 to
790bb41
Compare
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_idand the step's slug on top of whatuseAnalyticsalready adds.jetpack_my_jetpack_onboarding_wizard_step_viewjetpack_my_jetpack_onboarding_clickflow: 'wizard'jetpack_my_jetpack_onboarding_connect_errorerror_codejetpack_my_jetpack_onboarding_wizard_site_type_selectsite_typejetpack_my_jetpack_onboarding_wizard_site_type_detaillength_bucketjetpack_my_jetpack_onboarding_wizard_module_togglemodule,enabledjetpack_my_jetpack_onboarding_wizard_step_completejetpack_my_jetpack_onboarding_wizard_apply_resultoffered,switched_on(by this run only),failedjetpack_my_jetpack_onboarding_wizard_completesite_typejetpack_my_jetpack_onboarding_wizard_skipThere's no abandonment event. Abandonment is a
step_viewwith no latercompleteorskipfor the sameflow_id.A successful connection is
calypso_jpc_authorize_successon WordPress.com, which already carriesfrom: jetpack-onboarding-wizard. So the funnel is wizard click, then authorize success, with failures counted here byconnect_error. That event stays until CONNECT-502 has the connection package record registration failures itself.Decisions worth checking
getRandomValues()whererandomUUID()is missing (plain-HTTP wp-admin), ends when the user leaves the wizard, and falls back tononewhere storage is blocked.Jetpack_Tracks_Event::EVENT_NAME_REGEXor whose property keys aren'tsnake_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()inpackages/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-wizardflag 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.With it on, open the wizard on a site that has accepted the terms and watch
window._tkqwhile going through it. You should see oneflow_idacross the whole run,stepas a slug rather than a number, and, if you choose "Something else" and type,filledandlength_bucketbut never a word of what you wrote.