Skip to main content

Statistics

OJS records the number of times visitors view and download content. As an administrator, you can configure what statistics are collected, how data is compiled into daily or monthly totals, and whether some statistics are publicly available.

Requests to view and download files are recorded in log files. These files are compiled into statistics daily. OJS filters out bots and double-clicks. On large or old sites, the metrics tables in your database may consume significant disk space โ€” you can reduce this by keeping only monthly data and limiting geographic data.

note

To ensure statistics are collected correctly, make sure you have configured scheduled tasks and jobs for your application.

Settingsโ€‹

As an administrator, you can restrict the types of statistics collected. Follow these steps to configure statistics for all journals on your site:

  1. Login as an administrator.
  2. Go to Administration.
  3. Go to Site Management โ†’ Site Settings.
  4. Go to Site Setup โ†’ Statistics.

Site settings act as a "ceiling" for journal managers. For example, if the site has disabled geographic statistics, managers cannot enable them for their journals.

Downloading Statisticsโ€‹

TypeDescriptionWebCSVJSON
PublicationsViews and downloads of articles and their filesโœ”โœ”โœ”
IssuesViews and downloads of issues (OJS)โœ”โœ”โœ”
HomepageViews of the journal homepageโœ”โœ”โœ”
GeographyViews by country, region, cityโœ”โœ”โœ”
COUNTERIndustry-standard COUNTER 5 SUSHI formatโœ˜โœ˜โœ”
Editorial ActivitySubmission acceptance/rejection rates, time-to-decisionโœ”โœ˜โœ˜
UsersUser profiles and rolesโœ˜โœ”โœ˜
ReviewsReviewer names, due dates, commentsโœ˜โœ”โœ˜
SubmissionsTitles and metadata for all submissionsโœ˜โœ”โœ˜
SubscriptionsSubscription data (OJS)โœ˜โœ”โœ˜

Publicationsโ€‹

  1. Login as administrator or manager.
  2. Click Statistics โ†’ Articles.
  3. Filter by date, section, or issue.
  4. Click Download Report.

Issues (OJS only)โ€‹

  1. Click Statistics โ†’ Issues.
  2. Filter by date.
  3. Click Download Report.

Geographyโ€‹

You must enable geographic statistics in Settings first.

  1. Click Statistics โ†’ Articles.
  2. Filter as needed.
  3. Click Download Report โ†’ Download Geographic.

COUNTERโ€‹

COUNTER 5 SUSHI statistics are available via the REST API. COUNTER 4 reports (Journal Report 1 and Article Report 1) can be downloaded:

  1. Click Statistics โ†’ Reports.
  2. Click COUNTER Reports.

Editorial Activityโ€‹

warning

Editorial statistics can change significantly depending on the selected date range. Use date ranges that account for the full duration of your editorial review process, ending at least 12 months ago.

  1. Click Statistics โ†’ Editorial Activity.
  2. Filter by date and section.

Usersโ€‹

  1. Click Statistics โ†’ Users.
  2. Click Export and select the user groups to include.

Reviewsโ€‹

  1. Click Statistics โ†’ Reports โ†’ Review Report.

Submissionsโ€‹

  1. Click Statistics โ†’ Reports โ†’ Articles Report.

Recovering Lost Statisticsโ€‹

You may notice historical gaps in statistics data, often caused by misconfiguration, server resource limits, or application errors. Recovery is possible if you have the relevant log files.

Prepare Log Filesโ€‹

Log files must be in the format the application recognises โ€” JSON entries like:

{"time":"2023-02-27 11:41:14","ip":"87d8edf8...","userAgent":"Mozilla\/5.0...","canonicalUrl":"https://example.org/...","assocType":256,...}

Convert Logs from Older Versionsโ€‹

If your log files look like older-format lines (plain text, not JSON):

php lib/pkp/tools/convertUsageStatsLogFile.php <log>

The old log file will be renamed <filename>_old.log.

Convert Apache Access Logsโ€‹

php lib/pkp/tools/convertApacheAccessLogFile.php <log>

This creates one log file per day in the archive directory.

Reprocess Log Filesโ€‹

Move the prepared log files into the stage directory, then run once per month:

php lib/pkp/tools/reprocessUsageStatsMonth.php YYYYMM

Example โ€” reprocessing October and November 2022:

php lib/pkp/tools/reprocessUsageStatsMonth.php 202210
php lib/pkp/tools/reprocessUsageStatsMonth.php 202211

Tipsโ€‹

  • Never rename log files โ€” they must be named usage_events_YYYYMMDD.log.
  • If disable_path_info = On in your config, set PATH_INFO_DISABLED = true in the conversion scripts.
  • Log files in the stage directory for the current month are processed automatically โ€” do not move files there unless you intend them to be processed.

Frequently Asked Questionsโ€‹

I don't see any statisticsโ€‹

Statistics are compiled once a day. If you have visited the journal homepage and waited more than 24 hours but still see no stats, check that scheduled tasks and jobs are configured correctly.

Check <files_dir>/usageStats โ€” processed log files are moved to the archive directory.

Geographic report has no dataโ€‹

The application uses a GeoIP database at <files_dir>/usageStats/IPGeoDB.mmdb. If scheduled tasks are configured correctly, this file is updated monthly.

I upgraded from OJS 2.x and want old statsโ€‹

If you have Apache access logs from that period, you can convert and reprocess them. See Recovering Lost Statistics above.

Downloading a report gives a blank page or memory errorโ€‹

The data set is too large for your server's PHP limits. Try a smaller date range, or increase memory_limit and max_execution_time in php.ini.

Stats seem lower after upgrading from 2.xโ€‹

Since OJS 3.x, the application filters views per the COUNTER Project code of conduct (one view per 30 seconds, known bots filtered). This is expected behaviour and results in more accurate metrics.