How to use the analytics.E function in analytics

To help you get started, we’ve selected a few analytics 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 dlopuch / venture-dealr / public / js / stores / scrollSpyStore.js View on Github external
function queueLogScenarioActivation(scenario) {
  var firstTime = !spyTargetsTriggered[scenario];
  spyTargetsTriggered[scenario] = true;

  // Fire queued event from last scenario
  if (doLogLastActivation) {
    doLogLastActivation();
  }

  // Log that we triggered it
  analytics.event(analytics.E.SCROLL_SPY.ID, analytics.E.SCROLL_SPY.SCENARIO_TRIGGERED, scenario, firstTime ? 1 : 0);

  // But also queue up an event that will fire with how long we stayed on it when we visit the next scenario...

  var scenarioHitMs = Date.now();

  doLogLastActivation = function() {
    // cleanup
    doLogLastActivation = null;
    clearTimeout(doLogLastActivationTimeout);

    // log the previous event
    var timeSpentMs = Date.now() - scenarioHitMs;
    analytics.event(analytics.E.SCROLL_SPY.ID, analytics.E.SCROLL_SPY.SCENARIO_DURATION, scenario, timeSpentMs);

    // queue up a watchdog
    doLogLastActivationTimeout = setTimeout(doLogLastActivation, 6 * 60 * 1000);
github dlopuch / venture-dealr / public / js / views / scrollSpyContents / UnderwaterOptionsExit.jsx View on Github external
.on('slideStop', function(slideEndValue) {
      analytics.event(
        analytics.E.SLIDER.ID,
        analytics.E.SLIDER.SLIDE_STOP,
        SCROLLSPY_PROPS.id,
        Date.now() - slideStartMs,
        {
          startValue: slideStartValue,
          endValue: slideEndValue
        }
      );
    });
  },
github dlopuch / venture-dealr / public / js / views / scrollSpyContents / SeriesC.jsx View on Github external
switchToPercentage() {
    analytics.event(
      analytics.E.ROUND_CHART_BUTTON.ID,
      analytics.E.ROUND_CHART_BUTTON.PERCENTAGE_VIEW,
      SCROLLSPY_PROPS.id
    );
    actions.chart.selectMeasure('percentages');
  },
github dlopuch / venture-dealr / public / js / views / scrollSpyContents / LiquidationPreferencesExit.jsx View on Github external
.on('slideStop', function(slideEndValue) {
      analytics.event(
        analytics.E.SLIDER.ID,
        analytics.E.SLIDER.SLIDE_STOP,
        SCROLLSPY_PROPS.id,
        Date.now() - slideStartMs,
        {
          startValue: slideStartValue,
          endValue: slideEndValue
        }
      );
    });
  },
github dlopuch / venture-dealr / public / js / views / scrollSpyContents / DownRound.jsx View on Github external
switchToPercentages() {
    analytics.event(
      analytics.E.ROUND_CHART_BUTTON.ID,
      analytics.E.ROUND_CHART_BUTTON.PERCENTAGE_VIEW,
      SCROLLSPY_PROPS.id
    );
    actions.chart.selectMeasure('percentages');
  },
github dlopuch / venture-dealr / public / js / views / scrollSpyContents / SeriesC.jsx View on Github external
switchToValue() {
    analytics.event(
      analytics.E.ROUND_CHART_BUTTON.ID,
      analytics.E.ROUND_CHART_BUTTON.VALUE_VIEW,
      SCROLLSPY_PROPS.id
    );
    actions.chart.selectMeasure('values');
  },
github dlopuch / venture-dealr / public / js / views / scrollSpyContents / SeedValue.jsx View on Github external
switchToValue() {
    analytics.event(
      analytics.E.ROUND_CHART_BUTTON.ID,
      analytics.E.ROUND_CHART_BUTTON.VALUE_VIEW,
      SCROLLSPY_PROPS.id
    );
    actions.chart.selectMeasure('values');
  },
github dlopuch / venture-dealr / public / js / views / scrollSpyContents / LiquidationPreferencesExit.jsx View on Github external
.on('slideStop', function(slideEndValue) {
      analytics.event(
        analytics.E.SLIDER.ID,
        analytics.E.SLIDER.SLIDE_STOP,
        SCROLLSPY_PROPS.id,
        Date.now() - slideStartMs,
        {
          startValue: slideStartValue,
          endValue: slideEndValue
        }
      );
    });
  },
github dlopuch / venture-dealr / public / js / views / scrollSpyContents / SeedValue.jsx View on Github external
switchToPercentage() {
    analytics.event(
      analytics.E.ROUND_CHART_BUTTON.ID,
      analytics.E.ROUND_CHART_BUTTON.PERCENTAGE_VIEW,
      SCROLLSPY_PROPS.id
    );
    actions.chart.selectMeasure('percentages');
  },
github dlopuch / venture-dealr / public / js / views / scrollSpyContents / UnderwaterOptionsExit.jsx View on Github external
.on('slideStop', function(slideEndValue) {
      analytics.event(
        analytics.E.SLIDER.ID,
        analytics.E.SLIDER.SLIDE_STOP,
        SCROLLSPY_PROPS.id,
        Date.now() - slideStartMs,
        {
          startValue: slideStartValue,
          endValue: slideEndValue
        }
      );
    });
  },