diff --git a/client/build/components/GAListener/index.js b/client/build/components/GAListener/index.js index b69e3a54..2c3cb57c 100644 --- a/client/build/components/GAListener/index.js +++ b/client/build/components/GAListener/index.js @@ -41,9 +41,9 @@ if (!_siteConfig.default) { if (_siteConfig.default.analytics) { googleId = _siteConfig.default.analytics.googleId; -} -_reactGa.default.initialize(googleId); + _reactGa.default.initialize(googleId); +} var GAListener = /*#__PURE__*/ diff --git a/client/src/components/GAListener/index.jsx b/client/src/components/GAListener/index.jsx index 63afb758..f0293a6e 100644 --- a/client/src/components/GAListener/index.jsx +++ b/client/src/components/GAListener/index.jsx @@ -12,10 +12,9 @@ if (!siteConfig) { if (siteConfig.analytics) { ({ googleId } = siteConfig.analytics); + GoogleAnalytics.initialize(googleId); } -GoogleAnalytics.initialize(googleId); - class GAListener extends React.Component { componentDidMount () { this.sendPageView(this.props.history.location);