Adding Google Analytics

This commit is contained in:
Jeff Avallone committed 2018-02-11 10:27:43 -05:00
1 parent 214a9eb5c1
commit fd5a8786d0
5 files changed
+25 -1

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import ReactGA from 'react-ga';
const setupGA = () => {
ReactGA.initialize(process.env.GA_PROPERTY, {
debug: (process.env.NODE_ENV !== 'production')
});
ReactGA.pageview(document.location.pathname);
};
export { setupGA };
+3
View File
@@ -1 +1,4 @@
import '../../style.css';
import { setupGA } from '../../analytics';
setupGA();
+3
View File
@@ -5,5 +5,8 @@ import App from '../../components/App';
import '../../style.css';
import '../../service-worker';
import { setupGA } from '../../analytics';
setupGA();
ReactDOM.render(<App/>, document.getElementById('root'));