Skip to content

Commit fc45d29

Browse files
committed
fix docs, log only when it is not production
1 parent c144f6b commit fc45d29

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

MATOMO_CONFIGURATION.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ matomo: {
2828

2929
- **Development**: `src/environments/environment.ts`
3030
- **Production**: `src/environments/environment.production.ts`
31+
- **Global/Server-side**: `config/config.example.yml` (and `config/config.yml` in production)
32+
- **Runtime (if applicable)**: `config.json`
33+
> **Note:** The `enabled` flag for Matomo may be present in multiple configuration files. Ensure you update all relevant files (`environment.ts`, `environment.production.ts`, `config/config.example.yml`, and any runtime `config.json`) to avoid conflicts or unexpected behavior.
3134
3235
## After Changes
3336

src/main.browser.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ function addMatomoStatistics() {
5656

5757
// Check if Matomo is enabled in the environment configuration
5858
if (!environment.matomo || !environment.matomo.enabled) {
59-
console.log('Matomo is disabled, skipping initialization');
59+
if (!environment.production) {
60+
console.log('Matomo is disabled, skipping initialization');
61+
}
6062
return;
6163
}
6264

0 commit comments

Comments
 (0)