{"size": 373, "ext": "js", "max_stars_repo_path": "gatsby-browser.js", "max_stars_repo_name": "geonu/blog-1", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "gatsby-browser.js", "max_issues_repo_name": "geonu/blog-1", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "gatsby-browser.js", "max_forks_repo_name": "geonu/blog-1", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.0833333333, "max_line_length": 89, "alphanum_fraction": 0.6863270777}
import ReactGA from 'react-ga';
ReactGA.initialize('UA-77395473-1');

exports.onRouteUpdate = (state, page, pages) => {
  if ( state.location.search.includes('isAdmin') ) {
    window.localStorage.setItem('isAmdin', 'true');
  }
  if (process.env.NODE_ENV === 'production' && !window.localStorage.getItem('isAmdin')) {
    ReactGA.pageview(state.location.pathname);
  }
};
