@zedtech/zedkit-observability
Forward events to a browser analytics SDK
Map the `Tracker` port onto an SDK client (for example `posthog-js`).
alpha
Usage
At a glance
- Who: Teams using a browser product-analytics SDK at the composition root.
- What: Map the
Trackerport onto an SDK client (for exampleposthog-js). - Use when: After consent allows analytics in the browser.
- Avoid when: Server-side event pipelines — send from your API instead.
Install
pnpm add @zedtech/zedkit-observabilityLatest: 0.1.0 (via changesets).
Example
import { createProductAnalyticsTracker } from "@zedtech/zedkit-observability/posthog";
const tracker = createProductAnalyticsTracker(client);
tracker.capture("page_view", { path: "/home" });Wraps: posthog-js (peer)