Track ecommerce `event` with `track`
with optional `arr` to append.

@api private
@param {string} event
@param {Track} track
@param {Array} arr
357563
function ecommerce(event, track, arr) {
  push.apply(null, [
    '_fxm.ecommerce.' + event,
    track.id() || track.sku(),
    track.name(),
    track.category()
  ].concat(arr || []));
}
1173913
def track(name, properties = {}, options = {})
      if exclude?
        debug "Event excluded"
      elsif missing_params?
        debug "Missing required parameters"
      else
        data = {
          visit_token: visit_token,
          user_id: user.try(:id),
          name: name.to_s,
          properties: properties,
          time: trusted_time(options[:time]),
          event_id: options[:id] || generate_id
        }.select { |_, v| v }

        @store.track_event(data)
      end
      true
    rescue => e
      report_exception(e)
    end
485331
def ga_track_event(category, action, label = nil, value = nil)
      ga_events.push(GoogleAnalytics::Event.new(category, action, label, value))
    end
759926
function _findIndex(arr, onFind) {
  let foundIndex = -1;

  util.forEach(arr, (item, index) => {
    let nextFind = true;
    if (onFind(item, index)) {
      foundIndex = index;
      nextFind = false;
    }

    return nextFind;
  });

  return foundIndex;
}
471281
def event_tracker(func):
    
    @wraps(func)
    async def wrapper(*args, **kwargs):
        """
        Wraps function to provide redis
        tracking
        """
        event = Event(args[0])
        session = kwargs['session']
        service_name = session.name
        await track_event(event, EventState.started, service_name)
        await func(*args, **kwargs)
        await track_event(event, EventState.completed, service_name)
    return wrapper
895412
function (arr, tag, place, update) {
      var self = this
      if (!arr) return
      arr.map(function (obj) {
        var parent = (obj.body) ? self.getPlace('body') : self.getPlace(place)
        var el = window.document.getElementById(obj.id) || window.document.createElement(tag)
        // Elements that will substitute data
        if (el.hasAttribute('id')) {
          self.prepareElement(obj, el)
          return
        }
        // Other elements
        el = self.prepareElement(obj, el)
        // Updated elements
        if (update) {
          diffEls.push(el)
          return
        }
        // Append Elements
        self.add(obj, el, parent)
      })
    }
599012
function _setEvents(eventsArray){

    for (let i = 0; i < eventsArray.length; i++){

        let event = eventsArray[i];
        dataManager.registerEvent(event[0], event[1], event[2]);

    }

}
652975
function addEventListener(event, listener) {
    this._eventListeners[event] = this._eventListeners[event] || [];
    this._eventListeners[event].push(listener);
  }
41212
function onPointerUpCaptured( tracker, event ) {
        var pointsList = tracker.getActivePointersListByType( getPointerType( event ) );
        if ( pointsList.getById( event.pointerId ) ) {
            handlePointerUp( tracker, event );
        }
        $.stopEvent( event );
    }
131232
def link_to_tracked_if(condition, name, track_path = "/", options = {}, html_options = {}, &block)
      raise AnalyticsError.new("You must set Rubaidh::GoogleAnalytics.defer_load = false to use outbound link tracking") if GoogleAnalytics.defer_load == true
      html_options.merge!({:onclick => tracking_call(track_path)})
      link_to_unless !condition, name, options, html_options, &block
    end
894721
function google(e) {
    var tracker = this.tracking.ga;
    if (!tracker) return;

    ga(function done() {
      ga.getByName(tracker).send.apply(
        tracker,
        [ 'event' ].concat($(e.element).get('track').split(';'))
      );
    });
  }
134322
function (trackIndex, animation, loop, delay) {
		var entry = new spine.TrackEntry();
		entry.animation = animation;
		entry.loop = loop;
		entry.endTime = animation.duration;

		var last = this._expandToIndex(trackIndex);
		if (last) {
			while (last.next)
				last = last.next;
			last.next = entry;
		} else
			this.tracks[trackIndex] = entry;

		if (delay <= 0) {
			if (last)
				delay += last.endTime - this.data.getMix(last.animation, animation);
			else
				delay = 0;
		}
		entry.delay = delay;

		return entry;
	}
393132
function encodeTrack(track) {
    var events = track.getEvents(), data = [],
        length = events.length, i,
        runningStatus = null, result;

    for (i = 0; i < length; i += 1) {
        result = encodeEvent(events[i], runningStatus);
        runningStatus = result.runningStatus;

        data[i] = result.data;
    }

    return encodeChunk('MTrk', buffer.Buffer.concat(data));
}
1170427
def add_tracks(self, track):
        
        from trackhub import BaseTrack
        if isinstance(track, BaseTrack):
            self.add_child(track)
            self._tracks.append(track)
        else:
            for t in track:
                self.add_child(t)
                self._tracks.append(t)
520955
function ( tracker, gPoint ) {
            var guid = _generateGuid( tracker, gPoint );

            trackerPoints.push(
                {
                    guid: guid,
                    gPoint: gPoint,
                    lastPos: gPoint.currentPos
                } );

            // Only fire up the interval timer when there's gesture pointers to track
            if ( trackerPoints.length === 1 ) {
                lastTime = $.now();
                intervalId = window.setInterval( _doTracking, 50 );
            }
        }
781003
function createProductTrack(track, properties) {
  properties.currency = properties.currency || track.currency();
  return new Track({ properties: properties });
}
896454
function(eventName, eventParams) {
    if (Object.prototype.toString.call(name) === '[object String]' && ! _contains(sentEvents, eventName)) {
      sentEvents.push(eventName);
      UT.Expression._postInstance().track(eventName, eventParams);
    }
  }