Analytics
Overview
Product analytics: event and batch ingest, identify, query events/metrics, and custom metric definitions.
API
{pe} = /projects/{projectId}/environments/{environmentId}.
| Method | Path | Notes |
|---|---|---|
| GET | /analytics/health | Health |
| POST | /analytics{pe}/events | API key ingest (analytics:ingest) |
| POST | /analytics{pe}/events:batch | API key ingest |
| POST | /analytics{pe}/identify | API key ingest |
| GET | /analytics{pe}/events | Query — JWT |
| GET | /analytics{pe}/events/{eventId} | JWT |
| GET | /analytics{pe}/metrics | JWT |
| GET | /analytics{pe}/metrics/custom | JWT |
| GET | /analytics{pe}/metrics/{metricKey} | JWT |
| GET/POST | /analytics{pe}/definitions | JWT |
| PUT/DELETE | /analytics{pe}/definitions/{definitionId} | JWT |
Clients
| Package | Runtime |
|---|---|
@vijihub/analytics | browser (scoped ingest) |
VijiHub.Analytics | .NET |
Implementation
- Enable Analytics on the environment.
- Create a scoped API key with
analytics:ingestfor client SDKs. - Track events / identify from apps; query metrics from Console or authenticated backends.
- Define custom metrics via definitions APIs as needed.
Constraints
- Ingest endpoints are designed for scoped keys — do not use full admin keys in browsers.
- Query and definitions require JWT authorization.
- Batch ingest for high volume; avoid chatty single-event storms where possible.