We have an eCommerce website for one of our clients. On the payment confirmation/receipt page we have the Google Analytics eCommerce tracking code. Every so often certain orders do not register in Analytics, even though we know for certain that the user has been redirected back to that page and has remained there for several seconds. The code below for example will not register in Analytics no matter what:
ga('require', 'ecommerce');
ga('ecommerce:addTransaction', {
'id': '1842','affiliation': 'https://www.ourwebsite.com','revenue': '313.80','shipping': '0.00','tax': '52.30','currency': 'GBP'});
ga('ecommerce:addItem', {
'id': '1842','name': 'Product1','sku': 'Product1SKU','category': 'Category 1','price': '13.08','quantity': '10'});
ga('ecommerce:addItem', {
'id': '1842','name': 'Product1','sku': 'Product1SKU','category': 'Category 1','price': '13.08','quantity': '10'});
ga('ecommerce:send');
You will notice that the two order lines have the same SKU - this is because on the website even variants can be customised, i.e. different sizes / different colors - but they have the same SKU.
Can anyone see any reason why this particular example would not register in Analytics?
Thanks in advance
dotdev