hiyaryan / the-cdj

The Cognitive Distortion Journal (CDJ) is a smart journaling tool that helps remedy distorted thinking. It can feel impossible to follow the CBT technique of labeling distorted thinking and finding alternative modes of thought (i.e. reframing) while cognitive distortions are occurring. The CDJ does that work for you. -- The CDJ is in beta testing!!
https://thecdj.app
3 stars 0 forks source link

Implement Google Analytics integration in frontend. #103

Closed hiyaryan closed 7 months ago

hiyaryan commented 7 months ago

This PR introduces Google Analytics to the app.

It adds react-ga4 package as dependencym implements a usePageTracking hook within the App component responsible for tracking page views and initializes the ReactGA module, which is configured only to initialize in the production environment done using new VITE_NODE_ENV and VITE_GA_TRACKING_ID environment variables.