@tia_le_coco wrote:
Hello,
I'm tracking custom variables with Piwik but in the generated request to Piwik server, here what I get :
/piwik.php?action_name=my_action&idsite=2&rec=1&r=632817&h=18&m=26&s=12&url=http://www.xxxx.com/?cid=XXX&urlref=http:xxx.html&id=565da35e40f66022&idts=1446568377&idvc=2&idn=0&refts=0&viewts=1446571155&send_image=0&pdf=1&qt=0&realp=0&wma=0&dir=0&fla=1&java=1&gears=0&ag=0&cookie=1&res=1920x1080&cvar={"1":"[\"Var1\", \"VAR0003719412\"]","2":"[\"Var2\", \"0\"]"}>_ms=277
The parameter which is matching to the custom variable is very weird because it has misplaced quotation mark : {"1":"[\"Var1\", \"VAR0003719412\"]","2":"[\"Var2\", \"0\"]"} and antislashes coming from nowhere.
Result : these custom variables are not saved by Piwik.When I try to send a request manually with this value : cvar={"1": ["Var1","VAR0003719412"] ,"2":["Var2","0"]}, it works well.
I track my custom variables in a standard way :
_paq.push(['setCustomVariable', 1, 'Var1', 'N°Identifiant', 'page']);
_paq.push(['setCustomVariable', 2, 'Var2', 'Montant', 'page']);Any clue of where did come from these quotations marks and antislashes ?
Thanks for any help,
Tia
Posts: 3
Participants: 2