How to upload legacy report statistics in OJS 3.2.1.1

I have updated a journal from 2.3.7 to 3.2.1.1 (passing through all necessary steps and keeping the backups). I would also like to keep the old reading statistics, like downloads and views, and hopefully make them visible in the chart available through usageStats plugin in the summary template.
I do not have the old apache logs but I’ve kept the article report.
My idea is to hack this file to make it look sort of OJS log files and process it with tools/runScheduledTasks.php. I know I will go to loose the date, and a few other information, but it’s better than nothing.
Actually I’m wondering if this is a viable solution, I do not know if I will be able to obtain the data that I need, or if there is a simpler way to proceed.

Hi @claudiotubertini,

I think it’ll be tricky to reliably re-synthesize information at the level of detail, but you might have a look at this tool, which our testing framework uses to simulate some usage events for statistics testing: https://github.com/pkp/pkp-lib/blob/master/tools/generateTestMetrics.php

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you for the usual helpfullness, but what input file I have to use with tools/generateTestMetrics.php?

Hi @claudiotubertini,

It’s not something you can use in its current form, but might be something you can adapt/modify to get stats data into your system as you’ve proposed. Essentially it generates a small set of stats data and adds it to the database, which is close to what you want to achieve.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you very much, I will let you know what I can achieve.