Hi all,
I need some help setting up the tracking of ecommerce. Somehow I can’t seem to get i working. Here is my code (note that it’s taken from the examples on this site):
piwikTracker.addEcommerceItem(
"9780786706211", // (required) SKU: Product unique identifier
"Endurance: Shackleton's Incredible Voyage", // (optional) Product name
"Adventure Books", // (optional) Product category. You can also specify an array of up to 5 categories eg. ["Books", "New releases", "Biography"]
8.8, // (recommended) Product price
1 // (optional, default to 1) Product quantity
);
piwikTracker.trackEcommerceCartUpdate(35);
piwikTracker.trackEcommerceOrder(
"130", // (required) Unique Order ID
35, // (required) Order Revenue grand total (includes tax, shipping, and subtracted discount)
30, // (optional) Order sub total (excludes shipping)
5.5, // (optional) Tax amount
4.5, // (optional) Shipping amount
false // (optional) Discount offered (set to false for unspecified parameter)
);
piwikTracker.trackPageView();
I can see the cart in the header of the visitors log (where browser/ip/etc is) but the ecommerce screen stays empty and the cart does not show in the pages-section of the visitors log.
Can someone see what is wrong here?