File tree Expand file tree Collapse file tree
app/item-page/clarin-matomo-statistics Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ">
Original file line number Diff line number Diff line change @@ -45,20 +45,8 @@ const main = () => {
4545} ;
4646
4747function 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
You can’t perform that action at this time.
0 commit comments