Hi,
I want to create specific variable for an external.
I want to send 2 parmeters : $surveyid as integer and $responseid as integer.
I create easily the 2 columns in visit log table using something like matomo/ExampleVisitDimension.php at 3.x-dev · matomo-org/matomo · GitHub .
But now i want to get it via custom parameter in API.
But here : don’t know exactly how to do …
If i just try _paq.push(['surveyis', 42]);
: i receive js error (trying to use this sample Common::getRequestVar('myCustomTrackingParam', 'default', 'string', $request->getParams());
)
To add something : i search on piwik.js : found setCustomData, then i try
_paq.push(['setCustomData','surveyid', 42]);
OK, data is sent as json. Then i think i can get if via json, find if surveyid is set in json and update it …
But : maybe there are a best method ? setCustomData seems undocumented, then out of API.
My question is
What i the best method to add API param for specific plugin ?