-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Stepper: Log event on page load #94732
base: trunk
Are you sure you want to change the base?
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~28 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. 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.
On domains or plans step, make sure the calypso_signup_start is triggered only once upon page refresh.
Navigate between steps and refresh the page, it should log only once.
This is the basis that I am basically questioning below. Please feel free to object/question the direction.
I have a separate PR that makes this hook record the event unconditionally and also handles not being recorded on refresh. See #94743
Let's please hold off proceeding here until we review #94743, as that may be the direction to go
// this ensures it gets logged after a page refresh. | ||
useEffect( () => { | ||
if ( isInitialMount ) { | ||
recordSignupStart( flowName, ref, extraProps || {} ); |
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 leads to the same situation we are trying to resolve in discussion #94175 (comment)
We shouldn't ignore any additional/extra props. If the event gets recorded multiple times because of it, then so be it. Analytics can pick the first. This is my understanding from it, and how we can proceed.
Related to #94717
Fixes #94717
Proposed Changes
recordSignupStart
on page load, currently there's an issue that it is not called upon page refresh.Why are these changes being made?
Testing Instructions
calypso_signup_start
is triggered only once upon page refresh.Pre-merge Checklist