Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
feat(containers/App): replace custom GA with react-ga
Browse files Browse the repository at this point in the history
feat(containers/App): replace custom GA with react-ga
  • Loading branch information
Metnew committed Sep 17, 2017
1 parent 939c31f commit 6d53628
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions src/common/containers/App/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {CLOSE_SIDEBAR, OPEN_SIDEBAR, WINDOW_RESIZE} from 'actions/layout'
import {LOGOUT_AUTH} from 'actions/auth'
import {getAuthState, getLayoutState} from 'selectors'
import {getWindowInnerWidth} from 'const'
import ReactGA from 'react-ga'
// Import styled components
import {
PageLayout,
Expand Down Expand Up @@ -85,24 +86,9 @@ class App extends Component {
// }
//
// NOTE: uncomment if you use Google Analytics
// if (process.env.GA_ID) {
// const script = document.createElement('script')
// script.type = 'text/javascript'
// script.async = true
// script.crossorigin = 'anonymous'
// script.onload = () => {
// window.ga =
// window.ga ||
// function () {
// ;(ga.q = ga.q || []).push(arguments)
// }
// ga.l = Number(new Date())
// ga('create', process.env.GA_ID, 'auto')
// ga('send', 'pageview')
// }
// script.src = 'https://www.google-analytics.com/analytics.js'
// document.body.appendChild(script)
// }
if (process.env.GA_ID) {
ReactGA.initialize(process.env.GA_ID)
}
}

/**
Expand Down

0 comments on commit 6d53628

Please sign in to comment.