I think it's very reasonable to prompt a message on install saying "Homebrew collects and sends anonymous analytics. Use Homebrew --disable-analytics to opt out" and have that null the analytics identifier. Environment variables aren't that convenient.