Skip to content
This repository has been archived by the owner on Jun 21, 2021. It is now read-only.
/ do-not-track Public archive

Module to check the value of the DNT header

Notifications You must be signed in to change notification settings

ephys/do-not-track

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

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:

import doNotTrack from 'donottrack';

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

About

Module to check the value of the DNT header

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published