Skip to content

Commit ca75494

Browse files
authored
Merge pull request #67 from scarf-sh/ISSUE-53-Do-not-track
[ISSUE-53] DO_NOT_TRACK
2 parents ba916b8 + 5a5273d commit ca75494

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ Alternatively, you can set this variable in your environment:
157157
export SCARF_ANALYTICS=false
158158
```
159159

160+
You can also set this variable in accordance to the [Console Do Not Track](https://consoledonottrack.com/) standard:
161+
```shell
162+
export DO_NOT_TRACK=1
163+
```
164+
160165
Either route will disable Scarf for all packages.
161166

162167
#### I distribute a package on npm, and scarf-js is in our dependency tree. Can I disable the analytics for my downstream dependents?

report.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function logIfVerbose (toLog, stream) {
5555
// SCARF_NO_ANALYTICS was the original variable, we'll get rid of it eventually
5656
const userHasOptedOut = (rootPackage) => {
5757
return (rootPackage && rootPackage.scarfSettings && rootPackage.scarfSettings.enabled === false) ||
58-
(process.env.SCARF_ANALYTICS === 'false' || process.env.SCARF_NO_ANALYTICS === 'true')
58+
(process.env.SCARF_ANALYTICS === 'false' || process.env.SCARF_NO_ANALYTICS === 'true' || process.env.DO_NOT_TRACK === '1')
5959
}
6060

6161
const userHasOptedIn = (rootPackage) => {

0 commit comments

Comments
 (0)