rickvanlieshout.com/gatsby-browser.js
2016-10-02 15:06:54 +02:00

8 lines
197 B
JavaScript

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