rickvanlieshout.com/gatsby-browser.js

9 lines
189 B
JavaScript
Raw Normal View History

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