https://github.com/kanongil/hapi-mixpanel
Hapi.js plugin that sends events to Mixpanel
https://github.com/kanongil/hapi-mixpanel
hapi-plugin hapijs mixpanel
Last synced: 5 months ago
JSON representation
Hapi.js plugin that sends events to Mixpanel
- Host: GitHub
- URL: https://github.com/kanongil/hapi-mixpanel
- Owner: kanongil
- Created: 2018-03-23T12:24:55.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T20:20:24.000Z (about 4 years ago)
- Last Synced: 2025-08-09T07:38:40.651Z (6 months ago)
- Topics: hapi-plugin, hapijs, mixpanel
- Language: JavaScript
- Homepage:
- Size: 176 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hapi-Mixpanel
Hapi.js plugin that adds a `server.track()` method, which sends events to Mixpanel.
[](http://travis-ci.org/kanongil/hapi-mixpanel)
Lead Maintainer - [Gil Pedersen](https://github.com/kanongil)
## Usage
Register plugin to add a `server.track()` method.
```js
await server.register({
plugin: HapiMixpanel,
options
});
```
### Registration options
- `apiKey` - Your mixpanel provided api token.
- `endpoint` - optional endpoint url used to send tracking events.
### `server.track(eventName, [properties], [timestamp])`
Records an event called `eventName` with the specified properties and timestamp.
This is queued internally, and sent to the mixpanel backend in batches.