# @gauf/tracker

> Browser tracker with perfect customization

Latest version **1.3.5** (published 2019-01-01) · 0 weekly downloads

## Install

```sh
npm install @gauf/tracker
pnpm add @gauf/tracker
yarn add @gauf/tracker
bun add @gauf/tracker
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.5 |
| Published | 2019-01-01 |
| First published | 2019-01-01 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 83.9 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | yes |
| GitHub stars | 5 |
| Maintainers | xufocoder |
| Keywords | browser, tracker, privacy |

## Links

- npm: https://www.npmjs.com/package/@gauf/tracker
- Repository: https://github.com/open-antifraud/tracker
- Homepage: https://github.com/open-antifraud/tracker#readme
- Issues: https://github.com/open-antifraud/tracker/issues
- npm.io page: https://npm.io/package/@gauf/tracker

## Dependencies (6)

- [rollup](https://npm.io/package/rollup.md) ^1.0.0
- [tslint](https://npm.io/package/tslint.md) ^5.12.0
- [typescript](https://npm.io/package/typescript.md) ^3.2.2
- [@types/node](https://npm.io/package/@types/node.md) ^10.12.18
- [rollup-plugin-uglify](https://npm.io/package/rollup-plugin-uglify.md) ^6.0.0
- [rollup-plugin-typescript2](https://npm.io/package/rollup-plugin-typescript2.md) ^0.18.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.3.5 (latest) — 2019-01-01
- 1.2.0 — 2019-01-01

## README

Gauf Tracker
============
[![npm version](https://badge.fury.io/js/%40gauf%2Ftracker.svg)](https://badge.fury.io/js/%40gauf%2Ftracker)
[![Build Status](https://travis-ci.com/open-antifraud/tracker.svg?branch=master)](https://travis-ci.com/open-antifraud/tracker) [![Coverage Status](https://coveralls.io/repos/github/open-antifraud/tracker/badge.svg?branch=master)](https://coveralls.io/github/open-antifraud/tracker?branch=master)

Browser tracker with perfect customization

## Installation

```bash
npm install @gauf/tracker --save
```

## Usage

```javascript
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

* [Use `fingeprint2` as custom metric emitter](./examples/fingerprint2/)
* [Use `msgpack` as custom packer](./examples/msgpack/)
* [Custom tracker with tokens support](./examples/tokens/)

---
_Source: https://npm.io/package/@gauf/tracker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
