Software Stack: React
I am trying to get my website analytics, for this, I am using react-ga library. I set up the code, but I have confusion, do I need to run ReactGA.initialize every time before executing the command ReactGA.pageview or ReactGA.event.
Problem is, I am not getting the google analytics data.
Currently, I am setting ReactGA.initialize only at the initialize of my application. For my pages and buttonClick events, I am only using the ReactGA.pageview (inside componentDidMount) and ReactGA.event (inside event function call)