title: React Router NavLink not triggering history.listen() function
body: <p>I am trying to implement Google Analytics using the <code>react-ga</code> library which needs to fire whenever the route changes. I have the following setup in App.js:</p>
  
  <pre><code>import createBrowserHistory from 'history/createBrowserHistory';
  ...
  
  const history = createBrowserHistory();
  history.listen((location) =&gt; {
      console.log('ANALYTICS CODE GOES HERE', location);
  });
  
  class App extends Component {
      render() {
          return (
              &lt;Provider store={...}&gt;
                  &lt;Router history={history}&gt;
                      ....
                  &lt;/Router&gt;
              &lt;/Provider&gt;
          );
      }
  }
  
  export default App;
  </code></pre>
  
  <p>When I click on a <code>NavLink</code> throughout my app, the route changes and loads the appropriate component, but the <code>history.listen()</code> function never fires. However, if I use the browser's back/forward functionality it does fire. </p>
  
  <pre><code>&lt;NavLink to="/account" activeClassName="active"&gt;ACCOUNT&lt;/NavLink&gt;
  </code></pre>
  
  <p><strong>How do I listen to route changes triggered by a <code>NavLink</code>?</strong></p>
  
  <p>Edit: further discussion taking place here: <a href="https://github.com/react-ga/react-ga/issues/122#issuecomment-316427527" rel="nofollow noreferrer">https://github.com/react-ga/react-ga/issues/122#issuecomment-316427527</a></p>