import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { BrowserRouter } from 'react-router-dom'
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { composeWithDevTools } from 'redux-devtools-extension';
import ReactGA from 'react-ga';

import rootReducer from './reducers/root';
import registerServiceWorker from './registerServiceWorker';

import App from './containers/App';

import 'semantic-ui-css/semantic.min.css';
import './index.css';

ReactGA.initialize('UA-106072204-1');

function logPageView() {
  ReactGA.set({ page: window.location.pathname + window.location.search });
  ReactGA.pageview(window.location.pathname + window.location.search);
}

const composeEnhancers = composeWithDevTools({});
const store = createStore(rootReducer, /* preloadedState, */ composeEnhancers(
  applyMiddleware(thunk),
));


ReactDOM.render(
  <Provider store={store}>
    <BrowserRouter onUpdate={logPageView}>
      <App/>
    </BrowserRouter>
  </Provider>, document.getElementById('root')
);

registerServiceWorker();

@@ -570,16 +570,33 @@
 72204-1'
+, %7B debug: true %7D
 );%0A%0Afunc

Set react-ga to debug mode