Usage Statistic Generic Plugin not displaying correctly


Background: Trying to display to the public usage event plugin on synopsis page. Enabled under ‘Generic Plugins’ the ‘Usage statistics’, and ensured that under ‘Optional statistic information’ the tick is enabled to ‘Display submission statistics chart for reader’.

However, we are unable to see the previous years statistics - only current. And no graph for city nor region. As an example see here - their is definately 2017 and 2016 statistics but for some reason we do not have this navigational function available.

What we did:
On a test site, we thought that the problem could be fixed by adding a javascript to the header of the OMP source code.

We added in:

The following code:

What should we do, to ensure the Usage Statistics plugin works correctly?

Hi @tretief

The graph displayed the usage statistics only for the current year. Recently we changed it to consider the last 12 months, s. this GitHub Issue: Display usage statistics for last 12 months instead of for current year · Issue #3283 · pkp/pkp-lib · GitHub. This change will come with the next release 3.1.1, but if you would like to change it immediately you could try to apply these chages: pkp/pkp-lib#3283 display usage statistics for last 12 months by bozana · Pull Request #3347 · pkp/pkp-lib · GitHub.
The graph does not consider city and region, only article galley views.


Hi @bozana

Appreciate the prompt response - thankful that the graph is indeed displaying as intended and designed. We will review the Github entries and give it a try, will let you know if any difficulties we encounter. It is indeed an improvement to showcase the last 12 months.


Hi @bozana
I don’t find Js folder in my usageStats. My journal uses

Hi @kawahyu

What do you mean with “Js folder”? Would you also like to apply the changes so that graph considers views from last 12 months?


I don’t have this plugins/generic/usageStats/js/UsageStatsFrontendHandler.js in my UsageStats directory.
yes, I would like to apply the 12 months graph

Aaaaa… it is in the lib/pkp/ i.e. lib/pkp/plugins/generic/usageStats/js/UsageStatsFrontendHandler.js

:sunglasses:Sorry, I missed it
Ok. Thanks

Sorry, the + sign added
It now works very well

Thanks @bozana