Hello,
I’ve developed a module for Indico software which interfaces with Piwik for statistics tracking. I am currently attempting to link a download listener on the serverside to accomplish this, it is working fine however I wish to obtain ‘top 5’ downloads for any given day and, specifically, a segment.
I am using custom variables when generating the request which logs the download via the cvar parameter as follows:
https://192.168.56.101/piwik/piwik.php?cvar=%7B%221%22%3A+%5B%22DownloadConferenceID%22%2C+%22137976%22%5D%7D&url=https%3A//pcituds06.cern.ch/indico/getFile.py/access%3FcontribId%3D2%26resId%3D0%26materialId%3Dslides%26confId%3D137967&h=15&m=59&action_name=foobar&s=3&idsite=1&token_auth=bbfc55f52c5b9bda2f8c41542f83820b&download=https%3A//pcituds06.cern.ch/indico/getFile.py/access%3FcontribId%3D2%26resId%3D0%26materialId%3Dslides%26confId%3D137967&rec=1
This returns the following, and registers as a successful hit on the downloads when getDownload() is triggered against it:
Page level Custom Variables:
array (
'custom_var_k1' => 'DownloadConferenceID',
'custom_var_v1' => '137976',
)
array (
'idvisit' => '73',
'idsite' => 1,
'idvisitor' => 'ÁCÃø`Ç
',
'server_time' => '2012-06-13 14:10:10',
'idaction_url' => 55,
'idaction_url_ref' => '55',
'idaction_name_ref' => '0',
'time_spent_ref_action' => 576,
'custom_var_k1' => 'DownloadConferenceID',
'custom_var_v1' => '137976',
)
The issue is, using Action.getDownloads() I can’t find the correct combination of customVariablePageName1 & value etc to retrieve all the downloads where the value of the name and number match those which I sent over, I am attempting to get only that subset of data.
My only conclusion is that the action of a download isn’t bound to custom variables in the same manner in which page views are, unless there is something which I am missing.
If you can see the solution for this, I’d be most grateful for any assistance offered.
Note: Piwik IP & token_auth in URLs are within local scope only.