This commit is contained in:
2019-05-30 04:40:30 +10:00
parent 2f8847d2e7
commit aeffc9f4ce
@@ -16,7 +16,7 @@ class GoogleAnalytics extends React.Component {
componentDidUpdate({location: prevLocation}) { componentDidUpdate({location: prevLocation}) {
const { location: { pathname, search } } = this.props; const { location: { pathname, search } } = this.props;
const isDifferentPathname = pathname !== prevLocation.pathname; const isDifferentPathname = pathname !== prevLocation.pathname;
const idDifferentSearch = search !== prevLocation.search; const isDifferentSearch = search !== prevLocation.search;
if (isDifferentPathname || isDifferentSearch) { if (isDifferentPathname || isDifferentSearch) {
this.logPageChange(pathname, search); this.logPageChange(pathname, search);