Reverse an Ecommerce transaction
You can reverse an Ecommerce transaction when an order does not go through or is disallowed. In this way, you can ensure that your Analytics reports provide accurate value and quantity information.
In a nutshell
To reverse an order or transaction, you will create and load a duplicate receipt page that contains negative values for transaction total, tax, shipping, and item quantity. For example, if the the original transaction total is $699, the duplicate entry will have -$699 as the transaction total. Analytics records this negative value and applies it against your totals, effectively reversing the transaction.
When you reverse an Ecommerce transaction, check that:
- You are using the same transaction ID for the transaction and item-form data as the one you used for the original purchase.
- The value for the
totalfield in your transaction is negative.
itemfield has a positive per-unit price and a negative quantity.
- Tax or shipping charges that were credited back are shown as negative values in the respective fields in the transaction-form data.
Reversing a transaction does not remove it. Both the original transaction and the reversal transaction are included in the transaction count.
- Ecommerce Tracking: Web Tracking (analytics.js)
- Ecommerce Tracking - Android SDK
- Ecommerce Tracking - iOS SDK