Or if you want to cover existing users, just ask during the first interactive invocation, when there is no prior user chosen setting (works for new installs too)...<p>pseudocode:<p><pre><code>  choice = no
  if $brew_prefix&#x2F;etc&#x2F;homebrew.yaml:
    choice = read analytics $brew_prefix&#x2F;etc&#x2F;homebrew.yaml
  else:
    if interactive-tty and cmd != &quot;--prefix&quot;:
      choice = ask-user &quot;enable anonymous analytics (it helps us!)? Y&#x2F;N: &quot;
      write analytics=&lt;choice&gt; $brew_prefix&#x2F;etc&#x2F;homebrew.yaml
  if choice == yes:
    enable-analytics</code></pre>