export default function initGoogleAnalytics(port) {
  port.subscribe((path) => {
    ga && ga('set', 'page', path);
    ga && ga('send', 'pageview');
  });
}

const ga = window.ga || undefined;
export default function initGoogleAnalytics(port) {
  port.subscribe((path) => {
    ga && ga('set', 'page', path);
    ga && ga('send', 'pageview');
  });
}

Make ga always an existing variable
Make ga always an existing variable
