-
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
Fix missing dispatch calls for recordEvent thunk #51935
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~241 bytes removed 📉 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~113 bytes removed 📉 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. 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.
Great catch @ilyasfoo! Looks and works great.
Thanks a bunch for fixing. 🙌
@ilyasfoo I never got any |
@mattsherman Hmm, that sounds like the behaviour prior this fix. I'm suspecting it could be your cache? If possible, can you look if the code does run in your local, maybe attaching a |
I'm baffled. I have added a number of I don't want to hold up the merge of this PR if I am just doing something silly in my testing. But, I also want to make sure that there is not a different code path than what you expect that is somehow being activated. |
@mattsherman Ah, you're right on that one! My bad, during my testing I deleted WooCommerce, WooCommerce services, and WooCommerce stripe plugin in order to re-test. I think So the correct flow would only record |
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.
For the protocol, I tested this in the regular plugin management flows.
Thanks for the clarification @tyxla -- I was pretty certain you must have tested with different flows, but it is good to know that for sure! |
Thanks for confirming this @ilyasfoo -- I'm glad to see that I wasn't off base. |
Changes proposed in this Pull Request
This PR attempts to fix the issue with the following tracks are not consistently recorded:
calypso_plugin_installed_success
calypso_plugin_installed_error
calypso_plugin_activated_success
calypso_plugin_activated_error
Upon my investigation, it seemed that refactoring done for reduxifying actions somewhen in December 2020 might have affected the tracking done. It was found that:
recordEvent
site
parameter was used instead ofsiteId
This change also attempts to fix possible similar issue for the following tracks and mcstats:
calypso_plugin_autoupdate_enabled_*
calypso_plugin_autoupdate_disabled_*
calypso_plugin_removed_*
Testing instructions
Unfortunately, I do not know if there are ways to test all of the changes, but I think testing one of these should verify that the change works across the board, since the pattern used is the same.
The following is the instruction to test with plugin installation and activation, please let me know if you do know how to test others:
Hello Dolly
plugin to turn it into Atomic site./woocommerce-installation/{your new site}
.localStorage.setItem( 'debug', 'calypso:analytics*' )
to debug tracks.Set up my store!
.Preserve log
so that it stays after redirect.calypso_plugin_installed_success
track appears in consoleSample screenshot of my developer console: