{"id":19009462,"url":"https://github.com/eth-library/nx-reports","last_synced_at":"2026-04-23T22:30:19.832Z","repository":{"id":247419839,"uuid":"778227106","full_name":"eth-library/nx-reports","owner":"eth-library","description":"Matomo Plugin for custom reporting of E-Periodica Service","archived":false,"fork":false,"pushed_at":"2024-07-08T14:25:00.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-01T21:13:53.278Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eth-library.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-27T10:20:38.000Z","updated_at":"2024-07-08T14:25:04.000Z","dependencies_parsed_at":"2024-07-08T18:22:00.044Z","dependency_job_id":null,"html_url":"https://github.com/eth-library/nx-reports","commit_stats":null,"previous_names":["eth-library/nx-reports"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eth-library%2Fnx-reports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eth-library%2Fnx-reports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eth-library%2Fnx-reports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eth-library%2Fnx-reports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eth-library","download_url":"https://codeload.github.com/eth-library/nx-reports/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240036201,"owners_count":19737657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T19:07:50.245Z","updated_at":"2026-04-23T22:30:19.787Z","avatar_url":"https://github.com/eth-library.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NX reports\n\nA [Matomo](https://matomo.org) Plugin for custom reporting. This plugin calculates rollup reports on a custom dimension and enriches the groups with other parameters for each line (e.g. counts of event types)\n\n## Requirements\n\n- Matomo 5.x\n\n## Dependencies from Matomo marketplace\n\n- Custom Dimensions (integrated in Matomo)\n- Custom Translations\n- (optional) Invalidate reports\n\n## Website setup\n\n### Create custom dimensions\n\nFor E-Periodica, create three new custom \"Action\" dimensions (Admin -\u003e Websites -\u003e Custom Dimensions):\n\n1. prefix\n2. title\n3. uniqueId\n\na) Take note of the IDs displayed, they need to be in sync with the E-Periodica client.\n\nb) Take note of the position of the custom dimension in the actions list,\nthis is the id that needs to be used in the JSON configuration (e.g. position 2, external id 3 =\u003e customdimension2 in matomo_log_visit_action table)\n\n### Copy sample JSON and adjust ids\n\n## Dev setup (only needed for plugin development)\n\n### Matomo dev container setup\n\n```\ncd dev\ncp .env .env-dev\n# adjust values in .env\ndocker-compose up -d\n```\n\n### Matomo base setup\n\nNow open http://localhost:8990/ and follow installation (see sample config file in docker/matomo for values)\n\nWhen finished, use the following commands to activate the NX Reporting plugin:\n\n```\n./console development:enable\n./console plugin:activate CustomTranslations NxReporting\n```\n\n### NX Reporting configuration\n\nOpen `http://localhost:8990/index.php?module=SitesManager\u0026action=index\u0026period=day\u0026idSite=1\u0026activated=` and copy/past\nsample config from the `docs` folder.\n\n### Useful commands for testing / debugging\n\nEasier debugging:\n\n- Deactivate the browser reporting in the archive settings (http://localhost:8990/index.php?module=CoreAdminHome\u0026action=generalSettings\u0026idSite=1\u0026period=day\u0026date=today\u0026activated=).\n- Set minimum archive time to 1 second (so our commands alway fetch fresh data).\n\nReproducible report generation for a specific date range:\n`docker compose exec matomo /var/www/matomo/console core:archive --force-date-range=2024-04-16,2024-04-17`\n\nwill output something like this:\n\n```\nINFO      [2024-04-17 14:00:00] 209  Start processing archives for site 1.\nINFO      [2024-04-17 14:00:00] 209    Will invalidate archived reports for today in site ID = 1's timezone (2024-04-17 00:00:00).\nINFO      [2024-04-17 14:00:01] 209  Archived website id 1, period = day, date = 2024-04-17, segment = '', 1 visits found. Time elapsed: 0.174s\nINFO      [2024-04-17 14:00:01] 209  Archived website id 1, period = week, date = 2024-04-15, segment = '', 1 visits found. Time elapsed: 0.169s\nINFO      [2024-04-17 14:00:01] 209  Archived website id 1, period = month, date = 2024-04-01, segment = '', 1 visits found. Time elapsed: 0.184s\nINFO      [2024-04-17 14:00:01] 209  Archived website id 1, period = year, date = 2024-01-01, segment = '', 1 visits found. Time elapsed: 0.171s\n```\n\nInvalidate report segments:\n`docker compose exec matomo /var/www/matomo/console core:invalidate-report-data --dates 2024-04-17`\n\n# Notes\n\n- Security: don't use this plugin if any untrusted users have access to the website configuration in your Matomo instance. The plugin currently does not validate any\n  configuration parameters, which - if used wrongly or badly - might ultimately lead to data loss or corruption of your entire matomo database.\n\n# License\n\nMIT License - which is compatible with Matomo according to https://matomo.org/licences/\n\n# Credits\n\nThis plugin for matomo has been developed for ETH Library by [NEXTENSION GmbH](https://nextension.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feth-library%2Fnx-reports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feth-library%2Fnx-reports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feth-library%2Fnx-reports/lists"}