{"record":{"id":"a302b4e3e6b52905","repo":"thedotmack/claude-mem","slug":"do-not-track-is-set-in-your-environment-it-overrides","errorCode":null,"errorMessage":"DO_NOT_TRACK is set in your environment. It overrides everything: telemetry will remain OFF even after enabling here.","messagePattern":"DO_NOT_TRACK is set in your environment\\. It overrides everything: telemetry will remain OFF even after enabling here\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/npx-cli/commands/telemetry.ts","lineNumber":166,"sourceCode":"      '',\n      'Each event carries ONLY these fields:',\n      ...COLLECTED_FIELDS.map((line) => `  ${line}`),\n      '',\n      'Plus coarse location (country / region / city), derived server-side',\n      'at ingest from the request IP — the raw IP is discarded, never stored.',\n      '',\n      'NEVER collected — not now, not ever:',\n      '  prompts or conversation content, file paths, source code,',\n      '  project names, git remotes, search queries, error messages,',\n      '  IP addresses, hardware IDs, env values, emails.',\n      '',\n      `Full details: ${DOCS_URL}`,\n    ].join('\\n'),\n    'What telemetry collects'\n  );\n\n  if (process.env.DO_NOT_TRACK && process.env.DO_NOT_TRACK !== '0' && process.env.DO_NOT_TRACK !== 'false') {\n    p.log.warn(\n      'DO_NOT_TRACK is set in your environment. It overrides everything: telemetry will remain OFF even after enabling here.'\n    );\n  }\n\n  const shouldEnable = await p.confirm({\n    message: 'Enable anonymous usage telemetry?',\n    initialValue: true,\n  });\n\n  if (p.isCancel(shouldEnable) || !shouldEnable) {\n    p.cancel('Telemetry remains disabled. Nothing was written.');\n    return;\n  }\n\n  // getOrCreateInstallId() persists a config if none exists; reuse its ID.\n  const installId = getOrCreateInstallId();\n  saveTelemetryConfig({\n    enabled: true,","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/npx-cli/commands/telemetry.ts#L148-L184","documentation":"When running the telemetry enable flow, if DO_NOT_TRACK is set (to anything other than '0' or 'false') in the environment, the CLI warns that the opt-out env var overrides everything: telemetry stays OFF even if you confirm enable in the prompt. The library honors the standard DO_NOT_TRACK convention above its own settings.","triggerScenarios":"Running `claude-mem telemetry` enable and confirming 'yes' while process.env.DO_NOT_TRACK is set to a truthy value (e.g. '1', 'true', 'yes').","commonSituations":"CI containers and corporate images commonly export DO_NOT_TRACK=1 globally; users set it system-wide earlier and forget; dotfiles (.bashrc/.zshrc) export it; Docker images bake it in.","solutions":["Unset the variable for the session: `unset DO_NOT_TRACK` (or `DO_NOT_TRACK=0 claude-mem telemetry`), then run the enable flow.","Remove the `export DO_NOT_TRACK=...` line from shell profile files (.bashrc/.zshrc/.profile) for a permanent change.","Accept the override if the machine must stay opted out — the warning is informational, not a fault."],"exampleFix":"// before\nexport DO_NOT_TRACK=1   # in ~/.zshrc\n// after\nunset DO_NOT_TRACK\nnpx claude-mem telemetry   # now enable takes effect","handlingStrategy":"validation","validationCode":"// Check the override before enabling telemetry\nconst dnt = process.env.DO_NOT_TRACK;\nconst telemetryBlocked = dnt !== undefined && dnt !== '0' && dnt !== 'false';\nif (telemetryBlocked) console.warn('DO_NOT_TRACK is set; enable will have no effect.');","typeGuard":"function isDoNotTrackSet(env: NodeJS.ProcessEnv): boolean {\n  const v = env.DO_NOT_TRACK;\n  return v !== undefined && v !== '0' && v !== 'false';\n}","tryCatchPattern":"if (isDoNotTrackSet(process.env)) {\n  p.log.warn('DO_NOT_TRACK is set in your environment. Telemetry will remain OFF even after enabling here.');\n}","preventionTips":["Check `echo $DO_NOT_TRACK` before running the enable flow","Remove global DO_NOT_TRACK exports from shell profiles and CI images","Use DO_NOT_TRACK=0 to explicitly re-enable rather than unsetting","Document the env var in team setup guides to avoid confusion"],"tags":["telemetry","environment-variable","privacy","configuration"],"backgroundTag":"missing-env-var","analyzedSha":"d8bc9755e74915e5c3b999181e10a67c889bce2a","analyzedAt":"2026-09-17T16:40:26.182Z","contentChangedAt":"2026-09-17T16:40:26.182Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}