Closed WillemElbers closed 1 year ago
Should be implemented in https://github.com/clarin-eric/fcs-sru-aggregator/pull/51/commits/812ae0d10868cfac85315a1ff0130dea6dc2d32a. Still need to test variable substitution for configuration but plain YAML works. Required some refactoring of frontend assets (css) and how assets and jersey servlets are connected.
So, it works but is quite fragile (in regards to correctly configuring lists for setDomains
). Some documentation now at https://github.com/clarin-eric/fcs-sru-aggregator/blob/develop-koerner/DEPLOYMENT.md#matomo-piwik-statistics-collection for how to correctly set those in a .env
file.
Currently piwik integration is always enabled and the siteID is hardcoded into https://github.com/clarin-eric/fcs-sru-aggregator/blob/develop-koerner/src/main/resources/assets/index.html.
It would be better if the piwik configuration is configurable via environment variables or a configuration file.
The folllowing fields should be configurable:
siteID
, currently set as20
setDomains
, currently set as*.contentsearch.clarin.eu
u
, currently set ashttps://stats.clarin.eu/
Ideally it should also be possible to "turn off" the piwik configuration as well, but a dirty workaround to set a non existing siteID (e.g. -1), might already achieve this.
An example where the index.html is template via mustache in dropwizard can be found in the SwitchBoard: https://github.com/clarin-eric/switchboard/blob/master/backend/src/main/java/eu/clarin/switchboard/resources/IndexView.java#L24