Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5712

Ecommerce order always with quantity "0" (Manually Tracking Ecommerce)

$
0
0

We have implemented a manual ecommerce tracking in our online store. Except for a strange behavior, everything works fine.
We track the shopping cart, which works fine and is visible in Matomo. However, when we call the event
“trackEcommerceOrder” the amounts are taken over correctly. However, the quantity is always set to “0”.

From our perspective, we do everything as described on the page “https://matomo.org/faq/reports/advanced-manually-tracking-ecommerce-actions-in-matomo/”.

Here the executed JS on our conformation page:

var _paq = window._paq = window._paq || [];

// Clear Cart
_paq.push(['clearEcommerceCart']);

// Push Items
items.forEach( function (item) {
	_paq.push(['addEcommerceItem', item.sku, item.productName, item.categoryName, item.price, item.quantity]);
});

_paq.push(['trackEcommerceCartUpdate', grandTotal]);
_paq.push(['trackEcommerceOrder', orderId, grandTotal, subTotal, tax, shipping, discount ]);

What are we doing wrong? Or why is the quantity always “0”?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5712

Trending Articles