0
Fixed

Refund transaction sets transaction_revenue to zero

Anders Ekelund 6 years ago updated 6 years ago 3

Hi!

I had an issue when trying to refund transactions in Analytics.

I could produce the request and copy to clipboard. 

So far so good.

But when reviewing the request I found that the transaction revenue parameter (tr) was set to zero (0).

The ts and tt parameters where negative as expected.

I also tried to do a refund without debug mode and the problem was the same. Transaction revenue was zero.

I assume this could be a bug since this article told me that the revenue parameter should be negative equivalent of the original transaction.
https://radical-analytics.com/reversing-refunding-google-analytics-transactions-with-da-vinci-tools-1e1a23ce5217

There was no error or warning in the chrome debug console.

Hope this helps and thanks for a great addon!


Best regards

Anders

Started

I just double checked that and I wasn't able to reproduce the problem. You can see a quick demo here: https://www.loom.com/share/db00c43fbc7c4ce5848b325c61f85a99

If the original transaction amount was 0, the refund will be 0 too... but I doubt that was your case.

Note the debug mode request is exactly the same as what's used when you are not in debug mode.

It might be hard for me to debug and confirm if it's really an issue or working as expected without actually seeing the real thing. If you want, you can email shamel@immeria.net with additional details (and if possible, grand me read access to your GA for a few minutes so I can check).

Fixed

I just fixed the UA problem when Hide Me is completely disabled (not visible on the page). I strongly suspect this had a side effect on Refund/Revert because it does a GA Reporting API request to retrieve the transaction details. If the UA is incorrect, obviously, this part failed and the created measurement protocol request is then invalid.

Two things you could do:

- enable Hide Me so you can test again if Refund/Revert will make more sense

- I will release a new version shortly, so you can try again with the Hide Me feature disabled and let me know if it works (it did for me!)

Thanks for the swift feedback!

  • When encountering this issue I hade the HideMe feature enabled (not "activated" but enabled from settings), so I don't think the issues are related.
  • It was only the revenue that was set to zero, not the other transaction amounts (tax and shipping)
  • I can confirm that the original transaction did not have zero revenue, as you assumed.

Even though I doubt the HideMe-fix will solve this issue I will try the new version and if I am able to reporoduce I will send you more detailed information by email. I'll look into giving you access to my account as well.