-
Notifications
You must be signed in to change notification settings - Fork 95
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
Problems with conversion tracking when paying with VIPPS #381
Comments
If they have any docs about how they were able to support Monster Insights, I would be happy to review it and implement. Purchase tracking is however done on the order reveived page using the woocommerce_thankyou hook. What could be also an issue that the order is marked as being tracked when the thankyou code runs. Sometimes, this code is executed in the background during order processing for some reason preventing proper tracking on the order received page. You might want to try to unset the corresponding checkbox in GTM4WP admin. ("Do not flag orders as being tracked" in Integration->WooCommerce. If you unset this checkbox and tracking works, then the issue is what I described here. |
Have the same issue with Corvuspay payment gateway. |
Hi, I’d also like to clarify something regarding the "Product ID prefix." I have several feeds, one of which is generated by the Google for WooCommerce plugin with the prefix gla_, while others use different prefixes or plain IDs. Could this be affecting the tracking in any way? Looking forward to your insights. |
I received a reply from the VIPPS developer: Like many of these plugins MI tracks user data and adds it to the orders on creation by modifying the forms on the checkout page. For Checkout and Express Checkout however, we are not able to run all of the hooks of the normal Checkout class on order creation, because we need to create a "partial" order that does not yet have customer information present. Integration will therefore entail recognizing that the Vipps Checkout page is an actual checkout page and modifying the form. We do set the WOOCOMMERCE_CHECKOUT constant on this page, and we do add the "woocommerce-checkout" class to the body-tag. The form on the page will have the "woocommerce-checkout" class as well - and the id "vippsdata". Normally, some javascript would then add the neccessary data for tracking the order to this form. Since we use the same classes as WooCommerce here, this often works; normally with some javascript adding the neccessary data to the form. To ensure this data is saved to the order, this work has to be done in a hook supported by our "partial order" setup. Among these are 'woocommerce_checkout_create_order', 'woocommerce_checkout_update_order_meta' and 'woocommerce_checkout_order_created'. Monster Insights unfortunately uses a different hook which expects the order to have personal data, shipping info etc, so the fix we've implemented uses one of our own hooks, 'woo_vipps_express_checkout_order_created'. It pretty much just calls a specific method in Monster Insights: // IOK 2022-11-24 support adwords-tracking with Monster Insights This is part of a file in our plugin that just handles compatibility with various systems. This being done, the thank-you hooks will run for the order in the normal way, the order now having been annotated with the neccessary data. |
Hello! Almost all conversions paid using this method are not showing up in the stats. We contacted the developer of Vipps MobilePay for WordPress plugin and here is his response:
"It depends on how the order is tracked. In general, you should be able to output data on the "thank you" page by just retrieving the order id in the thank you hook and outputting a datalayer, but we've found many plugins expect to be able to add tracking data on the checkout page, and they will mostly not work out-of-the-box on alternative checkout pages such as the Vipps one.
Fixing it will normally require to find out what the tracker normally does on the checkout page (typically, adds input fields to the checkout form) and then process these in the "Create order" hooks in the VippsCheckout class. Or modify the order using ajax when the page has loaded.
We do have added some support for plugins like e.g. monster insights, as well as hooks and filters to modify a given tracking system, but we unfortunately can't support all of them out of the box.
We may be able to assist depending on how your tracking is actually added to orders on the "normal" checkout page; or at least to add hooks and filters to enable you to handle this yourself."
Can you tell me what to say to him?
The text was updated successfully, but these errors were encountered: