Problem OJS usage statistics report

We have a OJS 2.4.8-1 installation, where journal manager reports work well except for 1 out of 6 on the platform. Specifically “OJS usage statistics report” that reports only until 2016, do not reflect statistics for 2017. It should be noted that the “Timed Views Report” reports work for this same magazine, with results for 2017. any suggestions? I have read and verified “My published file views or statistics reports no date. What do I do?” without results

Hi @vvilchez

Hmmm… The Timed Views Plugin was available in the OJS version 2.4.2 and since 2.4.3 it does not exist any more. The Usage Statistics Plugin came with OJS 2.4.3 and replaced all the other statistics. I.e. if that journal have the access numbers reported with the Timed Views Report for the current year 2017, it would mean that it still uses the old OJS version < 2.4.3. (And in that case it can not use Usage Statistics Report because there is no such plugin and report there). Could that be?

EDIT: Ah, sorry, I see you can use the Timed Views Plugin with the new data :frowning:
Hmmm…

Best,
Bozana

Hmmm… It’s weird :frowning: I have no explanation for that… :-
So there are entries in the DB table metrics for that journal in this year, right? Would it be possible to post how those entries in the DB table metrics look like?
Hmmm… :open_mouth:

Regards!
thanks for the interest @bozana .
The report that gives problems is:

The sql query “select * from metrics where context_id=1” throws:

The problem is only for that journal (context_id = 1) and from 2017 the rest of the journals generate the reports without problems. :confused:

Hmm… this is really strange… How many rows (of data) does that OJS Usage Statistics Report has? Could it be that it has 5000?

Effectively, generate the report goes up to 5006 lines, of which 6 lines are from the header of the report. Is there a limit to this?

thanks thanks! For your messages @bozana
StatisticsHelper.inc.php
// Global report size limit:
Define (‘STATISTICS_MAX_ROWS’, 5000);

1 Like

@asmecher, @ctgraham, any idea how to deal with that maximal row number for the OJS Usage Statistic Report? To expand it, to remove it, to X?
Thanks!
Bozana

Oh my. Why does this exist? My vote is remove it, or replace it with paging if needed.

Hi @bozana,

I’m not especially familiar with that corner of the code. What are the implications of removing the limit entirely? (Performance, I suspect?)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @ctgraham and @asmecher,

I do not know why is it there – it could be the performance… :-\ But, apparently it is not sooooo bad, because @vvilchez could export it without the time out :wink: @vvilchez, how is the performance when you create the report – does it take tooooo long?

This report creates CSV so that paging is not possible, I think?

The problem is, that there is no option to choose the time interval for the report, so it considers/should consider and return everything.
Thus, I would also suggest to remove it now and later implement some kind of filter e.g. period the report should be generated for?

THANKS!!!
Bozana

My .cvs report has 9690 lines, 1.1Mb and was generated in 26 seconds. Modify the variable to 25000, only then I can get the complete report.

@vvilchez :+1: Thanks a lot!!! :slight_smile:

1 Like

I have this same problem (am running OJS 2.4.8). But, raising the maximum rows limit does not get me info from 2017.

Even stranger, when I clear data cache for the site, then rerun the report “OJS usage statistics reports”, I get reports that go through Dec. 2016, but when I clear cache and rerun with the same exact code and same exact STATISTICS_MAX_ROWS , I get different reports. Like maybe the same code and same report will have 7,107 rows, then I clear data cache and rerun it and get 7,173 rows.

What exactly is “OJS usage statistics report” showing? and is there a way that I can get this info by running a different report available in OJS? like, could I somehow pull some Timed Views reports and use those to make the same info that’s in “OJS usage statistics reports”?

@randtke, I think the OJS Usage Statistics Report is trying to provide a count of any user interactions with any reportable objects in the system. The user interactions (column I) could include viewing or downloading the object. The objects (column B & C) include Articles, Galleys of articles, and the Journal itself. Counts are broken down by month (column H) and location (column G), if enabled.

It is concerning that you could run the same report twice and get different row counts. Can you provide some more details on the differences between the runs? Is it just that there are 73 additional rows, or has other data changed?

Also, can you describe what specific statistics you are interested in collecting? There may be a better approach using the Custom Report Generator.

@ctgraham The order of rows also changed. Maybe near the beginning, so older years like 2014, things were identical. But then, toward the end of the report the later rows were in a different order.

For now, I said the information couldn’t be pulled for this journal (info was for a report with a quick turn around time). This will probably come up again in June, which is near the end of the fiscal year.

Hi all,

Of interest: remove "STATISTICS_MAX_ROWS limit for stats downloads · Issue #4025 · pkp/pkp-lib · GitHub

Cheers,
James