A generic usage activity tracker for Matomo platform. The script is based on the Matomo log analytics tool [1]. The script:
- Parses the Web server log files
- Cleans non-legitimate traffic, eg. bots, search engines using the COUNTER Robot list
- Records usage activity for metadata and downloaded items from repositories
Requires python 2.6 or 2.7.
- Install virtualenv $ pip install virtualenv
- Create a virtual environment for the project $ virtualenv -p /usr/bin/python2.7 matomo_tracker
- Activate the virtual environment: $ source matomo_tracker/bin/activate
- Download COUNTER Robots List: wget https://raw.githubusercontent.com/atmire/COUNTER-Robots/master/COUNTER_Robots_list.json
- Download matomo_import_logs.py and matomo.yaml to activated project folder
- Configure matomo parameters in matomo.yaml
- Install the following packages:
- pip install pyyaml
- Run the importer /usr/bin/python2.7 {logs_folder}