JavaScript
Switch branches/tags
Nothing to show
Clone or download
Latest commit 44cc124 Jun 25, 2017
Permalink
Failed to load latest commit information.
src Initial commit! Jun 25, 2017
test Initial commit! Jun 25, 2017
.babelrc Initial commit! Jun 25, 2017
.editorconfig Initial commit! Jun 25, 2017
.eslintrc Initial commit! Jun 25, 2017
.gitignore Initial commit! Jun 25, 2017
.travis.yml Initial commit! Jun 25, 2017
LICENSE Initial commit! Jun 25, 2017
README.md Initial commit! Jun 25, 2017
package-lock.json Initial commit! Jun 25, 2017
package.json 1.0.2 Jun 25, 2017
rollup.config.js Initial commit! Jun 25, 2017

README.md

untrace

Minimal event tracking on the client in 300 bytes.

  • Only 300 bytes gzipped.
  • Easy to use with only two functions.
  • Modern browser support.
npm travis

Install

This library is built with node and npm and are required for installation.

1. Install the library with npm.

$ npm install --save untrace

2. Import the library in your project.

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.
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.
untrace.send({
  type: 'performance',
  value: '200ms'
});

License

MIT License © Colin van Eenige