VSB-TUO/Disable matomo statistics - #1000
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements proper configuration-based control for Matomo statistics tracking, allowing it to be completely disabled when not needed. The changes move away from runtime config fetching to compile-time environment configuration and add proper conditional logic throughout the application.
- Adds an
enabledflag to Matomo configuration that controls whether statistics tracking is initialized - Updates Matomo initialization to check the enabled flag before loading tracking scripts
- Modifies the statistics component to show a disabled message when Matomo is turned off
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/modules/app/browser-init.service.ts | Wraps Matomo initialization in conditional check and updates API usage |
| src/main.browser.ts | Adds environment-based Matomo enable/disable logic with debug logging |
| src/environments/environment.ts | Adds Matomo configuration with enabled flag set to false by default |
| src/environments/environment.test.ts | Updates test environment to include enabled flag |
| src/config/matomo-config.ts | Adds enabled property to MatomoConfig interface |
| src/config/default-app-config.ts | Updates default config to include enabled flag |
| src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.ts | Adds Matomo enabled check to prevent statistics fetching when disabled |
| src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.html | Adds conditional display for disabled Matomo message |
| config/config.example.yml | Updates example config to include enabled flag |
| MATOMO_CONFIGURATION.md | Adds documentation for Matomo configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
new PR with review #1006 |
Problem description
Disabling Matomo statistics is not enough; you also need to configure it in the backend.