Custom events, metrics and funnels

Read your own events, saved custom metrics, plugin manifests and event funnels, including cohorts and goals.

REST API referenceUpdated

Custom events need Operator or Network (custom_events); with a token, Network.

RouteReturns
/orgs/<org>/servers/<server>/custom-events{from, to, history_limit, types: [{type, count, last_seen}], recent: [...]} (add recent=20)
/orgs/<org>/custom-metricsSaved custom metrics
/orgs/<org>/custom-metrics/<id>/queryValues for one metric; group_value (1 to 200 characters) filters a saved grouping property
/orgs/<org>/plugin-manifestsUp to 50 owner-declared plugin schemas
/orgs/<org>/servers/<server>/plugin-manifests/statusDeclared against received, from the last 500 events per source in 7 days; no values and no player ids
/orgs/<org>/servers/<server>/event-funnelFunnel of two to five events

Event funnel

steps is two to five distinct event types in order. Optional: from, to (at most 30 days), within_hours, goal=<id>, cohort=source, campaign, country, platform or group:<id>.

bash
curl -G -H "Authorization: Bearer $TOKEN" "https://serverstats.cc/api/v1/orgs/$ORG/servers/$SRV/event-funnel" \
  --data-urlencode "steps=custom.tutorial_done,custom.first_purchase" --data-urlencode "cohort=source"
json
{"from":"...","to":"...","history_limit":null,"within_hours":null,"eligible":"events_with_player_id",
 "cohort":{"by":"source"},
 "steps":[{"type":"custom.tutorial_done","players":520,"rate":1,"from_previous":1},
          {"type":"custom.first_purchase","players":38,"rate":0.073,"from_previous":0.073}],
 "cohorts":[{"source":"plugin:tutorial","players":520,"completed":38,"rate":0.073,"steps":[520,38]}]}

Only events that carry a player count. The starting group is players whose first step-one event is in the range; later steps must follow it.

Manifests

A manifest declares a plugin's events and metrics so teammates can build charts before data arrives. Writing one (PUT /orgs/<org>/plugin-manifests/<source>) is session-only; tokens can read. source is plugin:, resource: or script: plus 1 to 32 characters. Body: schema_version: 1, label, version, events[] (each a custom.<name> type with up to 12 typed properties) and metrics[] (counter, gauge or histogram, up to 4 dimensions); at most 24 each and 16 KB. A manifest is metadata only: it does not make an agent send data.