Conversion Funnel
Your brand's browse-to-purchase funnel over a date range, computed from scoped event counts.
GET /cdp/insights/funnel computes your brand's browse-to-purchase conversion funnel over a
date range from scoped event counts: product_viewed → product_added_to_cart →
checkout_started → checkout_completed/order_created. It is the REST twin of the
cdp_funnel MCP tool: both return the same stage counts, computed by one shared capability,
so the two surfaces cannot drift.
The final stage counts checkout_completed or order_created (whichever your store
emits) as a single OR-union. Every stage count is bound to your brand's shop scope — see
Tenant Isolation & Scope.
The funnel is evaluated by the underlying search cluster, so it carries a dedicated, tighter
rate limit than the rest of the API. Expect 429 under burst and batch your dashboards
accordingly.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
from | string | — | Optional ISO-8601 window lower bound (inclusive), e.g. 2026-06-01. |
to | string | — | Optional ISO-8601 window upper bound (inclusive), e.g. 2026-06-30. |
Omit both to compute the funnel over all in-scope events.
Response 200
{
"stages": [
{
"stage": "product_viewed",
"eventTypes": ["product_viewed"],
"count": 1000,
"conversionFromPreviousPct": null,
"conversionFromStartPct": null,
"dropOffFromPreviousPct": null
},
{
"stage": "product_added_to_cart",
"eventTypes": ["product_added_to_cart"],
"count": 400,
"conversionFromPreviousPct": 40,
"conversionFromStartPct": 40,
"dropOffFromPreviousPct": 60
},
{
"stage": "checkout_started",
"eventTypes": ["checkout_started"],
"count": 150,
"conversionFromPreviousPct": 37.5,
"conversionFromStartPct": 15,
"dropOffFromPreviousPct": 62.5
},
{
"stage": "checkout_completed",
"eventTypes": ["checkout_completed", "order_created"],
"count": 60,
"conversionFromPreviousPct": 40,
"conversionFromStartPct": 6,
"dropOffFromPreviousPct": 60
}
],
"dateRange": { "from": null, "to": null },
"scope": "your-shop.myshopify.com"
}stages— the four funnel stages in order. Each carries its rawcountplus, from the second stage on,conversionFromPreviousPct(vs the previous stage),conversionFromStartPct(vs the first stage), anddropOffFromPreviousPct— all percentages rounded to 2 dp, ornullwhen the denominator is zero (never a divide-by-zero). The first stage is the baseline (all ratiosnull).dateRange— the window echoed back (nullbounds when unbounded).scope— your brand's resolved shop domain.
Example
curl -s "https://cdp.vyg.app/cdp/insights/funnel?from=2026-06-01&to=2026-06-30" \
-H "Authorization: Bearer vyg_your_key_here"Errors
| Status | When |
|---|---|
400 | from / to present but not a valid date string (bad_request). |
401 | Missing or invalid credential. |
403 | No connected Shopify integration resolves a scope for the brand. |
405 | Non-GET method. |
429 | Analytics query rate-limited — retry with backoff (rate_limited). |
502 | The CDP could not evaluate the funnel (upstream_error). |
503 | The CDP is temporarily unavailable — retry (upstream_unavailable). |