I’ve seen OJS 188.8.131.52 on a couple of Journals with neat graphs under articles that identify (1) total views (2) abstract views (3) pdf views and (4) html views per month and year
Is there a simple how to guide to get an outcome like the websites identified through this thread
Also the plugin Usage Event has to be enabled – it will generate/trigger an event, when user accesses the journal and article page.
The usage events are then logged by the Usage Statistic plugin in the log files under file_dir/usageStats/usageEventLogs/.
Furthermore, you will need either a Cron job or Acron plugin that will then trigger the processing of those log files, where the statistics are calculated and saved in the Database table metrics. The final counts are in the DB table metrics.
Thus, if you have done and setup everything properly, you can take a look in your Database table metrics, if you see there the counts.
Please see also this document for more information: https://pkp.sfu.ca/wiki/index.php?title=PKP_Statistics_Framework#Statistics_Logging.
Once the counts are in the metrics table, you can use the code above to display them on the article page.
Hi Bozana, I have checked usage statistics plugin is turned on and there is one log file in file_dir/usageStats/usageEventLogs/
I have Acron plugin enabled.
there is a table called metrics that appears to have a large number of entries
How do I add the code to display on an article page?
and just to be sure we’re talking about the code by gtgraham on Oct 16 near the bottom of the page being added to article.tpl
I could do with some help to get the statistics - the final step is possibly something I need help to be guided through.
It sounds good.
Only the values with the metric_type = ojs::counter are considered in the Usage Statistics Plugin – there could be also ojs::legacyCounterPlugin, ojs::timedViews and ojs::legacyDefault from the older plugins that does not count here.
I do not know what code by ctgraham do you mean… but you would then use this code:
thx Bozana, I’ve added it and will monitor to see how it works over time. I’m trying to work out in another thread to get country statistics working and I need to be able to get the statistics for a particular IP (institutional subscribers). So much to setup!