Hi to all,
I’m doing a check about numbers of downloads.
To know the number of full-text download of an article (id=2599) in a specific day (20180125) the SQL code is:
select sum(metric) from metrics where submission_id=‘2599’ and assoc_type = ‘260’ and day = ‘20180125’;
Is it correct ?
Because I find the number in metrics.metric if I check apache logs. Instead of ‘1’ I find ‘18’ inside 18 rows.
And 18 download is probably more correct.
Do you find similar problems about the number inside metrics.metric ?
Summing the metric field across just a submission and day will not get what you are wanting.
There are multiple other columns in this table which present facets for counting. For example, you might have a metric_type of “ojs::counter” and of “ojs::legacyDefault” for the same article and date. Similarly, the counts might be broken out over country, region, city, etc.
thank you for the link, a good reading.
I re-import data of 2018-01-25 with ojs log files.
Now the result of select sum(metric) from metrics where submission_id=‘2599’ and assoc_type = ‘260’ and day = ‘20180125’; is 18, the same number of downloads that I count from apache logs.
In fact I have all facets with same values:
metric_type = ‘ojs::counter’
file_type = ‘2’
country_id = ‘IT’
I think that at 26/Jan/2018 I had problem with anacron plugin in same way.