The https://api.woocommerce.com/payment/sift URL is being requested on every page in the admin adding .67s (depending on the server response time) to the page generation time of admin pages.
This is being requested from the action below: add_action( ‘admin_print_footer_scripts’, array( $this, ‘add_sift_js_tracker’ ) );
It looks like the request is made to check if a sift tracker should be added to the site.
Is Sift necessary to load on all admin pages and is it possible to cache that response to speed up the admin loading time? Without it the page would be generated in .1s so it’s having a large impact on the backend.
Thanks for reaching out about this. Let’s troubleshoot it together!
The https://api.woocommerce.com/payment/sift URL is being requested on every page in the admin adding .67s (depending on the server response time) to the page generation time of admin pages.
From what I gather, you are noticing the .67s difference when performing measurements.
To clarify, how are these measurements taken? Could you share screenshots? Moreover, is the delay in question noticed consistently, or otherwise?
Could you please provide us with a screenshot so that we can see what you are describing?
If you don’t already have a screenshot service installed, here are a few free options:
It looks like the request is made to check if a sift tracker should be added to the site.
What evidence is there, that this is related with the WooCommerce Shipping & Tax plugin? Just want to understand better, as this is posted to the plugin’s forum.
Is Sift necessary to load on all admin pages and is it possible to cache that response to speed up the admin loading time? Without it the page would be generated in .1s so it’s having a large impact on the backend.
Again, could you please share screenshot(s) of the measurements, so we can understand the situation better, and have context?
I went ahead with searching the WooCommerce API documentation, for any references of sift, as it is named in the URL shared in the inquiry of this forum thread, to no avail.
Below, I am attaching a screenshot, for reference.
I hope this is helpful!?We look forward to your response. In the meantime, please let us know if you have any further questions or concerns.
The external request to the sift URL is found within the admin_print_footer_scripts action in the woocommerce-services\woocommerce-services.php file on line #897: add_action( ‘admin_print_footer_scripts’, array( $this, ‘add_sift_js_tracker’ ) );
This can be seen below in the add_sift_js_tracker function which calls “get_sift_configuration” that makes the HTTP request to the woocomerce.com/payment/sift URL
public function add_sift_js_tracker() {
$sift_configurations = $this->api_client->get_sift_configuration();
public function get_sift_configuration() {
return $this->request( 'GET', '/payment/sift' );
}
Looking at the changelog for this plugin I can see that Sift was added for printing labels? I’m not sure where the print label function is used. Would this need to be loaded on every admin page?
2.3.7 – 2023-10-23 = * Add – Load Sift when printing a label.
Feel free to subscribe to it, for receiving notifications on its progress, and participate in it.
Looking at the changelog for this plugin I can see that Sift was added for printing labels? I’m not sure where the print label function is used. Would this need to be loaded on every admin page?
2.3.7 – 2023-10-23 = * Add – Load Sift when printing a label.