Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crcastle/hummingbird
Real-time web analytics with node.js and mongodb
https://github.com/crcastle/hummingbird
Last synced: 3 months ago
JSON representation
Real-time web analytics with node.js and mongodb
- Host: GitHub
- URL: https://github.com/crcastle/hummingbird
- Owner: crcastle
- License: mit
- Created: 2010-12-28T06:02:13.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2011-01-19T23:27:51.000Z (about 14 years ago)
- Last Synced: 2023-03-12T03:22:27.601Z (almost 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 434 KB
- Stars: 9
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
HUMMINGBIRD
===========Site tracking and analytics storage
Description
---------------Hummingbird serves a 1x1 tracking pixel to users. In the browser's GET request it
sends back tracking data generated by javascript.Requirements
-------------------* node.js v0.1.96
* mongodbInstallation
--------------git clone git://github.com/mnutt/hummingbird.git
cd hummingbird# Update submodules
git submodule update --init --recursive# build the native mongo db driver
cd deps/node-mongodb-native; make# Copy the default configuration file
cp config/app.json.sample config/app.jsonRunning Hummingbird
------------------------------To start the analytics server, run the following:
mongod & (or start mongo some other way)
node server.jsBy default a dashboard will be run on port 8080. You can disable it for production use in
config/app.json. The dashboard is just html served out of public/; you can serve it using
any webserver.Architecture Overview
---------------------Hummingbird is organized into two parts: a node.js-based tracking server that records user
activity via a tracking pixel, and a collection of javascript-based widgets that display that
activity. The server records all activity in MongoDB and broadcasts it to the clients using
WebSockets if possible, and falling back to Flash sockets if necessary.The Hummingbird.WebSocket object receives websocket events from the server in the form of JSON
objects. Individual widgets subscribe to a property in the JSON tree and register handler
functions to be called whenever that property is present.Logging Customization
---------------------Metrics are stored in lib/metrics and auto-loaded.. Each metric contains a handler function that is
called every time a new user event occurs. Metrics store data in the `data` object property which
gets emitted to clients in intervals specified by the metric. A basic example can be found in
lib/metrics/all.js. An example of how a metric can filter based on urls is in lib/metric/sales.js.Display Customization
---------------------Hummingbird comes with some stock widgets (Counter, Logger, Graph) that demonstrate how to hook into
the data provided by the node.js server. For the minimum amount required to create a widget, see
public/js/widgets/logger.js. A widget is an object whose prototype extends Hummingbird.Base and
implements onMessage.Specs
--------sudo gem install jspec
jspec run --nodeTips
-----* To run the UI locally but stream data from your production server, use the url http://localhost:8080/?ws_server=your-host.com&ws_port=12345
Contributors
------------* Michael Nutt
* Benny WongLicense
-------Hummingbird is licensed under the MIT License. (See LICENSE)