This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// index.js | |
import React, { Component } from 'react' | |
import ReactDOM from 'react-dom' | |
import { BrowserRouter, Switch, Route } from 'react-router-dom' | |
import UnauthorizedLayout from 'layouts/UnauthorizedLayout' | |
import ErrorLayout from 'layouts/ErrorLayout' | |
import AuthorizedLayout from 'layouts/AuthorizedLayout' | |
import AuthorizedRoute from 'custom-routes/AuthorizedRoute' | |
import GA from 'utils/GoogleAnalytics' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// utils/GoogleAnalytics.js | |
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import ReactGA from 'react-ga'; | |
import { Route } from 'react-router-dom'; | |
class GoogleAnalytics extends Component { | |
componentDidMount () { | |
this.logPageChange( | |
this.props.location.pathname, |