Since our upgrade to GA universal we have been missing some of our transactions. About 5-10 a day, which accounts to < 5% of all transactions.
Below is the code that is on our confirmation page and is wrapped in a document ready function. Within our review order page, I have a GA event that tracks the "Place Order" button click. We are tracking 100% of these events. The checkoutoutcomplete event is fairs a little better than our transaction counts. Meaning if we have 100 place order click events showing in GA. I would see 95 transactions and 96 checkoutoutcomplete events.
It's possible there are other forces at play here that have not exposed themselves yet. Testing with large orders and in our dev enviroment works every time of course. I've tried wrapping the entire GA code in a try catch with logging, which resulted in no errors being captured.
Has anyone else experienced issues like this with missing revenue? Suggestions and comments welcome.
$.each(cartItems, function (key, value) {
ga('ec:addProduct', {
'id': this.StyleNumber.toUpperCase(), // Product ID
'name': this.StyleNumber.toUpperCase(), // Product name. Required.
'sku': this.SkuNumber, // SKU/code.
'brand': this.Brand, // Category or variation.
'price': this.Price, // Unit price.
'quantity': this.Qty // Quantity.
});
});
ga('ec:setAction', 'purchase', { // Transaction details are provided in an actionFieldObject.
'id': invoiceNumber, // (Required) Transaction id (string).
'affiliation': 'COS', // Affiliation (string).
'revenue': amount, // Revenue (currency).
'tax': taxAmount, // Tax (currency).
'shipping': shipAmount, // Shipping (currency).
'coupon': coupon // Transaction coupon (string).
});
ga('send', 'event', 'Checkout', 'Checkoutcomplete');