Tracking multiple product categories in an eCommerceView

Hi,

Tracking eCommerceViews is working, however when we specify an array for the productCategories, no categories are tracked.
This works:

_paq.push([‘setEcommerceView’,
productSku = encodeURIComponent(retailer_product.product_sku), // (required) SKU: Product unique identifier
productName = retailer_product.product_name, // (optional) Product name
category = retailer_product.product_groupid, // (optional) Product category, or array of up to 5 categories
price = retailer_product.product_price // (optional) Product Price as displayed on the page
]);

This does not, where retailerCategories is [“Test”,“test2”,“test3”];

_paq.push([‘setEcommerceView’,
productSku = encodeURIComponent(retailer_product.product_sku), // (required) SKU: Product unique identifier
productName = retailer_product.product_name, // (optional) Product name
category = retailerCategories , // (optional) Product category, or array of up to 5 categories
price = retailer_product.product_price // (optional) Product Price as displayed on the page
]);

Can setEcommerceView accept multiple categories as an array?

Thanks!

Piwik 2.16.5 by the way

Testing this has been exhibiting some odd behavior. Here’s our current observations:

Install is piwik 2.16.5

  1. Wipe out all stats, visits and archives
  2. Register a number of product page views by visiting a product page while passing an array of categories to setEcommerceView
  3. Observe that no content appears under the Product Category Report. Data does appear under Product SKU report.
  4. Repeat 1-3 as often as you like, but no data appears under the Product Category Report.
  5. Change the setEcommerceView call to use a single product category (not an array, just a string with a single category)
  6. Observe that Product Categories from steps 1-3 now magically appear, along with the category tracked in item 5.
  7. Push away from desk, cry in corner etc.

Can someone explain why steps 1-3 do not register any product category views? Why must it be “triggered” by a single eCommerceView with a string?

PLease check via firebug or the chrome developer console if the values of the variables are indeed as they should be (string vs array).

We’ve verified that the data is sent correctly.

I can confirm that the Product Category widget is only populated once a single eCommerce order is placed. Before that, the Product Category report stays empty, even while the Product Name report is correctly populated.

Still stuck here.

We have two problems:

Problem 1: This request does not track an eCommerceView

piwik.php?action_name=Buy&idsite=1&rec=1&r=880015&h=12&m=19&s=32&url=https%3A%2F%2Frelease%2Findex.php%3Foption%3Dcom_locator%26view%3Ddirectory%26layout%3Dcombined%26framed%3D1%26tmpl%3Dcomponent%26Itemid%3D8343%26preview%3D1%26groupid%5Bproducts%5D%3DTEST-17Lptp&_id=acfc42bafb559bd7&_idts=1508429709&_idvc=9&_idn=0&_refts=0&_viewts=1509557754&send_image=1&pdf=1&qt=0&realp=0&wma=0&dir=0&fla=1&java=0&gears=0&ag=0&cookie=1&res=1920x1200&dimension2=8343&dimension3=Test&dimension5=TEST-17Lptp&dimension13=GROUP&cvar=%7B%222%22%3A%5B%22_pkp%22%2C%22879.99%22%5D%2C%225%22%3A%5B%22_pkc%22%2C%22%5B%5C%22TEST-17Lptp%5C%22%2C%5C%22Consumer%20(PS)%5C%22%2C%5C%22TEST%20Home%20Notebook%20PCs%5C%22%2C%5C%22Home%20Laptop%20PCs%5C%22%2C%5C%22Personal%20Systems%5C%22%5D%22%5D%7D&gt_ms=269&pv_id=LgSr2F

Problem 2: This tracks an eCommerceView, but the categories we provide do not appear in the product category report

piwik.php?action_name=Buy&idsite=1&rec=1&r=164835&h=12&m=26&s=47&url=https%3A%2F%2Frelease.locator%2Findex.php%3Foption%3Dcom_locator%26view%3Ddirectory%26layout%3Dcombined%26framed%3D1%26tmpl%3Dcomponent%26Itemid%3D8343%26preview%3D1%26sku%5Bproducts%5D%3DX7N08A&_id=acfc42bafb559bd7&_idts=1508429709&_idvc=9&_idn=0&_refts=0&_viewts=1509557754&send_image=1&pdf=1&qt=0&realp=0&wma=0&dir=0&fla=1&java=0&gears=0&ag=0&cookie=1&res=1920x1200&dimension2=8343&dimension3=Test&dimension4=6&dimension5=Test&dimension13=SKU&cvar=%7B%222%22%3A%5B%22_pkp%22%2C%22129.99%22%5D%2C%223%22%3A%5B%22_pks%22%2C%22X7N08A%22%5D%2C%224%22%3A%5B%22_pkn%22%2C%22Photo%20Printer%20%22%5D%2C%225%22%3A%5B%22_pkc%22%2C%22%5B%5C%22Printer%5C%22%2C%5C%22Color%20Inkjet%20Printers%5C%22%2C%5C%22Document%20and%20Photo%20Printers%5C%22%2C%5C%22Home%20(Print)%5C%22%2C%5C%22Print%5C%22%5D%22%5D%7D&gt_ms=221&pv_id=wU6FWl

The HTTP tracking API doesn’t seem to provide any information on what an eCommerceView is and how that differs from a page view, if at all.

If someone could even point me in the right direction I’m running out of options.

Hi @fatica ,

Did you find any sollution on the above?
I would be interested on this as well.

Kind Regards,
giannis

I did not. We gave up on this one :wink: