Skip to content

Treat DO_NOT_TRACK=1 as an analytics opt-out - #9045

Open
hasandenizuk wants to merge 1 commit into
Shopify:mainfrom
hasandenizuk:feat/respect-do-not-track
Open

hasandenizuk wants to merge 1 commit into
Shopify:mainfrom
hasandenizuk:feat/respect-do-not-track

Conversation

@hasandenizuk

Copy link
Copy Markdown

WHY are these changes introduced?

DO_NOT_TRACK=1 is a common cross-tool way to opt out of telemetry (https://consoledonottrack.com/). Developers who set it once for all their tools still have Shopify CLI usage analytics sent, because the CLI only checks SHOPIFY_CLI_NO_ANALYTICS and OPT_OUT_INSTRUMENTATION.

WHAT is this pull request doing?

Adds DO_NOT_TRACK to the environment variable constants in cli-kit and makes analyticsDisabled() return true when it is truthy, the same way OPT_OUT_INSTRUMENTATION was added in #7503. The existing opt-outs behave as before. Includes a unit test and a patch changeset.

How to manually test your changes?

Run DO_NOT_TRACK=1 shopify version --verbose. Before: the output ends with "Analytics event sent". After: it shows "Skipping command analytics".

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

@hasandenizuk
hasandenizuk requested a review from a team as a code owner October 29, 2026 21:00
@hasandenizuk

Copy link
Copy Markdown
Author

I have signed the CLA!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant