import ReactGA from 'react-ga'

if (typeof window !== 'undefined') {
  ReactGA.initialize('UA-77053427-1')
}

export const pageView = () => {
  const page = window.location.pathname

  ReactGA.set({page})
  ReactGA.pageview(page)
}

import ReactGA from 'react-ga'

const dev = process.env.NODE_ENV === 'development'

if (typeof window !== 'undefined' && !dev) {
  ReactGA.initialize('UA-77053427-1')
}

export const pageView = () => {
  if (dev) return

  const page = window.location.pathname

  ReactGA.set({page})
  ReactGA.pageview(page)
}

Disable analytics in dev