Skip to content

Commit

Permalink
fix(frontend): correctly invoke matomo & sentry tracking in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed May 29, 2024
1 parent 96ad275 commit 6a79d45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/frontend/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ axios.interceptors.request.use(

(function sentryInit() {
// Immediately invoked function to enable Sentry monitoring
if (import.meta.env.MODE === 'development' || import.meta.env.BASE_URL !== 'fmtm.hotosm.org') {
if (import.meta.env.MODE === 'development' || window.location.hostname !== 'fmtm.hotosm.org') {
return;
}
console.log('Adding Sentry');
Expand All @@ -76,7 +76,7 @@ axios.interceptors.request.use(

(function matomoTrackingInit() {
// Immediately invoked function to enable Matomo tracking
if (import.meta.env.MODE === 'development' || import.meta.env.BASE_URL !== 'fmtm.hotosm.org') {
if (import.meta.env.MODE === 'development' || window.location.hostname !== 'fmtm.hotosm.org') {
return;
}
console.log('Adding Matomo');
Expand Down

0 comments on commit 6a79d45

Please sign in to comment.