Skip to content

openaire/OpenAIRE-Piwik-DSpace

Repository files navigation

OpenAIRE Matomo plugin for DSpace

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.

Download patch

Patch for DSpace v.4

Patch for DSpace v.5

Patch for DSpace v.6

Patch for DSpace v.7

Validate and Apply the patch

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

Configure tracker parameters

  • 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.

Build and Deploy the patch

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

Configure SQLite DB for missing requests

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

Restart Tomcat server

Tomcat server restart is required to apply the changes.

About

OpenAIRE Piwik plugins for DSpace

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published