@anonymous-matomo-user opened this Issue on February 1st 2012

Piwik Version : 1.6

I've tried to use the e-commerce tracking as described in the documentation (http://piwik.org/docs/ecommerce-analytics/).

The documentation and that ticket (#2659) tell us that we can assign multiple categories to products, but it seems that it actually doesn't work via the piwikTracker.setEcommerceView function (JS tracker).
For example :


It results in an empty Product Category "Custom Variable value not defined".

I've activated the debug mode and i've found a first error :

Warning: substr() expects parameter 1 to be string, array given in /www/piwik/core/Tracker/Visit.php on line 1082

The error appears in the getCustomVariables and truncateCustomVariable functions.

It seems that the code is not handling arrays and assume that all custom variables are only strings.

@mattab commented on February 8th 2012 Member

(In [5777]) Fixes #2897

  • Forgot to stringify the array of categories. This wasn't covered in the tests since they use the php tracking api client.
  • Added JS tests

jeremy, it is very appreciated if you can test the new piwik.js and report if it's working for you too! thanks

@anonymous-matomo-user commented on February 16th 2012

I've tried the lastest version (1.7), but now the Ecommerce tracker seems not to work at all:

  • I can see the ecommerce custom variables values in the visitor log (in the bubble when we put the mouse on the url) : _pkp, _pks, _pkn, _pkc
  • I can also see them in the piwik_log_link_visit_action table, which means that they are saved
  • BUT NOW the "custom variables" page or even the "ecommerce and goals" page are empty
@mattab commented on February 16th 2012 Member

It's expected that they don't appear in the "Custom Variable" see #2755

However it's not expected that nothing works. On the demo we track ecommece and it is working (product name is tracked). What exactly is not working for you? can you put a screenshot? thx

@anonymous-matomo-user commented on February 16th 2012

OK I didn't see the #2755 ticket and so i thought that they will appear in the "custom variables" widget again.
Now I can see them in the ecommerce widgets so all is good!
I'm sorry for the unuseful last comment and for the waste of time ;)
However I can now confirm that tracking multiple categories is working like a charm.

@mattab commented on February 16th 2012 Member

So the conclusion is that "All" is working fine? :) that's good!!

This Issue was closed on February 16th 2012
Powered by GitHub Issue Mirror