Ecommerce events not being tracked

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.


    <!-- Piwik -->
    <script type="text/javascript">
      var _paq = _paq || [];
      /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
      // _paq.push(['trackPageView']);
      (function() {
        var u="//";
        _paq.push(['setTrackerUrl', u+'piwik.php']);
        _paq.push(['setSiteId', '1']);
        var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
        g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
    <!-- End Piwik Code -->

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',, payAmount, payAmount]);

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.

Any ideas?

could you supply a link and I will try and hit it for you? I will supply the IP from where I am. (I will PM you the IP)

It’s behind a purchase funnel so you’d have to make a real purchase to get to it.

But I’ve already tested with a VPN. And it’s reported properly. But for some very strange reason, I don’t get any external transactions.