-
Notifications
You must be signed in to change notification settings - Fork 18
Start Matomo
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.enabled
tofalse
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
You must set Matomo API URL in the Spring Bean - update the file core-services.xml
, check: https://github.com/dataquest-dev/DSpace/pull/182/files#diff-39dd93aab2debd41b09d0508a15179c528a2a71a07b47f692ea5aec8c256935eR157
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.yml
as 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
config
directory:cd /var/www/html/config
. - Update
config.init.php
file 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.token
property That's it.
- Go to settings
- Stránky/Custom dimensions
- Configure a new dimension
- The ID of the new dimension must be added into
matomo.custom.dimension.handle.id
property in theclarin-dspace.cfg
(only for handle dimension)