This plugin allows editors to add custom offset values to usage statistics for publications in OMP. It's designed for situations where you've migrated from a previous website and want to preserve historical statistics.
- Custom Statistics Tab: Adds a new tab in the publication workflow where editors can input legacy statistics
- Separate Offset Storage: Stores custom offsets in a dedicated database table, keeping OMP's native metrics intact
- Combined Display: Automatically adds offsets to displayed statistics on the frontend
- Real-time Calculation: Shows combined totals (OMP stats + offsets) as you type
- Role-based Access: Only managers, site admins, and sub-editors can modify custom statistics
- Extract the plugin to
plugins/generic/customStats/ - Log in to OMP as an administrator
- Navigate to Settings > Website > Plugins
- Find "Custom Usage Statistics" in the plugin list
- Click "Enable" to activate the plugin
- The plugin will automatically create the required database table
-
Go to a submission's workflow
-
Click on the "Publication" tab
-
Look for the "Custom Statistics" tab
-
You'll see:
- Current OMP Statistics: The actual statistics tracked by OMP
- Custom Offsets: Input fields for legacy statistics
- Combined Total: The total that will be displayed to users
-
Enter your legacy statistics:
- Abstract Views Offset: Number of abstract views from your old system
- File Downloads Offset: Number of file downloads from your old system
-
Click "Save Offsets"
If your old website had:
- 5000 Abstract Views
- 1000 Downloads
And OMP currently shows:
- 40 Abstract Views
- 10 Downloads
Enter 5000 and 1000 as offsets, and the frontend will display:
- 5040 Abstract Views
- 1010 Downloads
- The plugin adds a custom tab to the publication workflow
- Editors can input offset values which are saved to the
custom_stats_offsetstable - The actual OMP metrics in the
metrics_submissiontable remain unchanged
- When statistics are displayed, the plugin intercepts the template rendering
- It retrieves the custom offsets from the database
- The offsets are added to OMP's native statistics
- The combined total is shown to users
The plugin creates a table called custom_stats_offsets:
CREATE TABLE custom_stats_offsets (
custom_stats_offset_id BIGINT PRIMARY KEY AUTO_INCREMENT,
submission_id BIGINT NOT NULL,
context_id BIGINT NOT NULL,
abstract_views_offset INT DEFAULT 0,
file_downloads_offset INT DEFAULT 0,
date_created DATETIME NOT NULL,
date_modified DATETIME NULL,
UNIQUE KEY (submission_id, context_id),
FOREIGN KEY (submission_id) REFERENCES submissions(submission_id) ON DELETE CASCADE,
FOREIGN KEY (context_id) REFERENCES presses(press_id) ON DELETE CASCADE
);Warning: This plugin does NOT modify OMP's actual usage statistics. It only adds offset values for display purposes. The native OMP metrics continue to track real usage accurately.
Caution: Be careful not to double-count statistics. If you add legacy statistics as offsets, don't also import them through other means.
Only users with the following roles can modify custom statistics:
- Site Administrator
- Press Manager
- Sub-Editor
Authors and reviewers cannot access or modify custom statistics.
If you disable or uninstall the plugin:
- The
custom_stats_offsetstable will remain in the database - Statistics will revert to showing only OMP's native metrics
- To completely remove the plugin, manually drop the table:
DROP TABLE custom_stats_offsets;
For issues or questions, please refer to the OMP Plugin Development Guide or contact your system administrator.
- Version: 1.0.0.0
- Release Date: 2026-01-02
- Compatible with: OMP 3.4.x
This plugin follows the same license as OMP (GNU GPL v3).