Mediquo documentation home

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/telemetry

Quick 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

ValueWhen to use
"event"User-initiated action (button click, form submission, navigation)
"pageview"Route or screen change
"debug"Development-only diagnostic events

Next steps