Bladeren bron

Fix google analytics

poeti8 6 jaren geleden
bovenliggende
commit
1cf87f6681
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 1 1
      client/components/BodyWrapper/BodyWrapper.js
  2. 1 1
      client/helpers/analytics.js

+ 1 - 1
client/components/BodyWrapper/BodyWrapper.js

@@ -42,7 +42,7 @@ const ContentWrapper = styled.div`
 
 class BodyWrapper extends React.Component {
   componentDidMount() {
-    if (process.env.GOOGLE_ANALYTICS_ID) {
+    if (process.env.GOOGLE_ANALYTICS) {
       if (!window.GA_INITIALIZED) {
         initGA();
         window.GA_INITIALIZED = true;

+ 1 - 1
client/helpers/analytics.js

@@ -1,7 +1,7 @@
 import ReactGA from 'react-ga';
 
 export const initGA = () => {
-  ReactGA.initialize(process.env.GOOGLE_ANALYTICS_ID);
+  ReactGA.initialize(process.env.GOOGLE_ANALYTICS);
 };
 
 export const logPageView = () => {