segmentio/analytics.js — pull request #301 by ivolo (2013-10-24 20:33:33+00:00)
Title: adding event emitter to analytics prototype

Adds event emitter to the analytics prototype, and emits on all events, like `identify`, `track`, `group`, and `alias`.

The use case we've heard from customers is to allow hooking in javascript providers that we don't support yet without ever leaving the analytics.js API.

For example if we don't support provider `bigdata`, they can integration with analytics.js anyway, and add a line like so:

```js
analytics.on('track', function (event, properties, options) {
bigdata.recordEvent(event, properties);
});
```