Hi @mdc2957
Thank you for contacting Payment Plugins. Can you engage the developers of that pixel manager plugin and ask them to respond to this thread? This plugin uses core WooCommerce methods to provide the order confirmation redirect. Any issues with an incorrect redirect url would not be caused by this plugin.
Their documentation states:
In most cases, the tracking accuracy drops because a payment gateway doesn't redirect properly to the purchase confirmation page.
That would not be the case with this plugin because it uses core WooCommerce methods, which you can see here: https://plugins.trac.ww.wp.xz.cn/browser/woo-stripe-payment/tags/3.3.96/includes/abstract/abstract-wc-payment-gateway-stripe.php#L434
The WC_Payment_Gateway::get_return_url() method contains core WooCommerce logic that builds the order confirmation page url. There are filters that WooCommerce provides that other plugins or custom code could be using to manipulate the url. Here is a link to the WooCommerce code for the get_return_url() method that our plugin uses. https://plugins.trac.ww.wp.xz.cn/browser/woocommerce/tags/10.4.2/includes/abstracts/abstract-wc-payment-gateway.php#L255
It’s possible you have some code that’s using those filters to manipulate the redirect url.
Kind Regards
-
This reply was modified 3 months, 3 weeks ago by
Clayton R.
Thanks, I shared the link to this thread and asked them to reply here. The only code I use is the code below to send people to a different page if they order a certain product. However, that’s probably just 1 or 2 orders out of the total in the data being reported.
add_action( 'woocommerce_thankyou', 'redirect_product_based_2hr', 1 );
function redirect_product_based_2hr ( $order_id ){
$order = wc_get_order( $order_id );
foreach( $order->get_items() as $item ) {
// Add whatever product id you want below here
if ( $item['product_id'] == 6865 ) {
// change below to the URL that you want to send your customer to
wp_redirect( 'https://xxxx.com/' );
}
}
}
Hi
I am the developer of the Pixel Manager for WooCommerce.
The Pixel Manager can only detect if a buyer reached the purchase confirmation page for each order.
However, it cannot detect the exact reason.
In most cases it is a payment gateway that is not following standards or it has not been set up properly. There are other possible reasons too.
Here are a few that come to my mind and I have seen before.
– The purchase confirmation page loads extremely slow
– Custom redirects from the purchase confirmation page awway
– Third-party plugins that block the purchase confirmation page from fully loading
Here’s a longer list of possible reasons: https://sweetcode.com/docs/wpm/diagnostics#typical-causes
In your case, it is likely to be a more systemic reason, not the payment gateway, because it affects all payment gateways the same. The percentage of tracked orders is approximately the same across all active payment gateways, which is an indication that there is something else going on.
Your custom redirect could be the reason, so in the first step I’d recommend disabling it and watch and monitor if things improve. The recommendation is also to never redirect away automatically from the purchase confirmation page.
If tracking doesn’t improve, you will have to play around with other settings.
On shops where everything works fine, it is common to get tracking for orders above 95% easily.