# event-trackr

> Track events in an easy way

Latest version **1.0.2** (published 2017-11-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install event-trackr
pnpm add event-trackr
yarn add event-trackr
bun add event-trackr
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-11-20 |
| First published | 2017-11-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | gaoryrt |
| Maintainers | gaoryrt |
| Keywords | event track |

## Links

- npm: https://www.npmjs.com/package/event-trackr
- Repository: https://github.com/gaoryrt/event-trackr
- npm.io page: https://npm.io/package/event-trackr

## Dependencies (2)

- [huntjs](https://npm.io/package/huntjs.md) ^4.0.0
- [mutationobserver-shim](https://npm.io/package/mutationobserver-shim.md) ^0.3.2

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2017-11-20
- 1.0.0 — 2017-11-20

## README

# event-trackr
> Track events in an easy way

## install
```javascript
yarn add event-trackr
```

## usage
1. import event-trackr:
```javascript
import eventTrackr from 'event-trackr'
```

2. tell event-trackr which nodes & what events you wanna track:
```javascript
new eventTrackr([{
  node:  'video',
  play:  'play_vdo',
  pause: 'pause_vdo',
  end:   'end_vdo'
}, {
  node:  '.img',
  ready: 'img_ready',
  show:  'img_show',
  hide:  'img_hide'
}], handleEventFunc)

function handleEventFunc(event) {
  // collect and send to server or whatever you want
}
```

## todo
- [ ] code comments
- [ ] promises
- [ ] example

## contributing
1. Fork it!
2. Create your feature branch: `git checkout -b MY-NEW-FEATURE`
3. Commit your changes: `git commit -am 'ADD SOME FEATURE'`
4. Push to the branch: `git push origin MY-NEW-FEATURE`
5. Submit a pull request :D

---
_Source: https://npm.io/package/event-trackr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
