Funnels
Query Saved Report
Query funnel data from a saved report via the legacy Funnels Query API, now in maintenance mode; use the Funnels report instead
GET
/
funnels
Query Saved Report
curl --request GET \
--url https://{regionAndDomain}.com/api/query/funnels \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://{regionAndDomain}.com/api/query/funnels"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://{regionAndDomain}.com/api/query/funnels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{regionAndDomain}.com/api/query/funnels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{regionAndDomain}.com/api/query/funnels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{regionAndDomain}.com/api/query/funnels")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{regionAndDomain}.com/api/query/funnels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"meta": {
"dates": [
"2016-09-12",
"2016-09-19",
"2016-09-26"
]
},
"data": {
"2016-09-12": {
"steps": [
{
"count": 32688,
"avg_time": 2,
"avg_time_from_start": 5,
"step_conv_ratio": 1,
"goal": "App Open",
"overall_conv_ratio": 1,
"event": "App Open"
},
{
"count": 20524,
"avg_time": 133,
"avg_time_from_start": 133,
"step_conv_ratio": 0.627875673029858,
"goal": "$custom_event:12345",
"step_label": "Game Played",
"custom_event": true,
"custom_event_id": 12345,
"overall_conv_ratio": 0.627875673029858,
"event": "$custom_event:12345"
}
],
"analysis": {
"completion": 20524,
"starting_amount": 32688,
"steps": 2,
"worst": 1
}
},
"2016-09-19": {
"steps": [
{
"count": 32486,
"avg_time": 10,
"avg_time_from_start": 10,
"step_conv_ratio": 1,
"goal": "App Open",
"overall_conv_ratio": 1,
"event": "App Open"
},
{
"count": 20809,
"avg_time": 75,
"avg_time_from_start": 75,
"step_conv_ratio": 0.6405528535369082,
"goal": "$custom_event:12345",
"step_label": "Game Played",
"custom_event": true,
"custom_event_id": 12345,
"overall_conv_ratio": 0.6405528535369082,
"event": "$custom_event:12345"
}
],
"analysis": {
"completion": 20809,
"starting_amount": 32486,
"steps": 2,
"worst": 1
}
},
"2016-09-26": {
"steps": [
{
"count": 16103,
"avg_time": 10,
"avg_time_from_start": 5,
"step_conv_ratio": 1,
"goal": "App Open",
"overall_conv_ratio": 1,
"event": "App Open"
},
{
"count": 12679,
"avg_time": 571,
"avg_time_from_start": 571,
"step_conv_ratio": 0.7873688132646091,
"goal": "$custom_event:12345",
"step_label": "Game Played",
"custom_event": true,
"custom_event_id": 12345,
"overall_conv_ratio": 0.7873688132646091,
"event": "$custom_event:12345"
}
],
"analysis": {
"completion": 12679,
"starting_amount": 16103,
"steps": 2,
"worst": 1
}
}
}
}❗️The Funnels Query API is in maintenance mode. We recommend discontinuing new use of this endpoint. To get funnel data, build a Funnels report in-app and query it programmatically with the Insights Query API. For raw event data, see export methods. If you need help choosing the best method, reach out to support.
Query Parameters
The number of units (defined by length_unit) each user has to complete the funnel, starting from the time they triggered the first step in the funnel. May not be greater than 90 days. Note that we will query for events past the end of to_date to look for funnel completions. This defaults to the value that was previously saved in the UI for this funnel.
The property expression to segment the event on. See the expression to segment below.
An expression to filter events by. See the expression to segment below.
Was this page helpful?
Query Saved Report
curl --request GET \
--url https://{regionAndDomain}.com/api/query/funnels \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://{regionAndDomain}.com/api/query/funnels"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://{regionAndDomain}.com/api/query/funnels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{regionAndDomain}.com/api/query/funnels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{regionAndDomain}.com/api/query/funnels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{regionAndDomain}.com/api/query/funnels")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{regionAndDomain}.com/api/query/funnels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"meta": {
"dates": [
"2016-09-12",
"2016-09-19",
"2016-09-26"
]
},
"data": {
"2016-09-12": {
"steps": [
{
"count": 32688,
"avg_time": 2,
"avg_time_from_start": 5,
"step_conv_ratio": 1,
"goal": "App Open",
"overall_conv_ratio": 1,
"event": "App Open"
},
{
"count": 20524,
"avg_time": 133,
"avg_time_from_start": 133,
"step_conv_ratio": 0.627875673029858,
"goal": "$custom_event:12345",
"step_label": "Game Played",
"custom_event": true,
"custom_event_id": 12345,
"overall_conv_ratio": 0.627875673029858,
"event": "$custom_event:12345"
}
],
"analysis": {
"completion": 20524,
"starting_amount": 32688,
"steps": 2,
"worst": 1
}
},
"2016-09-19": {
"steps": [
{
"count": 32486,
"avg_time": 10,
"avg_time_from_start": 10,
"step_conv_ratio": 1,
"goal": "App Open",
"overall_conv_ratio": 1,
"event": "App Open"
},
{
"count": 20809,
"avg_time": 75,
"avg_time_from_start": 75,
"step_conv_ratio": 0.6405528535369082,
"goal": "$custom_event:12345",
"step_label": "Game Played",
"custom_event": true,
"custom_event_id": 12345,
"overall_conv_ratio": 0.6405528535369082,
"event": "$custom_event:12345"
}
],
"analysis": {
"completion": 20809,
"starting_amount": 32486,
"steps": 2,
"worst": 1
}
},
"2016-09-26": {
"steps": [
{
"count": 16103,
"avg_time": 10,
"avg_time_from_start": 5,
"step_conv_ratio": 1,
"goal": "App Open",
"overall_conv_ratio": 1,
"event": "App Open"
},
{
"count": 12679,
"avg_time": 571,
"avg_time_from_start": 571,
"step_conv_ratio": 0.7873688132646091,
"goal": "$custom_event:12345",
"step_label": "Game Played",
"custom_event": true,
"custom_event_id": 12345,
"overall_conv_ratio": 0.7873688132646091,
"event": "$custom_event:12345"
}
],
"analysis": {
"completion": 12679,
"starting_amount": 16103,
"steps": 2,
"worst": 1
}
}
}
}