# donottrack

> Module to check the value of the DNT header

Latest version **1.1.2** (published 2017-03-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install donottrack
pnpm add donottrack
yarn add donottrack
bun add donottrack
```

## 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.1.2 |
| Published | 2017-03-27 |
| First published | 2016-04-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Guylian Cox |
| Maintainers | ephys |
| Keywords | DNT, Do Not Track, Tracking, JavaScript, Browser |

## Links

- npm: https://www.npmjs.com/package/donottrack
- Repository: https://github.com/Ephys/do-not-track
- Homepage: https://github.com/Ephys/do-not-track#readme
- Issues: https://github.com/Ephys/do-not-track/issues
- npm.io page: https://npm.io/package/donottrack

## 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.1.2 (latest) — 2017-03-27
- 1.1.1 — 2017-03-27
- 1.1.0 — 2017-03-25
- 1.0.0 — 2016-04-22

## README

# do-not-track

Accessing the user's preferences in terms of tracking can be slightly complicated. This module simplifies that.

## Install

`npm install --save donottrack`

## Usage

Browser:

```javascript
import doNotTrack from 'donottrack';

// Returns true if the user agrees to being tracked, false otherwise.
const mayTrack = doNotTrack(/* default, if preferences are not set. */ true);
```

Node:

```javascript
import doNotTrack from 'donottrack';

const mayTrack = doNotTrack(req.header('DNT'), true);
```

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