A practical guide for moving from this local proving ground to a hosted, governed measurement service.
The short version
A website collector sends a small POST to this service. The service removes sensitive values, matches the observation to an approved canonical event, checks consent and routing, then sends only the approved safe payload to each enabled destination. The browser never holds destination secrets.
One event's journey
1. CollectSite or GTM collector sends a sanitised observation to /collect.
2. GovernPrivacy filtering and mapping turn it into a canonical event.
3. Policy checkApproval, consent category, and destination routing are evaluated.
4. DeliverServer-side adapters POST safe payloads and record the result.
What the website sends
The collector sends an observation to your hosted service, not directly to analytics vendors.
Open Event catalog and switch a destination On or Off for each governed event. The choice is saved as an activation rule and is checked before a live POST is made.
Server destinations: Matomo, Webhook, and Warehouse only receive selected, ready events.
Preview destinations: GA4, Optimizely, Google Ads, and LinkedIn Ads show the payload shape until their live adapters are implemented.
Browser tags: use Tag registry to select which canonical events activate each registered script or pixel.
This repository is a local prototype. Production requires a hosted API, authentication, encrypted secret storage, a managed database/queue, real consent-platform integration, per-environment configuration, access control, alerting, backups, retention/deletion controls, and a deployment process. The current local consent switches and JSONL warehouse export are test mechanisms, not production controls.