目录
此内容是否有帮助?

# Funnel Analysis Model API

As for the call method, please refer to the call method description in Open API

You can read the funnel analysis in the user manual to understand the usage scenario.

# Funnel Analysis Query

Interface URL

/open/funnel-analyze?token=xxx

Request method

POST

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token

# Request Body Parameter

{
  "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":"only user 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
}

# Request Parameter Description

Parameter name Sample value Parameter type Is required Parameter description
eventView
-
Object
Yes
Metrics common attribute part
endTime 2021-10-31 23:59:59
String
No
End time (format: yyyy-MM-dd HH: mm: ss), valid when the relative time is empty
filts -
List
No
Global filters parts
columnDesc City
String
No
Field display name
columnName city
String
Yes
Field name
comparator equal
String
Yes
Reference: filtering expression of
model query API
filterType SIMPLE
String
No
Filter mode, SIMPLE: simple, COMPOUND: composite
ftv ["Shanghai"]
List
No
Property comparative with bound literial
specifiedClusterDate 2022-01-24
String
No
Historical tag version of specified date
tableType user
String
Yes
Table type enumeration
timeUnit String
No
Property filter unit, only valid to relativeEvent*:day,hour,minute
groupBy -
List
No
Group attributes, can have zero or more
columnDesc City
String
No
Field display name
columnName city
String
Yes
Field name
propertyRange String
No
Self-defined property interval
specifiedClusterDate 2022-01-24
String
No
Historical tag version of specified date
tableType user
String
Yes
Table type enumeration
recentDay String
No
Relative time (this item cannot be empty both with the start time and the end time)
relation and
String
No
Logical relationship, and: logical and, or: logical or
startTime 2021-10-01 00:00:00
String
No
Start time (format: yyyy-MM-dd HH: mm: ss), valid when the relative time is empty
taIdMeasureVo -
Object
No
Query
ID system configuration
columnDesc User unique ID
String
No
Field display name
columnName #user_id
String
Yes
Field name
tableType event
String
Yes
Table type enumeration
windows_gap 1
Long
No
Window duration
windows_gap_tu hour
String
No
Window duration units,
Second: seconds
Minutes: minutes
Hour: hour
Day: day
Week: week
Month: month
events
-
List
Yes
Event metric list
eventName register
String
Yes
The eventName the metric based on, "anyEvent" can be used to represent any event
eventNameDisplay String
No
Self-defined metric display name
filts -
List
No
List of conditions
columnDesc App version
String
No
Field display name
columnName app_version
String
Yes
Field name
comparator equal
String
Yes
Reference: filtering expression of
model query API
filterType SIMPLE
String
No
Filter mode, SIMPLE: simple, COMPOUND: composite
ftv ["V1.0"]
List
No
Property comparative with bound literial
specifiedClusterDate 2022-01-26
String
No
Historical tag version of specified date
tableType event
String
Yes
Table type enumeration
timeUnit String
No
Filter time unit
relation and
String
No
Logical relationship, and: logical and, or: logical or
projectId
377
Integer
Yes
Project
enumeric identity
limit
2
Integer
No
Maximum number of groups per analysis object, optional parameters, default is 1000, maximum is 10000
timeoutSeconds
10
Integer
No
Request timed out parameter, timeout cancels query task
useCache
true
Boolean
No
Use cache, optional parameter, default is true

# Successful 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": [
      {
        "total": {
          "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 Parameter Description

Parameter name Sample value Parameter type Parameter description
return_code
0
Integer
Return code
return_message
success
String
Return
message
data
-
Object
Return result
result_generate_time 2022-01-01 00:00:00
String
Calculation result generation time
total 5
Integer
Total
x ["2021-10-01"]
List
Time list
y -
List
Data List
z ["register"]
List
List of event names

Error Response Example

{
    "return_code": -1008,
    "return_message": "The parameter (token) is empty"
}
Parameter name Sample value Parameter type Parameter description
return_code
-1008
Integer
Return code
return_message
The parameter (token) is empty
String
Return information

# Funnel Analysis Full Data Download

Interface URL

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

Request method

POST

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Mandatory or not Parameter description
token
xxx
String
Yes
Query
key

# Request Body parameter

{
        "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"
}

# Request Parameter Description

Parameter name Sample value Parameter type Mandatory or not Parameter description
eventView
-
Object
Yes
Same parameters as Funnel Analysis
Query
interface
events
-
List
Yes
Same parameters as Funnel Analysis
Query
interface
projectId
377
Integer
Yes
项目ID
timeView
TOTAL_TIME
String
No
Time analysis aspect,
TOTAL_TIME(By total)
,
PER_DATE(By date)
resultType
CONVERSION
String
No
Result Type, CONVERSION(Download conversion part),
DROP_OFF(Download drop part)

# Response

Same with the full data download of the funnel analysis of the TE system

# Funnel Analysis User List

Interface URL

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

Request method

POST

Content-Type

application/json

Request Query parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
0
Integer
Yes
Project ID

# Request Body Parameter

{
  "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
}

# Request Parameter Description

Parameter name Sample value Parameter type Is required Parameter description
projectId
0
String
Yes
Project numeric indentity
eventView
-
Object
Yes
Same parameters as Funnel Analysis
Query
interface
events
List
Yes
Same parameters as Funnel Analysis
Query
interface
sliceFunnelStep
1
Integer
Yes
Go to the detail by which
Funnel step, starting from 1
sliceGroupVal
"['Shanghai']"
String
No
Go to the detail by which
grouping
sliceWastageUser
false
Boolean
No
Whether lost user,true: yes,false: no
timeoutSeconds
10
Integer
No
Request timed out parameter, timeout cancels query task

# Successful 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 App store",
        "#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": "Wangdoujia",
        "#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": "Application treasure",
        "#user_id": 33277826
      }
    ],
    "columMeta": {
      "#account_id": "account ID",
      "#distinct_id": "visitor ID",
      "user_level": "user level",
      "register_time": "register time",
      "diamond_num": "diamond number",
      "first_recharge_time": "first recharge time",
      "latest_login_time": "lastest login time",
      "channel": "channel"
    }
  },
  "return_code": 0,
  "return_message": "success"
}

# Response Parameter Description

Parameter name Sample value Parameter type Parameter description
return_code
0
Integer
Return code
return_message
success
String
Return
message
data
-
Object
Return result
datalist -
List
User Information
columMeta -
Map
Field meaning mapping

Error Response Example

{
    "return_code": -1008,
    "return_message": "The parameter (token) is empty"
}
Parameter name Sample value Parameter type Parameter description
return_code
-1008
Integer
Return code
return_message
The parameter (token) is empty
String
Return information

# Download of Funnel Analysis User List

Interface URL

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

请求方式

POST

Content-Type

application/json

Request Query parameters

Parameter name Sample value Parameter type Mandatory or not Parameter description
token
xxx
String
Yes
Query
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"]
}

# Request Parameter Description

Parameter name Sample value Parameter type Mandatory or not Parameter description
projectId
0
String

Project numeric indentity
eventView
-
Object

Same parameters as Funnel Analysis
Query
interface
events
List

Same parameters as Funnel Analysis
Query
interface
sliceFunnelStep
1
Integer

Go to the detail by which Funnel step, starting from 1
sliceGroupVal
"['Shanghai']"
String

Go to the detail by which grouping
sliceWastageUser
false
Boolean

Whether lost user,true: yes,false: no
selectedColumns
["#account_id", "#distinct_id"]
Array

The columns to be downloaded

# Response

Same with the download of the funnel analysis user list of the TE system