Skip to content

useTrack

useTrack(): TrackFn

Returns a track(name, data?, options?) function bound to the enclosing TelemetryScope (plan 144 TASK-12 / REQ-21).

  • Scope context (area / action / purpose) merges outer → inner → invocation — the per-event option wins.
  • once and dedupeKey suppress repeats for this hook instance’s lifetime.
  • Reserved property names are dropped so a caller can’t overwrite canonical fields.
  • Without a RevTurbine provider (absent or failed init) the function is a safe no-op and never throws (AC-13).

TrackFn