Skip to content

Commit 28f23a1

Browse files
committed
removed consol log, made info more important
1 parent 72a7196 commit 28f23a1

2 files changed

Lines changed: 3 additions & 16 deletions

File tree

src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="container">
22
<div *ngIf="!matomoEnabled" class="row px-2 py-2 rounded alert-warning">
3-
<i class="fas fa-exclamation-triangle pt-1"></i>
3+
<i class="fas fa-exclamation-triangle pt-1" aria-hidden="true"></i>
44
<span class="pl-2">Matomo statistics are currently disabled.</span>
55
</div>
66
<div *ngIf="matomoEnabled">

src/main.browser.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,8 @@ const main = () => {
4545
};
4646

4747
function addMatomoStatistics() {
48-
// Debug: Log the matomo configuration
49-
if (!environment.production) {
50-
console.log('Matomo config check:', {
51-
hasMatomo: !!environment.matomo,
52-
enabled: environment.matomo?.enabled,
53-
full: environment.matomo
54-
});
55-
}
56-
5748
// Check if Matomo is enabled in the environment configuration
5849
if (!environment.matomo || !environment.matomo.enabled) {
59-
if (!environment.production) {
60-
console.log('Matomo is disabled, skipping initialization');
61-
}
6250
return;
6351
}
6452

@@ -77,9 +65,8 @@ function addMatomoStatistics() {
7765
g.src = environment.matomo.hostUrl + 'matomo.js';
7866
document.getElementsByTagName('head')[0].appendChild(g);
7967
} catch (error) {
80-
if (!environment.production) {
81-
console.error('Error initializing Matomo:', error);
82-
}
68+
// Silently fail if Matomo initialization fails
69+
return;
8370
}
8471
}
8572

0 commit comments

Comments
 (0)