import React, { Component, PropTypes } from 'react';
import { Provider } from 'react-redux';
import { getRoutes } from '../routes';
import { Router, applyRouterMiddleware } from 'react-router';
import { useScroll } from 'react-router-scroll';
import ReactGA from 'react-ga';

export default class Root extends Component { // eslint-disable-line react/prefer-stateless-function
  componentDidMount() {
    ReactGA.initialize('UA-73635552-1', {
      debug: false
    });
  }

  _logPageView() {
    ReactGA.set({ page: window.location.pathname });
    ReactGA.pageview(window.location.pathname);
  }

  render() {
    const { store, history } = this.props;
    return (
      <Provider store={store}>
        <Router 
          history={history} 
          routes={getRoutes(store)} 
          render={applyRouterMiddleware(useScroll())}
          onUpdate={this._logPageView}
        />
      </Provider>
    );
  }
}

Root.propTypes = {
  store: PropTypes.object.isRequired,
  history: PropTypes.object.isRequired
};

@@ -236,16 +236,18 @@
 croll';%0A
+//
 import R
@@ -270,16 +270,16 @@
 ct-ga';%0A
-
 %0Aexport 
@@ -392,32 +392,64 @@
 idMount() %7B%0A    
+// Google Analytics init.%0A    /*
 ReactGA.initiali
@@ -496,16 +496,18 @@
 %0A    %7D);
+*/
 %0A  %7D%0A%0A  
@@ -523,24 +523,87 @@
 iew() %7B%0A    
+// Logs each page view to your Google Analytics account.%0A    //
 ReactGA.set(
@@ -643,16 +643,18 @@
 %7D);%0A    
+//
 ReactGA.

Comment out Google Analytics init.