tracking: Use segment for tracking

Align scope to the rest of the platform.
This commit is contained in:
Damien Lespiau
2017-09-22 16:51:37 +01:00
parent 75c8b6a269
commit 3f6faa5371

View File

@@ -4,8 +4,8 @@ const log = debug('service:tracking');
// Track mixpanel events only if Scope is running inside of Weave Cloud.
export function trackMixpanelEvent(name, props) {
if (window.mixpanel && process.env.WEAVE_CLOUD) {
window.mixpanel.track(name, props);
if (window.analytics && process.env.WEAVE_CLOUD) {
window.analytics.track(name, props);
} else {
log('trackMixpanelEvent', name, props);
}