import debug from 'debug';

const log = debug('service:tracking');

// Track mixpanel events only if Scope is running inside of Weave Cloud.
export function trackAnalyticsEvent(name, props) {
  if (window.analytics && process.env.WEAVE_CLOUD) {
    window.analytics.track(name, props);
  } else {
    log('trackAnalyticsEvent', name, props);
  }
}

import debug from 'debug';

const log = debug('service:tracking');

// Track segment events only if Scope is running inside of Weave Cloud.
export function trackAnalyticsEvent(name, props) {
  if (window.analytics && process.env.WEAVE_CLOUD) {
    window.analytics.track(name, props);
  } else {
    log('trackAnalyticsEvent', name, props);
  }
}

Fix now out of date comment
tracking: Fix now out of date comment
