track only on prod, and add life changed amount tracking

This commit is contained in:
Viktor Rådberg
2024-03-23 12:39:07 +01:00
parent 17e174bfe1
commit 355f4bd4cd
2 changed files with 31 additions and 9 deletions

View File

@@ -18,6 +18,11 @@ export const useAnalytics = () => {
eventName: string,
eventParams?: { [key: string]: unknown }
) => {
if (process.env.NODE_ENV === 'development') {
console.info('Event not tracked:', { eventName, eventParams });
return;
}
logEvent(analytics, eventName, eventParams);
};