@vraksha/mui-x-telemetry-demo
TypeScript icon, indicating that this package has built-in type declarations

8.0.0-alpha.4 • Public • Published

@mui/x-telemetry

Package used by some of MUI X to collects anonymous telemetry data about general usage. Participation in this anonymous program is optional, and you may opt-out if you'd not like to share any information.

How to opt-in

Currently, it's disabled by default, and you could opt-in to it in 3 ways:

  1. By setting it directly to package settings on the application start (for example, in the main file).
import { muiXTelemetrySettings } from '@mui/x-telemetry';
// or
import { muiXTelemetrySettings } from '@mui/x-license';

muiXTelemetrySettings.enableTelemetry(); // to enable telemetry collection and sending
// or
muiXTelemetrySettings.disableTelemetry(); // to disable telemetry collection and sending
  1. By setting the environment variable.
MUI_X_TELEMETRY_DISABLED=false # Enable telemetry
# or
MUI_X_TELEMETRY_DISABLED=true # Enable telemetry

⚠️ Note that some frameworks requires to prefix the variable with REACT_APP_, NEXT_PUBLIC_, etc.

  1. By setting the flag to global object on the application start (for example, in the main file).
import { ponyfillGlobal } from '@mui/utils';

ponyfillGlobal.__MUI_X_TELEMETRY_DISABLED__ = false; // enabled
// or
ponyfillGlobal.__MUI_X_TELEMETRY_DISABLED__ = true; // disabled

OR

if (typeof window !== 'undefined') {
  window.__MUI_X_TELEMETRY_DISABLED__ = false; // enabled
}
// or
if (typeof window !== 'undefined') {
  window.__MUI_X_TELEMETRY_DISABLED__ = true; // disabled
}

Readme

Keywords

none

Package Sidebar

Install

npm i @vraksha/mui-x-telemetry-demo

Weekly Downloads

15

Version

8.0.0-alpha.4

License

SEE LICENSE IN LICENSE

Unpacked Size

457 kB

Total Files

77

Last publish

Collaborators

  • raksha555vadim