<commit_before>import analyticsObject from 'emberconf-2014-demo/utils/analyticsObject';
import analyticsSendHandlers from 'emberconf-2014-demo/utils/analyticsSendHandlers';

export default function analyticsHandler(actionName) {
  /* Get router handle by scope (different: send versus action) */
  var target = this.target;
  var router = target ? target.router : this.router.router;

  /* If there is a currently active transition, grab the target name */
  var activeTransition = router.activeTransition && router.activeTransition.targetName;

  /* Get the active leaf-most route name */
  var curHandlerInfos = router.currentHandlerInfos;
  var activeLeafMostRoute = curHandlerInfos[curHandlerInfos.length - 1].name;

  /**
   Fetch the correct analytics route handler object from the lookup table based on the following, in order:<commit_msg>Dirty fix to analyticsHandler.js<commit_after>import analyticsObject from 'emberconf-2014-demo/utils/analyticsObject';
import analyticsSendHandlers from 'emberconf-2014-demo/utils/analyticsSendHandlers';

export default function analyticsHandler(actionName) {
  /* Get router handle by scope (different: send versus action) */
  var target = this.target;
  var router = target ? target.router : this.router.router;

  if (!router) {
    this._super.apply(this, arguments);
    return;
  }

  /* If there is a currently active transition, grab the target name */
  var activeTransition = router.activeTransition && router.activeTransition.targetName;

  /* Get the active leaf-most route name */
  var curHandlerInfos = router.currentHandlerInfos;
  var activeLeafMostRoute = curHandlerInfos[curHandlerInfos.length - 1].name;

  /**
   Fetch the correct analytics route handler object from the lookup table based on the following, in order:
{'fraction_non_alphanumeric': 0.08459383753501401, 'fraction_numerical': 0.010084033613445379, 'mean_word_length': 4.742765273311897, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5082526', 'n_tokens_mistral': 487, 'n_tokens_neox': 461, 'n_words': 155}