> ## Documentation Index
> Fetch the complete documentation index at: https://docs.khaime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get checkout funnel

> How many visits reached each step of the funnel.

How many visits reached each funnel step. It uses the business's own steps when it has them, otherwise visit, view a product, add to cart, start checkout and buy. Needs Store Pulse on the business's plan. Without it, the response is `403` with `BUSINESS_FEATURE_UNAVAILABLE`.

Call this from your server with a `pk_` key. See [Store data overview](https://docs.khaime.com/api-reference/store-data/overview.md) for keys, errors and how to read empty values.

## Parameters

| Name | Type | Required | Description |
| - | - | - | - |
| `range` | string | No | `today`, `7d`, `30d` or `90d`. Default `30d`. |

## Request

```bash theme={null}
curl -H "X-API-Key: $KHAIME_API_KEY" \
  "https://api.khaime.com/api/v1/analytics/funnel?range=30d"
```

## Response

```json theme={null}
{
  "message": "Funnel retrieved",
  "success": true,
  "status": true,
  "data": {
    "environment": "live",
    "range": "30d",
    "source": "built_in",
    "stages": [
      {
        "stage": "visited",
        "label": "Visits",
        "tracked": true,
        "count": 640,
        "unique_visitors": 602,
        "percent_of_visits": 100,
        "dropped_from_previous": null
      },
      {
        "stage": "viewed_product",
        "label": "Viewed a product",
        "tracked": true,
        "count": 310,
        "percent_of_visits": 48.4,
        "dropped_from_previous": 330
      }
    ]
  }
}
```

## Read it correctly

* The funnel counts visits, not people. `unique_visitors` on the first step gives the number of people.
* `source` is `built_in`, `suggested` or `confirmed`.
* A step with `tracked: false` has nothing measuring it. Its `count`, `percent_of_visits` and `dropped_from_previous` are `null`. Show "not tracked", not 0.
* `percent_of_visits` is also `null` when there were no visits.
* `dropped_from_previous` is `null` on the first step and next to an untracked step.
* Custom steps also have `measured_by`: `site` or `khaime`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.