Disable Unity CLI data collection
Disable usage analytics, the anonymous usage count, crash reports, and automatic update checks in the Unity command-line interface (CLI).
Read time 3 minutesLast updated 4 days ago
Use one command and environment variables to stop all telemetry and background checks in the Unity CLI. The command saves your choice for the Unity account you're signed in to, or for signed-out use. An environment variable applies only to the process it's set for, whoever is signed in. You can disable each data type independently, or disable all of them on every developer machine and continuous integration (CI) runner. To learn what each data type contains before you disable it, refer to Unity CLI telemetry data.
Manage usage analytics
To enable or disable usage analytics, or to check its status:
-
Open a terminal.
-
Run one of the following commands:
- To enable usage analytics, run .
unity analytics opt-in - To disable usage analytics, run .
unity analytics opt-out - To check whether usage analytics is enabled, run .
unity analytics status
- To enable usage analytics, run
When you opt out, the CLI stops sending usage analytics immediately. You can change this setting at any time.
unity analytics opt-outDisable usage analytics for one process
To stop usage analytics and the anonymous usage count without changing your saved setting, set before you run the CLI:
DO_NOT_TRACKexport DO_NOT_TRACK=1
The CLI also honors , the switch the Unity Gaming Services CLI uses, in the same way. Unity CLI 1.0.0 and later read .
UGS_CLI_TELEMETRY_DISABLEDUGS_CLI_TELEMETRY_DISABLEDKeep the following in mind:
- Any value except an empty value, , or
0(in any letter case) turns the switch on.false - The variable applies only to the process it's set for and to the processes that process starts. It doesn't change the setting that saves, and
unity analytics opt-outstill shows that saved setting. The variable has no effect on any other process or after you unset it.unity analytics status - It doesn't stop crash reports or the update check. To stop those, use the variables in the following section. With set, crash reports don't include your device ID.
DO_NOT_TRACK - It doesn't stop the connections listed in Unity CLI network connections, which aren't telemetry.
Settings for each data type
The following table lists the command or environment variable that disables each data type.
To stop | Use |
|---|---|
| Usage analytics, for your account | |
| Usage analytics, for one process | |
| Anonymous usage count | |
| Crash reports | |
Disable all data collection on a machine or CI runner
To disable all telemetry on a developer machine or CI runner:
-
Open a terminal.
-
Set the following environment variables:export DO_NOT_TRACK=1export UNITY_NO_CLI_INVOKED_TELEMETRY=1export UNITY_NO_CRASH_REPORT=1export UNITY_NO_UPDATE_CHECK=1
-
Run.
unity analytics opt-out -
To confirm that usage analytics is off, run.
unity analytics status
unity analytics opt-outDO_NOT_TRACK=1Repeat these steps on every developer machine and CI runner.