Commit b7e0c960 authored by Léonard Treille's avatar Léonard Treille
Browse files

Fix trackEvent error

parent 366159e1
...@@ -87,7 +87,7 @@ export class ContributionFinalStepComponent implements OnInit { ...@@ -87,7 +87,7 @@ export class ContributionFinalStepComponent implements OnInit {
this.displaySubmitLoader = true; this.displaySubmitLoader = true;
this.matomoTracker.trackEvent('submit-contribution', JSON.stringify(values)); this.matomoTracker.trackEvent('submit-contribution', JSON.stringify(values));
this.http.post(`${domain}/occupancy/report`, values, { headers }).subscribe(response => { this.http.post(`${domain}/occupancy/report`, values, { headers }).subscribe(response => {
this.matomoTracker.trackEvent('submit-contribution:success', ''); this.matomoTracker.trackEvent('submit-contribution:success', 'true');
this.displaySubmitLoader = false; this.displaySubmitLoader = false;
this.snackBar.openFromTemplate(this.snackBarContent, { this.snackBar.openFromTemplate(this.snackBarContent, {
panelClass: 'contribute-submit-message', panelClass: 'contribute-submit-message',
...@@ -95,7 +95,7 @@ export class ContributionFinalStepComponent implements OnInit { ...@@ -95,7 +95,7 @@ export class ContributionFinalStepComponent implements OnInit {
}); });
this.router.navigate(['/']); this.router.navigate(['/']);
}, error => { }, error => {
this.matomoTracker.trackEvent('submit-contribution:error', ''); this.matomoTracker.trackEvent('submit-contribution:error', 'false');
console.error(error); console.error(error);
this.displaySubmitLoader = false; this.displaySubmitLoader = false;
this.snackBar.open(`Une erreur s'est produite, veuillez réessayer plus tard.`, '', { this.snackBar.open(`Une erreur s'est produite, veuillez réessayer plus tard.`, '', {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment