I have updated my issue on github about statistics plugin in OJS3.0.1, but I leave some more info here.
First of all, usage_events logs are not generated properly. For now it can be seen there (in my case):
My own clicks from server.
My own PC in same providers subnet.
Example of a click from my Phone:
myIpInSubnet - - "2017-01-27 21:51:06" http://e-medjournal.com/index.php/psp/article/view/15 200 "Mozilla/5.0 (Linux; Android 5.0; MyDeviceModel) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36"
mySubnetIp administrative 1 "2017-01-27 16:38:40" http://e-medjournal.com/index.php/psp/article/download/4/20/62 200 "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"
What I can not see, is clicks right on galley file like
but maybe this is normal, do not know exactly.
In compare to apache access.log definitely there is no 99% clicks on article html galley file. In apache log typical click on this article is recorded like:
IP - - [27/Jan/2017 Time +0200] "GET /index.php/psp/article/view/15/25 HTTP/1.1" 200 26774 "https://www.facebook.com/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"
Also I have processed apache log for this day with regex and transformed it to usage_events log file. Typical log line example:
IP - - "2017-01-27 Time" http://e-medjournal.com/index.php/psp/article/view/15/25 200 "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"
I have deleted all clicks from bots, my own PC and clicks, that was not related to articles views.
After successful processing I had near 200 new entries in metrics table for that day.
Another problem was that all those entries were recorded with assoc_type 1048585 (what exactly this means?). And with empty representation_id column. After changing to assoc_type 515 (galley file?) the clicks appeared in the front-end graph. In the metrics table I have near 200 rows for that day, but on front-end there is 1800 clicks, according to number of processed lines in log file for this article (Is 1 row in metrics table not equals 1 click?). From usage_events log for that day I had got only 5-10 entries, associated for that article, and 10 clicks according to statistic graph on front-end.
- Think the problem is in recording clicks from html galleys (maybe xml too) into logs.
- There is a need to review if assoc_type is recorded in metrics table right.
- And maybe someone could show me in a post how click to html galley file should be recorded in events_log file (without sensitive info like ip)?