Files
weave-scope/client/app/scripts/utils/tracking-utils.js
Filip Barl 65b9b48b53 Added mixpanel tracking for some basic events (#2462)
* Added mixpanel tracking for bunch of events.

* Changed hitEnter action to pinSearch.

* Moved all the event tracking out of app-actions.js

* Addressed @foot's comment.

* Added more keypress events tracking.

* Disable 'r' keyboard shortcut when Resource View is disabled
2017-04-27 14:26:07 +02:00

13 lines
344 B
JavaScript

import debug from 'debug';
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);
} else {
log('trackMixpanelEvent', name, props);
}
}