I just found an issue where piwik doesn’t correctly parse custom variables.
I’m setting a page level custom variable that contains a “”". So in Piwik_Tracker_Visit::getCustomVariables@1094 this gets processed and piwik turns it into a double quote ", which breaks the JSON, because it will look like eg:
{“1”, “Foo”, “B"ar”}. this means that piwik won’t record that custom variable, because the json_decode fails.
not sure what the correct fix would be, other than not sanitizing/unsanitizing the cvar/_cvar parameters.