Custom Variables not getting reflected - Piwik 2.13.1



What ever I do the custom variables were not getting saved into the
system. Finally I tried to track it down.

Which led me to core/Tracker/Request.php method getCustomVariables($scope) line
540 or so… where the $keyValue was being tested for count($keyValue) == 2
whereas it was still a json. From the js, it was being posted in as a dual json encoded
so I added

$keyValue = json_decode($keyValue, 1);

above the validation condition, just inside the foreach loop.

Now things are working as expected.


As posted before

The problem is now resolved.

(Matthieu Aubry) #3

Hi jijutm

which Piwik version are you using?

I checked in 2.13.1 and it works fine there for me. are you using this version or maybe an older one?