@gauf/tracker
Browser tracker with perfect customization
Last updated 8 months ago by xufocoder .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @gauf/tracker 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.3.5                                ...           latest (8 months ago)

2 Versions

  • 1.3.5                                ...           8 months ago
  • 1.2.0 [deprecated]           ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 4
Dependencies (6)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |