Telemetry
Lightweight event-tracking SDK for Mediquo integrations.
@mediquo/telemetry is a zero-dependency event-tracking client. Call track() with a typed event payload — the SDK handles delivery to the Mediquo tracking endpoint.
Installation
npm install @mediquo/telemetryQuick start
import { MediquoTelemetryClient } from "@mediquo/telemetry";
const telemetry = new MediquoTelemetryClient();
telemetry.setApiKey("your-api-key");
telemetry.track({
action_type: "event",
event_type: "appointment_booked",
appointment_id: "abc-123",
});setApiKey must be called before track. Events sent before initialization are silently dropped.
Event action types
| Value | When to use |
|---|---|
"event" | User-initiated action (button click, form submission, navigation) |
"pageview" | Route or screen change |
"debug" | Development-only diagnostic events |
Next steps
- API reference — full method and type signatures