Skip to Content
Funnels

Preview Funnel

POST
/v0/projects/{idOrSlug}/funnels/preview

Authorization

apiKeyAuth
headerx-api-key<token>

FastStats API key. Pass it in the x-api-key header or as a Bearer token in the Authorization header.

Path Parameters

idOrSlug*string

Request Body

application/json
  1. body
segment?array<string>|null
excludeSegment?array<string>|null
definition*
timezone?string|null

Response Body

FunnelResults

application/json
  1. response
source*string
Value in"web""mod""error""vitals"
unit*string
Value in"people""sessions""attempts"
from*string
to*string
active*number||null
steps*array<>
conversionSeconds*
durations*
trend*
previous*|null
breakdown*|null
Example Request
curl -X POST 'https://api.faststats.dev/v0/projects/string/funnels/preview' \
  -H 'Content-Type: application/json' \
  -d '{
  "definition": {
    "name": "string",
    "steps": [
      {
        "id": "string",
        "name": "string",
        "match": "all",
        "filters": [
          {
            "field": "string",
            "operator": "equals",
            "value": "string"
          }
        ]
      }
    ],
    "conversionWindowSeconds": 0,
    "strictOrder": true,
    "timeRangeSeconds": 0
  }
}'
Example Response
{
  "source": "web",
  "unit": "people",
  "from": "string",
  "to": "string",
  "active": 0,
  "steps": [
    {
      "count": 0,
      "conversionRate": 0,
      "stepConversionRate": 0,
      "dropped": 0,
      "medianSeconds": 0,
      "p90Seconds": 0
    }
  ],
  "conversionSeconds": {
    "median": 0,
    "p90": 0
  },
  "durations": {
    "edges": [
      0
    ],
    "histograms": [
      [
        0
      ]
    ]
  },
  "trend": {
    "interval": "hour",
    "points": [
      {
        "at": "string",
        "counts": [
          0
        ]
      }
    ]
  },
  "previous": {
    "from": "string",
    "to": "string",
    "counts": [
      0
    ]
  },
  "breakdown": {
    "field": "string",
    "rows": [
      {
        "value": "string",
        "counts": [
          0
        ]
      }
    ],
    "other": [
      0
    ]
  }
}