rickvanlieshout.com/gatsby-browser.js

8 lines
197 B
JavaScript
Raw Normal View History

2016-10-02 15:06:54 +02:00
import ReactGA from 'react-ga'
import {config} from 'config'
ReactGA.initialize(config.googleAnalyticsId);
exports.onRouteUpdate = (state, page, pages) => {
ReactGA.pageview(state.pathname);
};