DSpace implementation for OpenAIRE Matomo tracking.
Tracks usage activity for OpenAIRE usage statistics service.
Contact [email protected] to request an OpenAIRE Matomo Site ID and an Authentication Token.
NOTE: The patches require the source release of a DSpace to be validated and recompiled.
Follow the steps below:
- Place and optionally rename, the downloaded patchfile in the source folder of Dspace installation, i.e. [dspace-source]/dspace/
- Change the working directory to this folder.
- Run the following command to validate the patchfile.
git apply --check patchfile
- Run the following command to apply the patch.
git apply --whitespace=nowarn --reject patchfile
- Change Matomo site ID and Matomo Authentication Token in oapiwik.cfg, located in [dspace-source]/dspace/config/modules
- Optionally specify the number of bytes in IP Address for IP Anonymization (for supported versions only).
- Enable (true) or disable (false) the tracker. Default value is true.
Run the following commands to rebuild and deploy the tracker in DSpace.
mvn clean package
Change the working directory to [dspace-source]/dspace/target/dspace-installer
ant update
In case of Matomo connectivity issues an SQLite Database is used to store missing requests.
- To create the DB:
[dspace.dir]/bin/dspace resend-to-matomo -create
- Any time during the day, or once a week, execute the following command to submit the missing requests to Matomo
[dspace.dir]/bin/dspace resend-to-matomo -retry
- After sending the missing requests, execute the following command to delete submitted requests from the DB
[dspace.dir]/bin/dspace resend-to-matomo -delete
If Matomo patches are already installed, please download the following patches with the SQLite functionality
Updated Patch with SQLite for DSpace v.4
Updated Patch with SQLite for DSpace v.5
Updated Patch with SQLite for DSpace v.6
Tomcat server restart is required to apply the changes.