4

enter image description here

This is an extreme problem for our marketing department. While testing a new feature on our store, someone put in a test order for $7,520,000 which has completely skewed our ability to use Google Analytics. I know already that there's a "method" for reversing transactions, but it does not work. Here's what I've been running:

ga("default.ecommerce:addTransaction", {id: "1001581", affiliation: "Our Company", revenue: "-7520000.0000", shipping: "-0.0000", tax: "-0.0000"}); 

ga("default.ecommerce:addItem", {id: "1001581", sku: "oursku", name: "Our Product", price: "752.0000", quantity: "-10000.0"}); 

ga("default.ecommerce:send");  

Default is the name of our tracker, and this is the same format for the code that we run when our store fires off a tracker to GA during a transaction.

This follows these instructions: https://support.google.com/analytics/answer/1037443?hl=en

I can get new test transactions to show up, but I can't reverse them.

Is there a solution to this problem? Why in the world hasn't google allowed us to reverse transactions on the Analytics page?

2
  • If you implement enhanced e-commerce you can upload refund data via data import as a csv file (If you refund a transaction you have effectively canceled it). Jul 22, 2015 at 9:24
  • sry mate, i know that this isn't funny for you, but I laughed when I saw the pic :)
    – Josip Ivic
    Nov 19, 2015 at 15:29

2 Answers 2

1

The simplest way around it would be to create an audience segment that excludes that particular transaction from any of the reports.

You can find how to create new segments here:

http://support.google.com/analytics/answer/3124493

In this case you would go to E-commerece, and then select Transactions that don't include 1001581. Then whenever anyone needs to analyse the data, they can apply this audience segment and that transaction will be filtered out.

1

I had to to this as we had something similar and the amount and quantities were a lot higher. I ended up talking through a solution with an SEO guy at the software company we were using at the time and I had a simple .html file which I executed from the server.

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-******']);
  _gaq.push(['_trackPageview']);

    _gaq.push(['_addTrans',
       'WEB*******',            // *order ID 
       '',                      // affiliation or store name       
       '-148,999,991.06',       // *total
       '',                      // tax
       '',                      // shipping
       'March',                 // city
       'England',               // *state or province
       'United Kingdom'         // country
    ]);
    _gaq.push(['_addItem',
       'WEB*******',            // order ID - necessary to associate item with transaction
       '151383',                // SKU/code - required
       'Beetroot *****',        // product name
       '(not set)',             // category or variation
       '-1.49',                 // unit price - required
       '-99,999,994'            // item quantity - required
    ]);
    _gaq.push(['_trackTrans']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  </script>

Hope it works out for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.