untrace

1.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i untrace

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • vaneenige