Files
trezor-suite/packages/analytics
karliatto a9e189b9a3 build(repository): Connect publishing ESM
- Adding ESM builds for all the packages that are published on 'npm'.
   - Adding libESM to published files in package.json files
   - Relays only on "exports" section on package.json to define the ways to consume the package, so only modern bundlers would be able to use them, that should not be an issue, since projects are used to be on the latest
   - Using the root tsconfig.libESM
   - Using wildcard for @trezor/utils export so we can import any of the functions directly https://nodejs.org/api/packages.html#subpath-patterns
2026-01-20 16:37:46 +01:00
..
2026-01-17 21:10:25 +01:00
2026-01-17 21:10:25 +01:00

@trezor/analytics

This is a generic analytics package. To use analytics in a specific environment, please use one of the following packages or create a new one inspired by existing ones.

Keep in mind that global fetch and URLSearchParams methods must be available. Node and React Native use polyfills as a substitute.

Tracking process

Data about interactions are transferred in GET HTTPS requests encoded in URI.

List of available configured endpoints:

https://data.trezor.io    /suite    /log    /desktop   /develop     .log
https://data.trezor.io    /suite    /log    /desktop   /stable      .log
https://data.trezor.io    /suite    /log    /web       /develop     .log
https://data.trezor.io    /suite    /log    /web       /stable      .log

Example URI:

https://data.trezor.io/suite/log/web/stable.log?c_v=1.8&c_type=transport-type&c_commit=4d09d88476dab2e6b2fbfb833b749e9ac62251c2&c_instance_id=qlT0xL2XKV&c_session_id=FZjilOYQic&c_timestamp=1624893047903&type=bridge&version=22.10.1

Which tracks:

{
  c_v: '22.10.1',
  c_type: 'transport-type',
  c_commit: '4d09d88476dab2e6b2fbfb833b749e9ac62251c2',
  c_instance_id: 'qlT0xL2XKV',
  c_session_id: 'FZjilOYQic',
  c_timestamp: 1624893047903,
  type: 'BridgeTransport',
  version: '2.0.30'
}

Attributes which are always tracked:

  • c_v: version of analytics
  • c_type: type of tracked event
  • c_commit: current revision of app
  • c_instance_id: until user wipes storage, the ID does not change
  • c_session_id: ID changing on every launch of app
  • c_timestamp: time in ms when event is created (added in 1.11)

Other attributes are connected to a specific event type.