Gauf Tracker
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