GamebeastDocs
Dashboard

Execute funnel query

POST
/application/{applicationId}/analytics/v1/queries/funnels/execute

Execute a funnel query. Returns per-step conversion rates, unique users, total sessions, and total conversions for each breakdown combination. Supports ordered, any-order, and session-based conversion windows.

Authorization

AuthorizationBearer <token>

Secret server key (prefixed gb_sk_) for server-to-server calls. Send it as Authorization: Bearer <key>. Never ship a secret key in a game client.

In: header

Path Parameters

applicationId*number

Gamebeast project ID

Header Parameters

environment_id*number

Gamebeast environment ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/application/0/analytics/v1/queries/funnels/execute" \  -H "environment_id: 0" \  -H "Content-Type: application/json" \  -d '{    "time": {      "step": "second",      "relative": {        "step": "second",        "value": 0      }    },    "metrics": [      {        "id": "string",        "visible": true,        "data": {          "name": "string",          "type": "event"        }      },      {        "id": "string",        "visible": true,        "data": {          "name": "string",          "type": "event"        }      }    ],    "conversionCriteria": {      "timeWindow": {        "step": "second",        "value": 0      },      "measurement": {        "type": "conversion_rate"      },      "anyOrder": true,      "strictOrder": true    },    "options": {      "display": "funnel_steps"    }  }'
Empty