How to identify negative transactions in Google Analytics

A negative transaction (also known as a reversal transaction) is one that is associated with negative sales amount and/or other negative metrics like negative tax, negative shipping.

So if the following was your original transaction:

gtag('event', 'purchase', {
"transaction_id": "1234",
"affiliation": "Acme Clothing",
"value": 11.99,
"currency": "USD",
"tax": 1.29,
"shipping": 5,

"items": [
{
"id": "1234",
"name": "Fluffy Pink Bunnies",
"list_name": "Search Results",
"brand": "ToysRus",
"category": "Party Toys",
"variant": "Black",
"list_position": 1,
"quantity": 1,
"price": '11.99'
},

Then the corresponding negative transaction may look like the one below:

gtag('event', 'purchase', {
"transaction_id": "1234",
"affiliation": "Acme Clothing",
"value": -11.99, // Negative sales
"currency": "USD",
"tax": -1.29, // Negative tax
"shipping": -5, // Negative shipping

"items": [
{
"id": "1234",
"name": "Fluffy Pink Bunnies",
"list_name": "Search Results",
"brand": "ToysRus",
"category": "Party Toys",
"variant": "Black",
"list_position": 1,
"quantity": -1, // Negative Quantity.
"price": '11.99' // Positive Unit price.
},

Note: Do not use the code mentioned above. This is just example code and not even the complete code.

Negative transactions are placed to remove the sales amount associated with a particular transaction.

They are used to fix duplicate, cancelled, test orders, and refunds in Google Analytics.

Google Analytics does not automatically reverse an ecommerce transaction, in the event the transaction is later declined or cancelled.

So if someone has placed an order on your website and later he cancelled the order or his order did not go through for some reason, Google Analytics will still report that order and the corresponding sale generated from that order.

In order to maintain the accuracy of your ecommerce data in Google Analytics Ecommerce reports, you should place a negative transaction in Google Analytics.

Why you should identify negative transactions

There is a common misconception that reversing a transaction means removing the transaction. But, unfortunately, this is not true.

When you reverse a transaction in Google Analytics, it does not remove it. GA simply deduct a particular amount from the revenue total. So what is removed is the revenue/sales associated with the reversal transaction. No other information associated with the transaction is removed.

For example, let’s say user ‘A’ placed an order of $200 on Monday and the total website sales on Monday were $500.

Now if you reverse the transaction (placed by user ‘A’) on Monday, then the total sales amount for Monday would be reported to be: $500 – $200 = $300

If you reverse the transaction on say Tuesday, then

the total sales amount for Monday would remain $500

the total sales amount for Tuesday would be: Total website sales for Tuesday – $200

So if the original transaction occurred on Monday and you reversed it on Tuesday then make sure that you are analyzing a date range that includes both Monday and Tuesday.

Google, in fact, recommends doing the reversal on the same day as the original transaction.

But there is one big caveat. Although you have reversed the ecommerce transaction, the transaction count will not change.

For example, let’s say user ‘A’ placed an order of $200 on Monday and on the same day he cancelled the order.

Now let us suppose you also reversed the transaction on Monday. Though you have removed the sales amount associated with the cancelled order, you have not removed the transaction count.

In fact, you have increased the transaction count by one.

GA will report two orders (one regular transaction, one negative transaction) for Monday. When in fact, it should have reported zero orders for Monday.

A typical big ecommerce website gets a lot of cancelled and declined orders on a daily basis. So if the developers are consistently placing negative transactions to remove the sales amount associated with cancelled and declined orders then your transaction count can greatly skew over time.

That’s why it becomes very important to identify negative transactions and discount them from your analysis.

How to identify negative transactions in GA reports

Now the question becomes, how do you identify these negative transactions in GA reports?

Well, they appear with this unholy symbol in the ‘Ecommerce Overview’ report:

negative transaction

Here how this symbol appears in the context of ‘Ecommerce Overview’ report:

negative transaction2

Follow the steps below to identify any negative transactions in your ecommerce reports:

Step-1: Navigate to your main GA view.

Step-2: Navigate to ‘Conversions’ > ‘Ecommerce’ > ‘Overview’ report

Step-3: Change the data range to the last month.

Step-4: Select ‘Revenue’ from the drop-down menu and remove the ‘Ecommerce Conversion Rate’ metric:

revenue 1

Step-5: Click on the ‘Hourly’ button:

hourly button

Step-6: Search for negative sales in the data trend:

negative sales

Step-7: Hover your mouse over the data point which is below $0 to find the date when this negative sale occurred:

negative sales date

So in my case, the negative sale occurred on Dec 26, 2018

Note: Here the sales are reported as $0.00 because the transaction was reversed on the same day. If the transaction was reversed on some other day and no order was placed on that day, you may see the negative sales amount being reported.

Step-8: Set the date range of the report to the day when the negative sales were recorded by GA. In my case that would be Dec 26, 2018.

Step-9: Now add the ‘Transactions’ metric to the ‘Ecommerce Overview’ report:

select transactions

The ‘Ecommerce Overview’ report should now look like the one below:

negative transaction2

If you hover your mouse over the unholy symbol, you should be able to see the negative sales amount associated with the transaction along with the total number of negative transactions:

final report 1

So what we can conclude from this report?

On December 26, 2018, 5 orders/transactions were placed on the website. Out of the five transactions, there was one cancelled order, three negative transactions, and one fulfilled order.

So in total, there was only one legitimate transaction on Dec 26th.

The first transaction of $398 took place at 5 am. This order was later cancelled. So the developer placed a negative transaction to remove the sales associated with the cancelled order.

However, instead of placing one negative transaction, he placed three negative transactions. And these three negative transactions resulted in net sales of -$398. This happened because the developer did not place the negative transactions correctly.

He probably did the following:

  • Placed 1st negative transaction of -$398 around 12 pm (to remove $398 in sales from the cancelled order)
  • Placed 2nd negative transaction of -$398 (probably he did not wait for 20-30 min to see any changes in the ecommerce overview report).
  • Placed 3rd negative transaction of $398 (to remove the negative impact of extra negative transactions).
  • So the net sales from three negative transactions = -$398 -$398 + $398 = -$398

The net sales from one cancelled order and three negative transactions = $398 – $398 = $0

Then someone placed a new order of $398 around 4 pm

So now the net sales from one cancelled order, three negative transactions and one order = $0 + $398 = $398. That’s why GA is reporting $398 in net sales but at the same time reporting 5 transactions.

So in total, there was only one legitimate transaction on Dec 26th.

That’s how you can skew up your ecommerce data if you are not careful with placing negative transactions. This is the kind of insight you can get by identifying negative transactions.

Get weekly practical tips on GA4 and/or BigQuery to accurately track and read your analytics data.

 

Related Articles

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade