Statistics data not being saved to database

Hi all. I am part of a group that publishes various journals using OJS. This year we were asked to add a download counter for each galley on a certain journal, to show usage stats in the article deatils page. Our statistics plugin was enabled since we installed OJS, so it was just a matter of enabling the chart view on the plugin setting page. But since then it has shown only text explaining that the download data isn’t yet available. After checking the DB i realized that the metrics table is almost empty, and it hasn’t had a record written on it since a month ago.

My question is, what could be causing it. It’s the only OJS install where we have seen this issue. We are using at the moment OJS 3.1.1.4. It’s a pretty recent install, from around mid January, and we dont have a lot of data uploaded on it yet.

Thanking you in advance for your support.

Hi @CIDE_soporte

Off the top of my head, can you check and make sure that your base_url parameter in your config.inc.php file corresponds correctly to the URL being used to access your journal? The Metrics tools depend on those being the same, right down to the HTTP protocol being used, for stats to count.

Generally, though, here’s a link to the stats framework documentation: Statistics

Cheers,
Jason

I checked the config file, and yes, the base_Url paramete was correct. Also, i read the documentation as provided and found a reference to what i think was the problem:

“The reports - in particular the Timed View report, the Usage Statistics Report, and the Custom Report Generator - have some data, but appear to stop at an older date or are otherwise incomplete. I know we have more recent view counts, but they aren’t appearing.”

To be honest one of the things i thought might be the issue before posting here was the fact that multiple OJS sites shared the files folder. The only issue was the fact that other sites which shared the files_dir were having no problem at saving stats. Anyways, I relocated the galley and submission files, then updated the files_dir in the configuration file. Today after checking the documentation, i saw that there were new records in the metrics table, so i think the problem is now solved.
However in the article view, the stats graph still says “The download data is not available yet”. I’m guessing it will say that until it registers a download and then, once a day. Am i right?

If you have shell access to your server, and you are generating your own usage stats logs, you can actually watch the log files grow by running a tail -f fileName command on them, and then in a browser you can try downloading an article. You should see the log entry appear. Once the log is processed, that should translate into a a download stat. if it does not, then there is further investigating to do,

Cheers,

Yep, with shell access i checked that the UsageStat files are generating log data. So now i guess i must wait till tomorrow for the system to process the logs?