import { Component , AfterViewInit } from '@angular/core' ; import { MatomoTracker } from 'ngx-matomo' ; /**
 * Main component of the demo application.
 */ @ Component ( { selector : 'app-root' , templateUrl : './app.component.html' , styleUrls : [ ] , } ) export class AppComponent implements AfterViewInit { param matomoTracker constructor ( private readonly matomoTracker ) { } /**
     * Angular AfterViewInit lifecycle hook.
     */ ngAfterViewInit ( ) { this . matomoTracker . getMatomoUrl ( ) . then ( ( url ) => console . log ( 'Matomo URL:' , url ) ) ; } }