Skip to main content

Funnel Analysis model API

Last updated 10/05/2026

For how to call the API, see the calling method described in the Open API document.

To learn about usage scenarios, read Funnel Analysis in the User Guide.

1. Funnel Analysis query​

Endpoint URL

/open/funnel-analyze?token=xxx

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key

Request body parameters​

{
"eventView":{
"endTime":"2021-10-31 23:59:59",
"filts":[
{
"columnDesc":"City",
"columnName":"city",
"comparator":"equal",
"filterType":"SIMPLE",
"ftv":[
"Shanghai",
"Beijing",
"Guangzhou",
"Shenzhen"],
"specifiedClusterDate":"2022-01-24",
"tableType":"user",
"timeUnit":""
}],
"groupBy":[
{
"columnDesc":"City",
"columnName":"city",
"propertyRange":"",
"specifiedClusterDate":"2022-01-24",
"tableType":"user"
}],
"recentDay":"",
"relation":"and",
"startTime":"2021-10-01 00:00:00",
"taIdMeasureVo":{
"columnDesc":"User unique ID",
"columnName":"#user_id",
"tableType":"event"
},
"windows_gap":1,
"windows_gap_tu":"hour"
},
"events":[
{
"eventName":"register",
"eventNameDisplay":"",
"filts":[
{
"columnDesc":"App version",
"columnName":"app_version",
"comparator":"equal",
"filterType":"SIMPLE",
"ftv":[
"V1.0"],
"specifiedClusterDate":"2022-01-26",
"tableType":"event",
"timeUnit":""
}],
"relation":"and"
},
{
"eventName":"login",
"eventNameDisplay":"",
"filts":[
],
"relation":"and"
},
{
"eventName":"activity_attend",
"eventNameDisplay":"",
"filts":[
],
"relation":"and"
},
{
"eventName":"logout",
"eventNameDisplay":"",
"filts":[
],
"relation":"and"
}
],
"projectId":377,
"limit": 2,
"timeoutSeconds": 10,
"useCache": true,
"zoneOffset": 10
}

Request parameters​

$$Parameter nameExample valueParameter typeRequiredDescription
eventView-ObjectYesCommon properties of the metrics
eventView.endTime2021-10-31 23:59:59StringNoEnd time (format: yyyy-MM-dd HH:mm:ss). Takes effect when the relative time is empty
eventView.filts-ListNoGlobal filters
eventView.filts.columnDescCityStringNoField display name
eventView.filts.columnNamecityStringYesField name
eventView.filts.comparatorequalStringYesSee Filter expressions in the Query API
eventView.filts.filterTypeSIMPLEStringNoFilter mode. SIMPLE: simple, COMPOUND: compound
eventView.filts.ftv["Shanghai"]ListNoLiteral constants used as boundaries for property comparison
eventView.filts.specifiedClusterDate2022-01-24StringNoUses the historical version of the tag for the specified date
eventView.filts.tableTypeuserStringYesTable type enum values
eventView.filts.timeUnitStringNoUnit of the property comparison value, valid only for relativeEvent*: day, hour, minute
eventView.groupBy-ListNoGroup-by properties. There can be zero or more
eventView.groupBy.columnDescCityStringNoField display name
eventView.groupBy.columnNamecityStringYesField name
eventView.groupBy.propertyRangeStringNoCustom property range
eventView.groupBy.specifiedClusterDate2022-01-24StringNoUses the historical version of the tag for the specified date
eventView.groupBy.tableTypeuserStringYesTable type enum values
eventView.recentDayStringNoRelative time (this item, the start time, and the end time can't all be empty)
eventView.relationandStringNoLogical relation. and: logical AND, or: logical OR
eventView.startTime2021-10-01 00:00:00StringNoStart time (format: yyyy-MM-dd HH:mm:ss). Takes effect when the relative time is empty
eventView.taIdMeasureVo-ObjectNoAnalysis entity configuration
eventView.taIdMeasureVo.columnDescUser Unique IDStringNoField display name
eventView.taIdMeasureVo.columnName#user_idStringYesField name
eventView.taIdMeasureVo.tableTypeeventStringYesTable type enum values
eventView.windows_gap1LongNoWindow length
eventView.windows_gap_tuhourStringNo

Unit of the window length:

  • second: seconds
  • minute: minutes
  • hour: hours
  • day: days
  • week: weeks
  • month: months
events-ListYesList of event metrics
events.eventNameregisterStringYesEvent name of the metric. You can use anyEvent to represent any event
events.eventNameDisplayStringNoDisplay name of the custom metric
events.filts-ListNoList of filter conditions
events.filts.columnDescApp versionStringNoField display name
events.filts.columnNameapp_versionStringYesField name
events.filts.comparatorequalStringYesSee Filter expressions in the Query API
events.filts.filterTypeSIMPLEStringNoFilter mode. SIMPLE: simple, COMPOUND: compound
events.filts.ftv["V1.0"]ListNoLiteral constants used as boundaries for property comparison
events.filts.specifiedClusterDate2022-01-26StringNoUses the historical version of the tag for the specified date
events.filts.tableTypeeventStringYesTable type enum values
events.filts.timeUnitStringNoTime unit of the filter
events.relationandStringNoLogical relation. and: logical AND, or: logical OR
projectId377IntegerYesProject ID
limit2IntegerNoMaximum number of groups per analysis object. Optional. Defaults to 1000, with a maximum of 10000
timeoutSeconds10IntegerNoRequest timeout. The query task is canceled when it times out
useCachetrueBooleanYestrue means the cache is used
zoneOffset10IntegerNoTime zone

Success response example​

{
"data": {
"result_generate_time": "2022-01-26 19:23:51",
"total": 5,
"x": [
"2021-10-01",
"2021-10-02",
"2021-10-03",
"2021-10-04",
"2021-10-05",
"2021-10-06",
"2021-10-07",
"2021-10-08",
"2021-10-09",
"2021-10-10",
"2021-10-11",
"2021-10-12",
"2021-10-13",
"2021-10-14",
"2021-10-15",
"2021-10-16",
"2021-10-17",
"2021-10-18",
"2021-10-19",
"2021-10-20",
"2021-10-21",
"2021-10-22",
"2021-10-23",
"2021-10-24",
"2021-10-25",
"2021-10-26",
"2021-10-27",
"2021-10-28",
"2021-10-29",
"2021-10-30",
"2021-10-31"
],
"y": [
{
"Overall": {
"col1": [
5666,
197,
197,
197
],
"col2": [
[
208,
10,
10,
10
],
[
205,
4,
4,
4
],
[
189,
5,
5,
5
],
[
229,
10,
10,
10
],
[
217,
6,
6,
6
],
[
257,
10,
10,
10
],
[
233,
6,
6,
6
],
[
207,
7,
7,
7
],
[
204,
7,
7,
7
],
[
248,
14,
14,
14
],
[
217,
4,
4,
4
],
[
207,
9,
9,
9
],
[
219,
8,
8,
8
],
[
220,
4,
4,
4
],
[
193,
10,
10,
10
],
[
218,
9,
9,
9
],
[
232,
7,
7,
7
],
[
222,
10,
10,
10
],
[
220,
8,
8,
8
],
[
203,
6,
6,
6
],
[
217,
8,
8,
8
],
[
239,
3,
3,
3
],
[
214,
5,
5,
5
],
[
197,
11,
11,
11
],
[
199,
8,
8,
8
],
[
135,
7,
7,
7
],
[
73,
1,
1,
1
],
[
33,
0,
0,
0
],
[
11,
0,
0,
0
],
[
0,
0,
0,
0
],
[
0,
0,
0,
0
]
]
}
},
{
"Beijing": {
"col1": [
2028,
70,
70,
70
],
"col2": [
[
79,
1,
1,
1
],
[
71,
2,
2,
2
],
[
65,
0,
0,
0
],
[
74,
3,
3,
3
],
[
72,
2,
2,
2
],
[
89,
3,
3,
3
],
[
88,
2,
2,
2
],
[
75,
3,
3,
3
],
[
66,
4,
4,
4
],
[
95,
1,
1,
1
],
[
60,
1,
1,
1
],
[
68,
5,
5,
5
],
[
80,
5,
5,
5
],
[
68,
2,
2,
2
],
[
67,
6,
6,
6
],
[
84,
4,
4,
4
],
[
84,
1,
1,
1
],
[
87,
1,
1,
1
],
[
79,
6,
6,
6
],
[
76,
1,
1,
1
],
[
81,
3,
3,
3
],
[
85,
1,
1,
1
],
[
89,
2,
2,
2
],
[
75,
3,
3,
3
],
[
74,
5,
5,
5
],
[
49,
2,
2,
2
],
[
26,
1,
1,
1
],
[
16,
0,
0,
0
],
[
6,
0,
0,
0
],
[
0,
0,
0,
0
],
[
0,
0,
0,
0
]
]
}
}
],
"z": [
"register",
"login",
"activity_attend",
"logout"
]
},
"return_code": 0,
"return_message": "success"
}

Response parameters​

$$Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message
data-ObjectReturned result
data.result_generate_time2022-01-01 00:00:00StringResult generation time
data.total5IntegerTotal count
data.x["2021-10-01"]ListTime list
data.y-List<Map>Data list
data.z["register"]ListEvent name list

Error response example

{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
Parameter nameExample valueParameter typeDescription
return_code-1008IntegerReturn code
return_messageParameter (token) is emptyStringReturn message

2. Funnel Analysis full download​

Endpoint URL

/open/streaming-download/funnel-analyze?token=xxx

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key

Request body parameters​

{
"eventView": {
"endTime": "2022-03-07 17:27:29",
"filts": [],
"groupBy": [],
"recentDay": "1-7",
"relation": "and",
"startTime": "2022-03-01 17:27:29",
"taIdMeasureVo": {
"columnDesc": "User ID",
"columnName": "#user_id",
"tableType": "event"
},
"windows_gap": 1,
"windows_gap_tu": "day"
},
"events": [{
"eventName": "Login",
"eventNameDisplay": "",
"filts": [],
"relation": "and"
}, {
"eventName": "LogOut",
"eventNameDisplay": "",
"filts": [],
"relation": "and"
}],
"projectId": 319,
"timeView": "TOTAL_TIME",
"resultType": "CONVERSION",
"zoneOffset": 10
}

Request parameters​

$$Parameter nameExample valueParameter typeRequiredDescription
eventView-ObjectYesSame as the parameters of the Funnel Analysis query API
events-ListYesSame as the parameters of the Funnel Analysis query API
projectId377IntegerYesProject ID
timeViewTOTAL_TIMEStringNoTime perspective: TOTAL_TIME (Total), PER_DATE (Daily)
resultTypeCONVERSIONStringNoResult type: CONVERSION (conversion), DROP_OFF (churn)
zoneOffset10IntegerNoTime zone

Response​

Same as the Funnel Analysis full download in AE

3. Funnel Analysis user list​

Endpoint URL

/open/funnel-user-list?token=xxx

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId0IntegerYesProject ID

Request body parameters​

{
"projectId": 0,
"eventView": {
"startTime": "2019-11-23 00:00:00",
"endTime": "2019-11-26 00:00:00",
"recentDay": "1-4",
"relation": "and",
"timeParticleSize": "day",
"filts": [
{
"columnName": "user_level",
"comparator": "equal",
"ftv": [
"5"
],
"tableType": "user"
}
],
"groupBy": [
{
"columnName": "#province",
"tableType": "event"
}
]
},
"events": [
{
"eventName": "obtain_item",
"relation": "and",
"filts": [
{
"columnName": "#province",
"comparator": "equal",
"ftv": [
"Jiangsu",
"Shanghai"
],
"tableType": "event"
}
]
}
],
"sliceFunnelStep": 1,
"sliceGroupVal": "['Shanghai']",
"timeoutSeconds": 10,
"zoneOffset": 10
}

Request parameters​

$$Parameter nameExample valueParameter typeRequiredDescription
projectId0StringYesDescription
eventView-ObjectYesSame as the parameters of the Funnel Analysis query API
eventsListYesSame as the parameters of the Funnel Analysis query API
sliceFunnelStep1IntegerYesFunnel step to drill down into, starting from 1
sliceGroupVal"['Shanghai']"ListNoGroup to drill down into
sliceWastageUserfalseBooleanNoWhether the users churned. true: yes; false: no
timeoutSeconds10IntegerNoRequest timeout. The query task is canceled when it times out
zoneOffset10IntegerNoTime zone

Success response example​

{
"data": {
"datalist": [
{
"#account_id": "u78082246",
"#distinct_id": "u145009846",
"user_level": 5,
"register_time": "2019-11-26 09:59:34",
"diamond_num": 1006,
"latest_login_time": "2019-11-26 11:14:12",
"channel": "Xiaomi GetApps",
"#user_id": 33463846
},
{
"#account_id": "k77655236",
"#distinct_id": "k144216836",
"user_level": 5,
"register_time": "2019-11-24 08:53:09",
"diamond_num": 1012,
"latest_login_time": "2019-11-24 10:02:38",
"channel": "Wandoujia",
"#user_id": 33280836
},
{
"#account_id": "a77648226",
"#distinct_id": "a144203826",
"user_level": 5,
"register_time": "2019-11-24 08:21:19",
"diamond_num": 1006,
"latest_login_time": "2019-11-24 09:32:31",
"channel": "Tencent MyApp",
"#user_id": 33277826
}
],
"columMeta": {
"#account_id": "Account ID",
"#distinct_id": "Distinct ID",
"user_level": "User level",
"register_time": "Registration time",
"diamond_num": "Current diamonds",
"first_recharge_time": "First top-up time",
"latest_login_time": "Last login time",
"channel": "Channel"
}
},
"return_code": 0,
"return_message": "success"
}

Response parameters​

$$Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message
data-ObjectReturned result
data.datalist-List<Map>User information
data.columMeta-MapMapping of field meanings

Error response example

{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
Parameter nameExample valueParameter typeDescription
return_code-1008IntegerReturn code
return_messageParameter (token) is emptyStringReturn message

4. Funnel Analysis user list download​

Endpoint URL

/open/streaming-download/funnel-user-list?token=xxx

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key

Request body parameters​

{
"eventView": {
"endTime": "2022-03-07 17:27:29",
"filts": [],
"groupBy": [],
"recentDay": "1-7",
"relation": "and",
"startTime": "2022-03-01 17:27:29",
"taIdMeasureVo": {
"columnDesc": "User ID",
"columnName": "#user_id",
"tableType": "event"
},
"windows_gap": 1,
"windows_gap_tu": "day"
},
"events": [{
"eventName": "Login",
"eventNameDisplay": "",
"filts": [],
"relation": "and"
}, {
"eventName": "LogOut",
"eventNameDisplay": "",
"filts": [],
"relation": "and"
}],
"projectId": 319,
"sliceFunnelStep": 1,
"sliceWastageUser": false,
"selectedColumns": ["#account_id", "#distinct_id"],
"zoneOffset": 10
}

Request parameters​

$$Parameter nameExample valueParameter typeRequiredDescription
projectId0StringYesDescription
eventView-ObjectYesSame as the parameters of the Funnel Analysis query API
eventsListYesSame as the parameters of the Funnel Analysis query API
sliceFunnelStep1IntegerYesFunnel step to drill down into, starting from 1
sliceGroupVal"['Shanghai']"ListNoGroup to drill down into
sliceWastageUserfalseBooleanNoWhether the users churned. true: yes; false: no
selectedColumns["#account_id", "#distinct_id"]ArrayNoColumns to download
zoneOffset10IntegerNoTime zone

Response​

Same as the Funnel Analysis user list download in AE

Was this page helpful?