Support » Plugin: DuracellTomi's Google Tag Manager for WordPress » Tracking WooCommerce Conversions even with external payment processors?

  • Greetings,

    Is there a fix for tracking WooCommerce conversions when using an external credit card processor?

    At the moment only orders paid through Bank Transfer appear in GA.

    There is no conversion appearing at all in GA when paid by credit card, there is no problem with it being attributed wrong (at the moment).

    Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author duracelltomi

    (@duracelltomi)

    Hi,

    There is usually no code fix for such cases.

    GTM is a browser based solution: your user needs to visit the order received page so that any transaction tracking can execute.

    If your external payment gateway does not force the user to return to the order received page, you will not be able to track this order with GTM.

    Greetings!

    The payment processor redirects back to the website success page.

    However, from some research my colleague did, it seems that when the user leaves the website to make the payment the conversion tracking stops.

    He gets back to the success page but no info is generated by the website so it can be sent to GA.

    We managed to make some progress.

    It seems to be a situation similar to this one: https://github.com/woocommerce/woocommerce-gateway-klarna/issues/51

    We will look how we can generate the events.

    Plugin Author duracelltomi

    (@duracelltomi)

    Thank you, let me know if it works or not!

    emporio3

    (@emporio3)

    Hi,
    we have this problem cause of paypal doesn’t redirect (we have 1 account paypal and 3 website so we can’t configure from paypal panel only one url).
    Paypal said us to pass through an “hidden” field in the form of the same button. The variable in question is “return”. You can generate a hidden field, because you are followed, in the form window: <input type=”hidden” name=”return” value=”http://www.miosito.com/” />

    We use woocommerce, do you know if is there a way to do this in woocommerce?

    Thanks in advance

    • This reply was modified 2 months ago by  emporio3.
    Plugin Author duracelltomi

    (@duracelltomi)

    As far as I know the return URL for the PayPal payment can be set in the redirection code. I checked the source code of WooCommerce and as I can see it is set to the site that initiated the payment:

    https://github.com/woocommerce/woocommerce/blob/00d254ac187801244ea49d74ea9f4d65b0e1986c/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php#L120

    What you need to make sure that you set the “Auto return” setting in your PayPal account that will redirect the user back to your sites after the payment. Without this, your transaction tracking will not work

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.