Problems with statistics

After enabling the addthis module, the download article statistics were disabled. Someone knows where the problem may be?

Hello @Gas,

Thank you for your question. Could you please indicate which version of OJS/OMP you’re using?

Kind Regards,
Public Knowledge Project Team

Hello. Thanks. Mi version is Have I to upgrade it in order to solve the problem?

O’m sorry but I did not receive an answer. Do I need to update the OJS version to fix the problem?

Hi @Gas

Those two plugins should not interfere with each other. How do you know your stats are disabled?


Thank you for the answer. For a month the download record has not registered movement, which is impossible. To enable the social media modules our webmaster had to make a requested modification of PHP- For that reason I thought that maybe that was the problem.

The usage statistics plugin generates nightly logs in the scheduledTaskLogs folder inside your directory specified by the files_dir parameter. There will be a lot of logs in there for all tasks but they may provide more clues.


Don’t you need to update the OJS version to fix it?

You shouldn’t have to upgrade OJS to fix the stats. Stats worked fine in 3.2.1-2. What version of PHP are you using and what “modifications” did your webmaster make?

We have to change the following section ir order to use addthis plugin:

“The “exec” PHP function has been disabled on your server. Contact your system adminstrator to enable it.”

That shouldn’t affect usage stats. I suggest looking in your logs for more information.


I understand, but the downloads are being recorded, but they are not being reflected in the graphs or in the generation of reports

Hi @Gas

How do you know they are being recorded?

When you download an article, a log file in usageStats/usageEventLogs is updated. Each night, a cron process runs, triggered by a scheduled task. Those files get parsed and the metrics table in the database gets updated. All reports and graphs are built off of that table.

If files are accumulating in usageStats/usageEventLogs and aren’t being moved to usageStats/processing and then to usageStages/archive, your scheduled task is not running, or it is encountering problems. In the scheduledTaskLogs folder, there will be many files named e.g. Usagestatisticsfileloadertask-611be4b5aade3-20210817.log which will be the results of the stats process for that date (the files are time stamped with the date in the name). If there are errors, they will be in there.


Thanks again, but is there a procedure to find the error there? We are really lost and viewing statistics is very important to us

I went over a process to debug stats not parsing correctly, over here:

So that might be relevant, from that point on down the thread.


We still haven’t solved the problem. If we update the OJS version, could we fix it? Do we run the risk of losing the information of the edited numbers?

Hi @Gas

Updating OJS will not lose any statistics.


Thanks, but I mean the content and design of the review. And above all I would like to know if the OJS update would solve the problem of the visibility of the statistics


Hi @Gas

To be frank, I doubt upgrading will solve your stats problem. If statistics are not accumulating (you don’t see new records in the metrics table in the database, and the articles graph in the Reports area is not showing new content), that is probably not something an upgrade will fix. It is probably a stuck usage stats log file, or the scheduled task is not running, or perhaps there is a misconfiguration within OJS (a base_url missing or incorrect, perhaps).

This is perhaps an obvious question that I should have asked earlier, but did you try disabling the addthis module to see if stats started working again? That was the original reason for your post.