diff --git a/marketplace-ui/src/app/app.config.ts b/marketplace-ui/src/app/app.config.ts index 2b8b2a52..262cf8a0 100644 --- a/marketplace-ui/src/app/app.config.ts +++ b/marketplace-ui/src/app/app.config.ts @@ -7,6 +7,8 @@ import { MARKED_OPTIONS, MarkdownModule } from 'ngx-markdown'; import { markedOptionsFactory } from './core/configs/markdown.config'; import { httpLoaderFactory } from './core/configs/translate.config'; import { apiInterceptor } from './core/interceptors/api.interceptor'; +import { provideMatomo, withRouter } from 'ngx-matomo-client'; +import { environment } from '../environments/environment'; const scrollConfig: InMemoryScrollingOptions = { scrollPositionRestoration: 'disabled', @@ -22,13 +24,12 @@ export const appConfig: ApplicationConfig = { provideRouter(routes, inMemoryScrollingFeature), provideHttpClient(withFetch(), withInterceptors([apiInterceptor])), - // Disabled for later HTTPS implementation - // provideMatomo({ - // siteId: environment.matomoSiteId, - // trackerUrl: environment.matomoTrackerUrl, - // }, - // withRouter(), - // ), + provideMatomo({ + siteId: environment.matomoSiteId, + trackerUrl: environment.matomoTrackerUrl, + }, + withRouter(), + ), importProvidersFrom( TranslateModule.forRoot({ loader: { diff --git a/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.html b/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.html index c12554e9..4fb9bca6 100644 --- a/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.html +++ b/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.html @@ -5,6 +5,9 @@ id="install-button" name="Install button" #installButton + [matomoClickCategory]="MatomoCategory.BUTTON" + [matomoClickAction]="MatomoAction.CLICK" + [matomoClickName]="installButton.name + ' - ' + getTrackingEnvironmentBasedOnActionType()" [lang]="languageService.selectedLanguage()" class="btn btn__install flex-grow-1 me-lg-2" data-bs-toggle="tooltip" @@ -30,6 +33,9 @@ id="download-button" name="Download button" #artifactDownloadButton + [matomoClickCategory]="MatomoCategory.BUTTON" + [matomoClickAction]="MatomoAction.CLICK" + [matomoClickName]="artifactDownloadButton.name + ' - ' + getTrackingEnvironmentBasedOnActionType()" [lang]="languageService.selectedLanguage()" class="btn btn__download btn-secondary primary-bg flex-grow-1" type="button" @@ -116,6 +122,9 @@