forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 22
Start Matomo
Ondřej Košarko edited this page Feb 19, 2026
·
9 revisions
The CLARIN-DSpace 5/7.* uses Matomo instead of Google Analytics for tracking statistics. It uses Matomo for tracking:
- OAI harvesting
- Bitstream downloads
- You can disable tracking Matomo statistics by setting up the property
matomo.track.enabledtofalse
Properties which must be set in the clarin-dspace.cfg:
- matomo.track.enabled = true
- matomo.auth.token = <AUTH_TOKEN> // you will recieve this token after installation the Matomo
- matomo.site.id = 1
- matomo.tracker.bitstream.site_id = 1
- matomo.tracker.oai.site_id = 1
- matomo.tracker.host.url = # should contain
matomo.php(or whatever is the name of your script) not just the hostname; this is interpolated in Spring Bean incore-services.xml - matomo.custom.dimension.handle.id = # see below
By the Docker:
- You can use
dspace-angular/matomo-w-db.yml - Run docker by the command
docker compose --env-file $ENVFILE -p dq-d7 -f docker/matomo-w-db.yml up - You can override default Matomo Docker envs in you
$ENVFILE
Matomo is listening on the port 8135 (it is defined in the matomo-w-db.yml), so you can reach Matomo page on the e.g., localhost:8135.
- Step - next
- Step - just check it and if everything is OK - next
- You have to set up database user - he's credentials are defined in the
matomo-w-db.ymlas default values of the properties:MATOMO_DATABASE_USERNAME,MATOMO_DATABASE_PASSWORD,MATOMO_DATABASE_DBNAME
- Creating the tables - next
- Super user - it is admin user account which you will use in the Matomo - just define some - next
- Set up a Website - Just set up a name and URL for your Matomo - next
- JavaScript tracking code - it is just some suggestions - next
- Congratulations - next
You should see page like that:

This is common issue when you set up Matomo Docker in some special port, check the issue, which is still not fixed: https://github.com/matomo-org/matomo/issues/9549 How to fix:
- Connect into Matomo Docker container console:
docker exec -it <CONTAINER_ID> /bin/bash - Install
nano: Run commandsapt update, thenapt install nano - Go into
configdirectory:cd /var/www/html/config. - Update
config.init.phpfile by adding there a code which is suggested in the error page, for me it is:
- Refresh Matomo web
- Log in with the superuser which you created
- Go to settings -> Personal -> Security And you should see such page:
- Scroll down and you should see page section with
Auth tokens, just create one and copy it intomatomo.auth.tokenproperty That's it. NOTE: TheSecure use onlymust be set toNo
Update mounted config.prod.yml in this way:
matomo:
hostUrl: http://your.matomo.instance/
siteId: 1
dimensionId: 1
location /repository/matomo/ {
proxy_pass http://dev-5.pc:8135/;
}
- Go to settings
- Stránky/Custom dimensions
- Configure a new dimension in scope
action. Note: the dimension is per site. You should configure it for "theme site" and "bitstream site". - The ID of the new dimension must be added into
matomo.custom.dimension.handle.idproperty in theclarin-dspace.cfg(only for handle dimension) andconfig.prod.yml
Getting Started
Features
- All Features — full categorised list
- CLARIN Licenses
- PIDs & Handles
- Featured Services / Refbox
- Field-Level Permissions
- File Previews
- Sharing a Submission
- Personal Access Tokens
- DOI Configuration per Community
- ROR Authority
Operations
- Kubernetes Deployment
- Samples (.env, Nginx)
- Nginx + Shibboleth
- Handle Server · Setup (v7)
- Shibboleth · DiscoJuice
- Shibboleth Accounts
- S3 Storage · CESNET S3
- Google Analytics
- Matomo
- Solr
- Logging
- Custom Namespace
- Health Report
For Users
Development
Reference
- Authorizations
- Metadata Info
- Citations (proposal)
- Repository Checklist
- Search, Browse & Filters
- Localization
- Importing Items (CLI)
- NFA Import - Steps
- OpenAIRE
- DOI Registration
- Inclusion in OLAC
- Unit Testing
- Deploy Checks
- Troubleshooting
- Versioning Theory
- Dynamic Resource Versioning
- Metashare Import · Schema
- Web Server Overview
- LINDAT Common Theme
- Workshop 2016 Results
- WebLicht Integration
- Google Dataset Search
Archive (v5 / stale)
- Old Home (v5)
- Installation (v5)
- Prerequisites (v5)
- Connecting Tomcat with Apache
- Using Apache
- Building Shibboleth FastCGI
- Shibboleth Install (v5)
- EUDAT Replication
- Backup (v5)
- Spring Social / Google Drive (v5)
- Clarin (→ Repository Checklist)
- Control Panel (v5)
- Overlays (v5)
- Configuration (v5)
- Speeding Up Downloads
- Debugging (v5)
- Selenium (v5)
- Code Contributions (v5)
- Best Practices (v5)
- Testing Hudson
- Working on Windows
- Prerequisites Checklist (v5)
- Migration to DSpace 7.2.1
- Upgrade From Lindat
- Piwik (→ Matomo) · Piwik Cleaning