@gauf/tracker

1.3.5 • Public • Published

Gauf Tracker

npm version Build Status Coverage Status

Browser tracker with perfect customization

Installation

npm install @gauf/tracker --save

Usage

import Tracker from '@gauf/tracker';

const tracker = new Tracker('http://receive.service', {
  heartbeat: 10000,
  collector: {
    settings: {

    }
  }
});

tracker.activate({ userId: 1 });

URL

Examples:

  • console://debug-receiver
  • https://receive.service
  • http://receive.service
  • wws://receive.service
  • ws://receive.service

Tracker detect transport according URL parameter

Settings

heartbeat?: number;
collector?: {
  emitters?: InterfaceEmitterConstructor[];
  settings?: {
    [key: string]: object,
  }
};
transport?: object;
packer?: Packer<any>;
  • heartbeat - how often to send metrics, default: 5000 microseconds
  • collector - class array of metric emitters, with settings of each
  • transport - transport settings for detected transport
  • packer - packer function, default: JSON.stringify

Examples

Readme

Keywords

Package Sidebar

Install

npm i @gauf/tracker

Weekly Downloads

1

Version

1.3.5

License

none

Unpacked Size

85.9 kB

Total Files

84

Last publish

Collaborators

  • xufocoder