2018-02-11 15:27:43 +00:00
|
|
|
import ReactGA from 'react-ga';
|
|
|
|
|
2018-02-15 22:33:14 +00:00
|
|
|
const setupAnalytics = () => {
|
2018-02-11 15:27:43 +00:00
|
|
|
ReactGA.initialize(process.env.GA_PROPERTY, {
|
|
|
|
debug: (process.env.NODE_ENV !== 'production')
|
|
|
|
});
|
|
|
|
ReactGA.pageview(document.location.pathname);
|
|
|
|
};
|
|
|
|
|
2018-02-15 22:33:14 +00:00
|
|
|
export default setupAnalytics;
|