File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,11 @@ Alternatively, you can set this variable in your environment:
157
157
export SCARF_ANALYTICS=false
158
158
```
159
159
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
+
160
165
Either route will disable Scarf for all packages.
161
166
162
167
#### I distribute a package on npm, and scarf-js is in our dependency tree. Can I disable the analytics for my downstream dependents?
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ function logIfVerbose (toLog, stream) {
55
55
// SCARF_NO_ANALYTICS was the original variable, we'll get rid of it eventually
56
56
const userHasOptedOut = ( rootPackage ) => {
57
57
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' )
59
59
}
60
60
61
61
const userHasOptedIn = ( rootPackage ) => {
You can’t perform that action at this time.
0 commit comments