How to store the custom data to mysql table

Hello style_emoticons/<#EMO_DIR#>/rolleyes.gif ,
I’ve used the Piwik on our pages and I want to store the custom data which is extracted from cookie information to mysql table.
To know how to use, I checked the Piwik document; and found the function “Send custom JSON data to the piwik.php tracking scripts (plugins developers)”. According to it, however, it seems not to work at the moment.
Is there the other way to send custom data? If yes, how should I send the custom data to the Piwik mysql table?
I would appreciate your support. style_emoticons/<#EMO_DIR#>/laugh.gif

FYI, I will be working on putting ‘Visitor custom variable’ in Piwik in the next release. Keep an eye on the ticket: Custom Variables support: new JS API and new reports · Issue #1984 · matomo-org/matomo · GitHub or the next release.