mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
docs/Analytics: update with post-4.0.0 info
This commit is contained in:
parent
b38aca8a6e
commit
3f03d5b2d8
@ -1,6 +1,6 @@
|
||||
# Anonymous Aggregate User Behaviour Analytics
|
||||
|
||||
Homebrew gathers anonymous aggregate user behaviour analytics using Google Analytics (until our in-progress migration to our own InfluxDB). You will be notified the first time you run `brew update` or install Homebrew. Analytics are not enabled until after this notice is shown, to ensure that you can [opt out](Analytics.md#opting-out) without ever sending analytics data.
|
||||
Homebrew gathers anonymous aggregate user behaviour analytics using InfluxDB and Google Analytics. You will be notified the first time you run `brew update` or install Homebrew. Analytics are not enabled until after this notice is shown, to ensure that you can [opt out](Analytics.md#opting-out) without ever sending analytics data.
|
||||
|
||||
## Why?
|
||||
|
||||
@ -17,21 +17,33 @@ Homebrew's anonymous user and event data have a 14 month retention period. This
|
||||
|
||||
Homebrew's analytics record some shared information for every event:
|
||||
|
||||
- The version of Homebrew, e.g. `4.0.0`.
|
||||
- The OS you are using and its version number, e.g. `macOS 13.1`.
|
||||
- Your CPU's architecture, e.g. `x86_64`.
|
||||
- Whether you are using the default install prefix or a custom one, e.g. `/opt/homebrew`. If your prefix is custom, it will be sent as `custom-prefix`.
|
||||
- Whether the data is being sent from CI, e.g. `1` if the CI environment variable is set.
|
||||
- The analytics category, e.g. `build_error`.
|
||||
|
||||
For analytics sent to InfluxDB, we also record:
|
||||
|
||||
- Whether the `HOMEBREW_DEVELOPER` environment variable is enabled, e.g. `false`.
|
||||
|
||||
For analytics sent to Google Analytics, which is in the process of being phased out and removed, we also record:
|
||||
|
||||
- The Homebrew user agent, e.g. `Homebrew/3.3.0 (Macintosh; Intel Mac OS X 10.15.6) curl/7.64.1`.
|
||||
- The [Google Analytics version](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#v), i.e. `1`.
|
||||
- The Homebrew [analytics tracking ID](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#tid), e.g. `UA-75654628-1`.
|
||||
- A Homebrew [analytics user ID](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid), e.g. `1BAB65CC-FE7F-4D8C-AB45-B7DB5A6BA9CB`. This is generated by `uuidgen` and stored in the repository-specific Git configuration variable `homebrew.analyticsuuid` within `$(brew --repository)/.git/config`. This does not allow us to track individual users, but does enable us to accurately measure user counts versus event counts. The ID is specific to the Homebrew package manager, and does not permit Homebrew maintainers to e.g. track you across websites you visit.
|
||||
- A Homebrew [analytics user ID](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid), e.g. `1BAB65CC-FE7F-4D8C-AB45-B7DB5A6BA9CB`. This is generated by `uuidgen` and stored in the repository-specific Git configuration variable `homebrew.analyticsuuid` within `$(brew --repository)/.git/config`. This does not allow us to track individual users, but does enable us to accurately measure user counts versus event counts. The ID is specific to the Homebrew package manager, and does not permit Homebrew maintainers to e.g. track you across websites you visit. It is only used with Google Analytics.
|
||||
- Whether the [Google Analytics anonymous IP setting](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#aip) is enabled, i.e. `1`.
|
||||
- The Homebrew [application name](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#an), e.g. `Homebrew`.
|
||||
- The Homebrew [application version](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#av), e.g. `2.5.0`.
|
||||
- The Homebrew [analytics hit type](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#t), e.g. `event`.
|
||||
|
||||
Homebrew's analytics records the following different events:
|
||||
|
||||
- An `event` hit type with the `install` event category and the Homebrew formula from a non-private GitHub tap you install plus any used options (e.g. `wget --HEAD`) as the action, and an event label (e.g. `macOS 10.15, non-/usr/local, CI`) to indicate the OS version, non-standard installation location and invocation as part of CI. This allows us to identify which formulae need fixing and where more easily.
|
||||
- An `event` hit type with the `install_on_request` event category and the Homebrew formula from a non-private GitHub tap you have requested to install (e.g. when explicitly named with a `brew install`) plus options and an event label as above. This allows us to differentiate the formulae that users intend to install from those pulled in as dependencies.
|
||||
- An `event` hit type with the `cask_install` event category and the Homebrew cask from a non-private GitHub tap you install as the action and an event label as above. This allows us to identify which casks need fixing and where more easily.
|
||||
- An `event` hit type with the `BuildError` event category and the Homebrew formula plus options that failed to install as the action and an event label as above, e.g. `wget --HEAD` and `macOS 10.15`.
|
||||
- The `install` event category and the Homebrew formula from a non-private GitHub tap you install plus any used options (e.g. `wget --HEAD`) as the action. This allows us to identify which formulae where work should be prioritised, as well as how to handle possible deprecation or removal of any.
|
||||
- The `install_on_request` event category and the Homebrew formula from a non-private GitHub tap you have requested to install (e.g. when explicitly named with a `brew install`) plus options. This allows us to differentiate the formulae that users intend to install from those pulled in as dependencies.
|
||||
- The `cask_install` event category and the Homebrew cask from a non-private GitHub tap you install as the action. This allows us to identify which casks where work should be prioritised, as well as how to handle possible deprecation or removal of any.
|
||||
- The `build_error` event category and the Homebrew formula plus options that failed to install as the action, e.g. `wget --HEAD`. This allows us to identify formulae that may need fixing. The details or logs of the build error are not sent.
|
||||
|
||||
You can also view all the information that is sent by Homebrew's analytics by setting `HOMEBREW_ANALYTICS_DEBUG=1` in your environment. Please note this will also stop any analytics from being sent.
|
||||
|
||||
@ -43,7 +55,7 @@ As far as we can tell it would be impossible for Google to match the randomly ge
|
||||
|
||||
## When/Where?
|
||||
|
||||
Homebrew's analytics are sent throughout Homebrew's execution to Google Analytics over HTTPS.
|
||||
Homebrew's analytics are sent throughout Homebrew's execution to InfluxDB and Google Analytics over HTTPS.
|
||||
|
||||
## Who?
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user