I’ve been trying dozens of different things over the past few weeks, but no matter what I try, 50-75% of ecommerce events are not being reported.
My app is an AngularJS app. Here’s what I’m doing.
Order confirmation page:
The following code is called in a network request callback:
var sku = "4"; var payAmount = 30; // addEcommerceItem(productSKU, productName, productCategory, price, quantity) _paq.push(['addEcommerceItem', sku, "Subscription", subscription.frequency, payAmount, 1]); // trackEcommerceOrder(orderId, grandTotal, subTotal, tax, shipping, discount) _paq.push(['trackEcommerceOrder', subscription.id, payAmount, payAmount]); _paq.push(['trackPageView']);
The annoying thing is, when I test this myself, both in development and production, it works wonderfully and is reported in my dashboard. However, it doesn’t work for external users for some reason.
I’ve tried different variations of where to place
_paq.push(['trackPageView']); hoping that might help, but it hasn’t changed anything. I’m not exactly sure what the timing of trackPageView should even be.