How to use the ember-metrics/utils/object-transforms.compact function in ember-metrics

To help you get started, we’ve selected a few ember-metrics examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hummingbird-me / hummingbird-client / app / metrics-adapters / heap.js View on Github external
identify(options = {}) {
    const compactedOptions = compact(options);
    const { distinctId } = compactedOptions;
    const props = without(compactedOptions, ['distinctId', 'alias']);
    if (canUseDOM && distinctId) {
      window.heap.identify(distinctId);
      window.heap.addUserProperties(props);
    }
  },
github hummingbird-me / hummingbird-client / app / metrics-adapters / go-squared.js View on Github external
trackEvent(options = {}) {
    const compactedOptions = compact(options);
    const { eventName } = compactedOptions;
    if (!eventName) { return; }

    if (window._gs) {
      window._gs('event', eventName, without(compactedOptions, 'eventName') || {});
    }
  },
github hummingbird-me / hummingbird-client / app / metrics-adapters / intercom.js View on Github external
identify(options = {}) {
    const { appId } = get(this, 'config');
    const compactedOptions = compact(options);
    const { distinctId } = compactedOptions;
    const props = without(compactedOptions, 'distinctId');

    props.app_id = appId;
    if (distinctId) {
      props.user_id = distinctId;
    }

    const method = this.booted ? 'update' : 'boot';
    if (canUseDOM) {
      window.Intercom(method, props);
      this.booted = true;
    }
  },

ember-metrics

Send data to multiple analytics integrations without re-implementing new API

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis