rickvanlieshout.com/gatsby-browser.js
Simon Reinsperger 7b8b07b05a refactor: gatsby-browser, gatsby-node
adds .eslintcache to gitignore
2017-03-08 16:53:50 +01:00

9 lines
189 B
JavaScript

import ReactGA from 'react-ga';
import { config } from 'config';
ReactGA.initialize(config.googleAnalyticsId);
exports.onRouteUpdate = (state) => {
ReactGA.pageview(state.pathname);
};