Analytics events
An Analytics Event is one immutable thing a person or a game did, recorded by an SDK or a server.
An Analytics Event is one immutable thing a person or a game did, recorded by an SDK or a server. Its id is the sender's event_id, so a resend of the same event is the same record.
Service Sylphx Analytics · Resource type analytics.sylphx.com/AnalyticsEvent · Name pattern orgs/{org}/projects/{project}/envs/{env}/analytics_events/{analytics_event} · Shape record
Fields
| Field | Type | What it is |
|---|---|---|
name | string | orgs/{org}/projects/{project}/envs/{env}/analytics_events/{event_id}. |
uid | string | The event id again, so a client can hold it without parsing the name. Output only. |
meta | ResourceMeta | Resource metadata. |
event_name | string | The event name, for example $pageview. Output only. |
event_time | timestamp | When it happened, on the sender's clock (corrected by sent_time). Output only. |
received_time | timestamp | When the service received it. Output only. |
anon_id | string | The device- or install-scoped id from the SDK. Output only. |
user_id | string | The signed-in end user, when known. Output only. |
session_id | string | The SDK session, when there is one. Output only. |
properties | struct | The event's properties. Output only. |
context | EventContext | The sender's context, plus the platform and browser family the service parsed from the request. No IP address and no user agent string is kept. Output only. |
source | EventSource | Where the event came from. Output only. One of client, server. |
Methods
Every method of the collection, in the registry's order, with the scope it needs. The full request, response and examples are one link away.
| Method | Call | What it does |
|---|---|---|
POST | batch | Records a batch of events. Each event is judged alone: a bad event is reported in results and the rest are stored. A duplicate event_id (in this or an earlier batch) is counted once. The response is sent only after the store holds the accepted events. |
GET | list | Lists the environment's raw events in a time range, newest first. |
POST | query | Aggregates deduplicated events in the environment over a bounded interval. |
batch
Records a batch of events. Each event is judged alone: a bad event is reported in results and the rest are stored. A duplicate event_id (in this or an earlier batch) is counted once. The response is sent only after the store holds the accepted events.
POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/analytics_events:batch · scope analytics:ingest · effect write · callable with a publishable key · Request, response and examples
list
Lists the environment's raw events in a time range, newest first.
GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/analytics_events · scope analytics:read · effect read · paginated · Request, response and examples
query
Aggregates deduplicated events in the environment over a bounded interval.
POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/analytics_events:query · scope analytics:read · effect read · Request, response and examples