Skip to content

Commit

Permalink
feat: Use event model for FE_VERSION and DEV_TIER
Browse files Browse the repository at this point in the history
  • Loading branch information
amattu2 committed Feb 1, 2024
1 parent 99b5572 commit 1a40d15
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/Contexts/AnalyticsContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ export const AnalyticsProvider: FC<ProviderProps> = ({ GA_MEASUREMENT_ID, childr
ReactGA.reset();
}
if (GA_MEASUREMENT_ID) {
ReactGA.initialize(GA_MEASUREMENT_ID);
ReactGA.initialize(GA_MEASUREMENT_ID, {
gaOptions: {
DEV_TIER: env?.REACT_APP_DEV_TIER || "N/A",
FE_VERSION: env?.REACT_APP_FE_VERSION || "N/A",
},
});
}

return { ReactGA };
Expand All @@ -73,7 +78,6 @@ export const AnalyticsProvider: FC<ProviderProps> = ({ GA_MEASUREMENT_ID, childr
authenticated: isLoggedIn,
role: user?.role || "N/A",
IDP: user?.IDP || "N/A",
FE_VERSION: env?.REACT_APP_FE_VERSION || "N/A",
});
}, [isLoggedIn, user?.role, user?.IDP]);

Expand Down

0 comments on commit 1a40d15

Please sign in to comment.