-
Notifications
You must be signed in to change notification settings - Fork 69
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
Improve Shopper Tracks performance #9677
Comments
Labelling as Some drive-by thoughts:
Would this be an additional setting/option on top of global tracking options? IMO we should keep settings related to tracking opt-in/out in one place and simple to use. Ideally, all tracking would respect the Woo wide opt-in setting. If it's worthwhile adding a sub-setting then perhaps this should be at the Woo level.
Do we know this is a problem? If so, ideally we could define the problem with data / numbers, and relate to merchant or shopper impact. I also wonder if this problem (tracks performance) is unique to WooPayments shopper events, or if there's a fix/solution already available (either in tracks system or in WPCOM or Jetpack code). |
As it stands, none of those tracks appear to respect the global woo setting in Disabling
We reported this as we noticed a large number of admin-ajax.php requests on our checkout caused by WooPayments. On very large websites, uncached requests (of any type) take a couple of seconds to complete. Even though those are async and do not really affect the customer, they still incur a load on the servers, because the entire code is loaded. On quiet days, those will go unnoticed, but during large promotions, you want the site to run as efficiently as possible and reduce the number of uncached requests and therefore the overall server load, so as a minimum, WooPay should respect the global setting. The Stripe plugin doesn't have such tracking and if those requests were hitting your own servers, they wouldn't cause a load issue, but this is not the case. Also, I don't see why you need to use I'd treat this as a bug rather than enhancement, considering the global setting is not respected, forcing you to use a filter and even then, some tracking cannot be disabled |
As per a customer request, I'm switching this label to "bug" rather than "enhancement" since:
|
Describe the issue
Shopper usage tracking utilizes Ajax requests to record activity at various touchpoints during the checkout process. Each record event emits a separate Ajax request. For high-traffic stores, there can be a high amount of Tracks originated requests hitting the merchant server.
We need to investigate ways to reduce the number of requests going to the merchant server. One option is making these requests in batches. One thing to be cautious of with such an approach is that we need to store the correct timestamp of the user action (not the request timestamp). This will require some refactoring of tracks_build_event_obj function.
Additionally, we can also consider introducing a new filter to disable front-end tracking altogether when needed.
The text was updated successfully, but these errors were encountered: