Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vaneenige/untrace
🐳 Minimal event tracking on the client in 300 bytes.
https://github.com/vaneenige/untrace
api event npm package request tracking
Last synced: about 2 months ago
JSON representation
🐳 Minimal event tracking on the client in 300 bytes.
- Host: GitHub
- URL: https://github.com/vaneenige/untrace
- Owner: vaneenige
- License: mit
- Created: 2017-06-25T16:41:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-25T19:23:38.000Z (over 7 years ago)
- Last Synced: 2024-09-22T17:07:24.411Z (3 months ago)
- Topics: api, event, npm, package, request, tracking
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/untrace
- Size: 21.5 KB
- Stars: 25
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# untrace
Minimal event tracking on the client in **300** bytes.- Only **300** bytes gzipped.
- **Easy** to use with only two functions.
- Modern browser **support**.## Install
This library is built with [node](http://nodejs.org) and [npm](https://npmjs.com) and are required for installation.
**1. Install the library with npm.**
```sh
$ npm install --save untrace
```**2. Import the library in your project.**
```javascript
import untrace from 'untrace';
```## Usage
This library provides two functions:
**start()**
- Creates an unique hash for the browser (once).
- Creates an unique hash for the session (repeat).
- Should be configured with endpoint for all requests.```js
const endpoint = './api';
untrace.start(endpoint);
```**send()**
- Combines parameters with browser and session hashes.
- Custom parameters are not limited in amount.
- Posts the combined parameters to the endpoint.```js
untrace.send({
type: 'performance',
value: '200ms'
});
```## License
[MIT License](LICENSE) © [Colin van Eenige](https://use-the-platform.com/)