{"id":13438885,"url":"https://github.com/mnutt/hummingbird","last_synced_at":"2025-05-15T14:02:10.916Z","repository":{"id":66381877,"uuid":"605475","full_name":"mnutt/hummingbird","owner":"mnutt","description":"Real time web analytics using node.js and web sockets","archived":false,"fork":false,"pushed_at":"2016-07-17T13:52:41.000Z","size":1917,"stargazers_count":2918,"open_issues_count":14,"forks_count":10,"subscribers_count":83,"default_branch":"master","last_synced_at":"2025-04-15T03:49:39.734Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://mnutt.github.com/hummingbird","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mnutt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2010-04-11T20:18:46.000Z","updated_at":"2025-03-09T19:40:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4f5ffa8-7bcb-4094-b667-6b366edd50af","html_url":"https://github.com/mnutt/hummingbird","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnutt%2Fhummingbird","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnutt%2Fhummingbird/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnutt%2Fhummingbird/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnutt%2Fhummingbird/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mnutt","download_url":"https://codeload.github.com/mnutt/hummingbird/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355321,"owners_count":22057352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:01:09.301Z","updated_at":"2025-05-15T14:02:10.824Z","avatar_url":"https://github.com/mnutt.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"HUMMINGBIRD\n===========\n\nSite tracking and analytics storage\n\n\nDescription\n---------------\n\nHummingbird serves a 1x1 tracking pixel to users.  In the browser's GET request it\nsends back tracking data generated by javascript.\n\n\nRequirements\n-------------------\n\n * node.js v0.8.0 or higher\n\nInstallation\n--------------\n\n    git clone git://github.com/mnutt/hummingbird.git\n    cd hummingbird\n\n    # Use npm to install the dependencies\n    npm install\n\n    # To use the map, download MaxMind's GeoIP database and extract to the root directory:\n    wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz\n    gunzip GeoLiteCity.dat.gz\n\n\nRunning Hummingbird\n------------------------------\n\nTo start the analytics server, run the following:\n\n    node server.js\n\nBy default a dashboard will be run on port 8080.  You can disable it for production use in\nconfig/config.js.  The dashboard is just html served out of public/; you can serve it using\nany webserver.\n\n\nDeployment\n----------\n\nMake sure to properly secure the dashboard if you don't want outside people to see it. This\ntypically means putting the dashboard behind nginx or apache using basic auth. The dashboard's\n'listen' function takes a second argument that is the interface to bind; typically you\nwould choose \"127.0.0.1\" to only allow access from localhost, or \"0.0.0.0\" to listen on all\ninterfaces.  You should then run the tracking pixel on a different port so that it is accessible\nto the outside world.\n\n\nSetting Up Tracking\n-------------------\n\nThe file `client/hummingbird.js` contains a small script to trigger a hummingbird event.  You\ncan either paste the contents of the file into the body of your webpage or you can upload it\nto your server as a .js file and reference it with a `\u003cscript\u003e` tag.  Once you have done so,\nin the footer of your page you can call\n\n    HummingbirdTracker.track();\n\nCalled with no arguments, it will send over some standard parameters such as the page URL.  You\ncan also pass arbitrary data with the event:\n\n    HummingbirdTracker.track({logged_in: true});\n\nThe data can be used within Hummingbird's metrics to filter events on the backend.\n\n\nArchitecture Overview\n---------------------\n\nHummingbird is organized into two parts: a node.js-based tracking server that records user\nactivity via a tracking pixel, and a collection of javascript-based widgets that display that\nactivity.  The server broadcasts all activity to the clients using Websockets if possible, and\nfalls back to Flash sockets or long polling if necessary.\n\nThe Hummingbird.WebSocket object receives websocket events from the server in the form of JSON\nobjects.  Individual widgets subscribe to a metric and register handler functions to be called\nwhenever that metric is present.\n\n\nLogging Customization\n---------------------\n\nMetrics are stored in lib/metrics and auto-loaded. Each metric contains a handler function that is\ncalled every time a new user event occurs.  Metrics store data in the `data` object property which\ngets emitted to clients in intervals specified by the metric. A basic example can be found in\nlib/metrics/total_views.js. An example of how a metric can filter based on query params is in\nlib/metric/cart_adds.js.\n\n\nDisplay Customization\n---------------------\n\nHummingbird comes with some stock widgets (Counter, Logger, Graph) that demonstrate how to hook into\nthe data provided by the node.js server.  For the minimum amount required to create a widget, see\npublic/js/widgets/logger.js.  A widget is an object whose prototype extends Hummingbird.Base and\nimplements onMessage.\n\n\nTips\n-----\n\n * To run the UI locally but stream data from your production server, use the url http://localhost:8080/?ws_server=your-host.com\u0026ws_port=12345\n\n\nContributors\n------------\n\n * Michael Nutt \u003cmichael@nuttnet.net\u003e\n * Benny Wong \u003cbenny@bwong.net\u003e\n * mikecampo\n * caphrim007\n * brianjriddle\n * lbosque\n * robertjwhitney\n * Dan Thurman\n * thinkroth\n * markwillis82\n * ochronus\n * dannyakakong\n * xinbenlv\n\n\nLicense\n-------\n\nHummingbird is licensed under the MIT License. (See LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnutt%2Fhummingbird","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmnutt%2Fhummingbird","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnutt%2Fhummingbird/lists"}