Skip to main content

analytics

Read when adding or changing product analytics events. Import track from @shared/analytics and React adapters from @shared/analytics-react.

Source facts

Repository
LedgerHQ/ledger-live
Last source activity
October 7, 2026 at 16:51
Detected SKILL.md language
English
Stars
622
Forks
491

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
analytics
description
Read when adding or changing product analytics events. Import track from @shared/analytics and React adapters from @shared/analytics-react.
# Product analytics The API is [`@shared/analytics`](../../../shared/analytics/README.md). React adapters are [`@shared/analytics-react`](../../../shared/analytics-react/README.md). - Import `track` and `trackPage` from `@shared/analytics` and `Track`, `TrackPage`, and `TrackScreen` from `@shared/analytics-react`. - Do not re-export `track`, `trackPage`, `Track`, `TrackPage` or `TrackScreen` from app modules. App `segment.ts` files only wire the host. - Register the Segment client, consent, `identify`, extra props, and props filters in app (currently `/apps/**/segment.ts`). - Flow packages may keep an injected `track` helper so tests can pass a fake. They must not import an app barrel. - In tests, mock `@shared/analytics` (and `@shared/analytics-react` when the component is under test). - Do not put PII in event payloads. See [detect-data-leaks](../detect-data-leaks/SKILL.md) and [client-ids](../client-ids/SKILL.md). Portfolio charts (`@ledgerhq/wallet-analytics`) are a different package. Consent models stay in their own READMEs; apps only wire them into `setEnabledFn` and `updateIdentify`.
View on GitHub