@zedtech/zedkit-observability
Gate trackers and script loaders on consent
Drop captures until a category is granted; run loaders when consent turns on.
alpha
Usage
At a glance
- Who: Teams wiring the Tracker port behind analytics consent.
- What: Drop captures until a category is granted; run loaders when consent turns on.
- Use when: With
createProductAnalyticsTrackeror any custom script loader. - Avoid when: Strictly necessary cookies (no gate needed).
Install
pnpm add @zedtech/zedkit-observabilityLatest: 0.1.0 (via changesets).
Example
import { createConsentGatedTracker } from "@zedtech/zedkit-observability/consent";
const gated = createConsentGatedTracker(tracker, store, "analytics");Wraps: (none)