Documentation

Unity command-line interface (CLI)

Download Unity Hub

Unity command-line interface (CLI)

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

Note
This page applies to Unity CLI 1.0.0-beta.17 and later.
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:
  1. Open a terminal.
  2. 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
      .
When you opt out, the CLI stops sending usage analytics immediately. You can change this setting at any time.
unity analytics opt-out
saves your choice for the Unity account you're signed in to, or for signed-out use if you aren't signed in. Other accounts that sign in to the CLI on the same computer keep their own choice. To stop usage analytics for one process whoever is signed in, such as a single CI job, refer to Disable usage analytics for one process.

Disable usage analytics for one process

To stop usage analytics and the anonymous usage count without changing your saved setting, set
DO_NOT_TRACK
before you run the CLI:
export DO_NOT_TRACK=1
The CLI also honors
UGS_CLI_TELEMETRY_DISABLED
, the switch the Unity Gaming Services CLI uses, in the same way. Unity CLI 1.0.0 and later read
UGS_CLI_TELEMETRY_DISABLED
.
Keep the following in mind:
  • Any value except an empty value,
    0
    , or
    false
    (in any letter case) turns the switch on.
  • 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
    unity analytics opt-out
    saves, and
    unity analytics status
    still shows that saved setting. The variable has no effect on any other process or after you unset it.
  • It doesn't stop crash reports or the update check. To stop those, use the variables in the following section. With
    DO_NOT_TRACK
    set, crash reports don't include your device ID.
  • 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
unity analytics opt-out
Usage analytics, for one process
DO_NOT_TRACK=1
or
UGS_CLI_TELEMETRY_DISABLED=1
Anonymous usage count
UNITY_NO_CLI_INVOKED_TELEMETRY=1
,
DO_NOT_TRACK=1
,
UGS_CLI_TELEMETRY_DISABLED=1
, or
unity analytics opt-out
Crash reports
UNITY_NO_CRASH_REPORT=1

Disable all data collection on a machine or CI runner

To disable all telemetry on a developer machine or CI runner:
  1. Open a terminal.
  2. 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
  3. Run
    unity analytics opt-out
    .
  4. To confirm that usage analytics is off, run
    unity analytics status
    .
unity analytics opt-out
covers only the account that's signed in when you run it, or signed-out use. The environment variables cover every account, but only in the processes that inherit them, so set them in your shell profile or in the CI runner's environment. On a shared machine or a CI runner, set
DO_NOT_TRACK=1
to stop usage analytics whoever is signed in.
Repeat these steps on every developer machine and CI runner.
Note
On Windows, set the same variables as user or system environment variables.

Additional resources