From aca5531e24d71082efa80cfe903786c337efef82 Mon Sep 17 00:00:00 2001 From: mjrode Date: Sat, 13 Apr 2019 21:51:24 -0500 Subject: [PATCH] Add GA to app.js --- client/src/components/App.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/components/App.js b/client/src/components/App.js index cb6eff4..659f2d9 100644 --- a/client/src/components/App.js +++ b/client/src/components/App.js @@ -10,12 +10,11 @@ import Plex from './plex/Plex'; import SimilarList from './SimilarList'; import PopularList from './PopularList'; -function initializeReactGA() { - ReactGA.initialize('UA-138294820-1'); - ReactGA.pageview('/homepage'); -} +ReactGA.initialize('UA-138294820-1'); + class App extends Component { componentDidMount() { + ReactGA.pageview(window.location.pathname + window.location.search); this.props.fetchUser(); }