Skip to content

Commit

Permalink
fix: keep matomo metrics global
Browse files Browse the repository at this point in the history
  • Loading branch information
abelkhay committed Mar 15, 2024
1 parent 0d06842 commit 6c738e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ export class BoutonsActionComponent {

public onPrintFromActionButton(): void {
if (environment.production) {
this._matomoTracker?.trackEvent('fiche détail', 'bouton action', `impression fiche`);
const sourceLabels = this.sources?.map((source) => source.label).join(', ');
this._matomoTracker?.trackEvent('fiche détail', sourceLabels ?? 'Source inconnue', `bouton action - impression fiche`);
}
}

public onSendEmailFromActionButton(): void {
if (environment.production) {
this._matomoTracker?.trackEvent('fiche détail', 'bouton action', `envoyer par email`);
const sourceLabels = this.sources?.map((source) => source.label).join(', ');
this._matomoTracker?.trackEvent('fiche détail', sourceLabels ?? 'Source inconnue', `bouton action - envoyer par email`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export class LieuxMediationNumeriqueDetailsComponent {

public onPrintFromBandeau(): void {
if (environment.production) {
this._matomoTracker?.trackEvent('fiche détail', 'bandeau footer', `impression fiche`);
const sourceLabels = this.lieuMediationNumerique.source?.map((source) => source.label).join(', ');
this._matomoTracker?.trackEvent('fiche détail', sourceLabels ?? 'Source inconnue', 'bandeau footer - impression fiche');
}
Expand Down

0 comments on commit 6c738e9

Please sign in to comment.