@@ -61,6 +61,7 @@ import { Title } from '@angular/platform-browser';
6161import { takeUntilDestroyed } from '@angular/core/rxjs-interop' ;
6262import { PushNotifications } from '@capacitor/push-notifications' ;
6363import { Router } from '@angular/router' ;
64+ import { MatomoTracker } from 'ngx-matomo' ;
6465import { EdgeToEdge } from '@capawesome/capacitor-android-edge-to-edge-support' ;
6566
6667@Component ( {
@@ -99,6 +100,7 @@ export class AppComponent implements OnInit, OnDestroy {
99100 private multiTenantService : MultiTenantService ,
100101 private injector : Injector ,
101102 private projectModuleService : ProjectModuleService ,
103+ private matomoTracker : MatomoTracker ,
102104 ) {
103105 this . initializeApp ( ) ;
104106 }
@@ -212,6 +214,7 @@ export class AppComponent implements OnInit, OnDestroy {
212214 }
213215
214216 private initializeApp ( ) : void {
217+ this . initializeMatomo ( ) ;
215218 this . initializeLanguage ( ) ;
216219 this . initializeEmptyStateDetection ( ) ;
217220 this . initializePageLayout ( ) ;
@@ -227,6 +230,13 @@ export class AppComponent implements OnInit, OnDestroy {
227230
228231 }
229232
233+ private initializeMatomo ( ) : void {
234+ // Désactiver les cookies pour les apps natives
235+ if ( this . platform . is ( 'capacitor' ) || this . platform . is ( 'cordova' ) ) {
236+ this . matomoTracker . disableCookies ( ) ;
237+ }
238+ }
239+
230240 private initializeLanguage ( ) : void {
231241 // Charge les langues disponibles à partir du paramètre 'language' dans le fichier d'environnement
232242 this . languages = this . environment . languages ;
0 commit comments