New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gutenboarding: Add new tracking events #42099
Gutenboarding: Add new tracking events #42099
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~170 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~19 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This created a regression. When you select a plan, it's immediately confirmed without waiting for a click on "Confirm".
I suggest we keep the isOpen
prop and use an effect hook that registers an event whenever isOpen
changes. This way we avoid stale-state problems.
client/landing/gutenboarding/onboarding-block/acquire-intent/vertical-select/index.tsx
Outdated
Show resolved
Hide resolved
It's already like this on master. Confirm and Close are both just closing the modal. The change has been made in #42028 to align behaviour between Plans page and Plans Modal so that when the user press Select on a plan, they immediately see the plan button label update (discussed with @dubielzyk).
I was previously going this route and having the modal always mounted but useTrackModal is expecting the component to be unmounted to fire the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't finished testing yet but submitting review before GH looses my words 😅
client/landing/gutenboarding/onboarding-block/acquire-intent/vertical-select/index.tsx
Outdated
Show resolved
Hide resolved
Found a few things during manual testing:
|
Thanks for reviewing this and for the well thought suggestions @p-jackson 💯
To send
Probably yes. But we are supposed to track the change events before the user advances to the next step (or drops). p1589270549002500-slack-luna
We're sending |
Would setting a flag in state that the event has been sent already once work? Without tracking if something has changed in the input, as I don't think that matters. I think in practise we really need the event just once. |
I was thinking about saving the previous value recorded in state to compare it with before sending a new event. The requirement was to send an event whenever we store the value, while the user is interacting with this step. Because we're storing the Site Title with every keystroke, I've decided to send an event only when the user is leaving the input. This means they finished typing and are going to do another action. I don't think it's a bug sending multiple events with the same value. It just means the user is focusing in and out the field without making a change which could raise some UX concerns. |
Ah gotcha, yeah that sounds reasonable.
Agreed. 👍 Events are cheap. :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested that all events fire as described.
Tested opening/closing plans grid as a modal, as well as a step as well.
* Update call to IntentGathering useTrackStep to send also the free-form text entered in the vertical input.
…ertical-select/index.tsx Co-authored-by: Omar Alshaker <omar@omaralshaker.com>
* Remove free_form prop from calypso_newsite_vertical_selected event. * Use selected_vertical_slug and selected_vertical_label to track vertical selection.
ca2de03
to
d6adedc
Compare
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/3652236 Hi @razvanpapadopol, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include this string: Thank you in advance! |
Translation for this Pull Request has now been finished. |
Changes proposed in this Pull Request
selected_vertical_slug
- The slug of the selected topic, defined only when the vertical is not free-form user input.selected_vertical_label
- Translated label of vertical or free-form user input.has_selected_site_title
- Whether site title has been entered on the acquire intent page.calypso_newsite_step_leave
event for IntentGathering step:selected_vertical_label
prop which can be free-form user input.selected_vertical
prop toselected_vertical_slug
recording the same value as beforeselected_site_title
prop tohas_selected_site_title
recording if a site title has been entered or not.calypso_newsite_init
before redirecting users to Gutenboarding.Testing instructions
calypso_newsite_vertical_selected
event should be fired when moving the focus off the vertical input that has a value (tabbing, clicking away, pressing enter or selecting a vertical) or when clearing the input.calypso_newsite_site_title_selected
event should be fired when moving the focus off the site title input (tabbing, clicking away).calypso_newsite_vertical_skipped
event should be fired when pressing grey I donʼt know link below it.calypso_newsite_site_title_skipped
event should be fired when pressing blue I donʼt know button or pressing Enter when focused on empty Site Title input to advance to Design Picker step.calypso_newsite_step_leave
event should should fire with props{flow: "gutenboarding", name: "IntentGathering", selected_vertical_slug: string | undefined, selected_vertical_label: string | undefined, has_selected_site_title: boolean}
calypso_newsite_modal_open
event should fire with props{flow: "gutenboarding", name: "PlansGrid"}
when clicking the Plans Button.calypso_newsite_modal_close
event should fire with props{flow: "gutenboarding", name: "PlansGrid", selected_plan: "free_plan"}
when closing the Plans modal having the last selected plan slug instead of"free_plan"
.calypso_newsite_init
event should fire when A/B test condition istrue
, before redirecting user to/new
.Related to: #41059