Skip to content

Commit

Permalink
fix(tracking): Disable tracking in development mode
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Mar 29, 2024
1 parent da7eed0 commit 9a8a39f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client/src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ import { ToastContextProvider } from './hooks/useToast';
import './styles/index.scss';
import 'react-tooltip/dist/react-tooltip.css';

const { VITE_APP_MATOMO_BASE_URL, VITE_APP_MATOMO_SITE_ID = 0 } = import.meta.env;
const { MODE, VITE_APP_MATOMO_BASE_URL, VITE_APP_MATOMO_SITE_ID } = import.meta.env;

const queryClient = new QueryClient();

const matomo = createInstance({
const matomo = MODE === 'development' ? undefined : createInstance({
urlBase: VITE_APP_MATOMO_BASE_URL,
siteId: VITE_APP_MATOMO_SITE_ID,
disabled: VITE_APP_MATOMO_SITE_ID === 0,
configurations: {
disableCookies: true,
},
Expand Down

0 comments on commit 9a8a39f

Please sign in to comment.