(function() {
  module.exports = {
    queue: [],
    source: 'survey-2015-1',
    setReporter: function(reporter) {
      var event, _i, _len, _ref;
      this.reporter = reporter;
      _ref = this.queue;
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        event = _ref[_i];
        this.reporter.sendEvent.apply(this.reporter, event);
      }
      return this.queue = null;
    },
    sendEvent: function(action, label, value) {
      if (this.reporter) {
        return this.reporter.sendEvent(this.source, action, label, value);
      } else {
        return this.queue.push([this.source, action, label, value]);
      }
    }
  };

}).call(this);
