<commit_before>/* global window,_gaq,ga */
(function($) {
  $.gaTrack = function(category, action, label) {
    if ($.gaTrack.prefix) {
      category = $.gaTrack.prefix + '-' + category;
    }

    if ($.gaTrack.debug) {
      console.log('GA TRACK', category, action, label);
    }
    if (typeof window._gaq === 'undefined' && typeof window.ga === 'undefined') {
      return this;
    }

    if(typeof window._gaq !== 'undefined') {
      _gaq.push(['_trackEvent', category, action, label, null, false]);
    } else {
      ga('send', 'event', category, action, label);
    }
  };

  $.gaTrack.debug = false;
  $.gaTrack.prefix = null;

  $.gaTrackScroll = function() {
    var $body = $('body');
    var scrollPercent = 0;
    var lastPos = 0;
    var scrollTriggers = {
      'scroll': false,
      '25': false,
      '50': false,
      '75': false,
      '100': false
    };

    var scrollCheck = function() {
      scrollPercent = ~~(5*Math.round((window.scrollY/($body.height()-window.innerHeight)*100)/5));

      if (lastPos !== scrollPercent) {
        lastPos = scrollPercent;
      }

      if (!scrollTriggers.scroll) {<commit_msg>expose $.gaTrack.autoTracking() to return what is currently being tracked on page<commit_after>/* global window,_gaq,ga */
(function($) {
  $.gaTrack = function(category, action, label) {
    if ($.gaTrack.prefix) {
      category = $.gaTrack.prefix + '-' + category;
    }

    if ($.gaTrack.debug) {
      console.log('GA TRACK', category, action, label);
    }
    if (typeof window._gaq === 'undefined' && typeof window.ga === 'undefined') {
      return this;
    }

    if(typeof window._gaq !== 'undefined') {
      _gaq.push(['_trackEvent', category, action, label, null, false]);
    } else {
      ga('send', 'event', category, action, label);
    }
  };

  $.gaTrack.debug = false;
  $.gaTrack.prefix = null;

  $.gaTrack.autoTracking = function() {
    var tracking = [];
    $('[data-ga-track]').each(function() {
      var el = $(this);
      var data = getDataFromElement(el);
      data.el = el;
      tracking.push(data);
    });
    return tracking;
  };

  $.gaTrackScroll = function() {
    var $body = $('body');
    var scrollPercent = 0;
    var lastPos = 0;
    var scrollTriggers = {
      'scroll': false,
      '25': false,
      '50': false,
      '75': false,
      '100': false
    };

    var scrollCheck = function() {
      scrollPercent = ~~(5*Math.round((window.scrollY/($body.height()-window.innerHeight)*100)/5));

      if (lastPos !== scrollPercent) {
        lastPos = scrollPercent;
      }

      if (!scrollTriggers.scroll) {
{'fraction_non_alphanumeric': 0.17667304015296367, 'fraction_numerical': 0.012237093690248566, 'mean_word_length': 2.5786593707250343, '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': '4284391', 'n_tokens_mistral': 868, 'n_tokens_neox': 839, 'n_words': 192}