Tracking management API
For how to call the API, see the calling method described in the Open API document.
1. Tracking plan
We recommend first reading the TE user manual to learn about tracking features: Tracking plan and Data validation
1. Query the tracking plan
Endpoint URL
/open/track-query?token=xxx&projectId=30
Request method
GET
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 30 | Integer | Yes | Project ID |
Success response example
{
"data": {
"commonEventProps": [{
"name": "#device_id",
"displayName": "Device ID",
"type": "string",
"desc": ""
}],
"createTime": "2021-10-12 11:47:31",
"eventProps": [
{
"createTime": "2021-10-12 11:47:30",
"creator": "TG-38045d57-403c-424c-a6a6-b12f6a8943bd",
"desc": "",
"displayName": "Reason",
"lastUpdateAuth": "TG-38045d57-403c-424c-a6a6-b12f6a8943bd",
"lastUpdateTime": "2021-10-12 11:47:30",
"name": "reason",
"type": "string"
}
],
"events": [
{
"createTime": "2021-10-12 11:47:30",
"creator": "TG-38045d57-403c-424c-a6a6-b12f6a8943bd",
"displayName": "",
"eventDesc": "Attend activity 3",
"eventName": "activity_attend",
"eventTag": "111,aaa",
"lastUpdateAuth": "TG-38045d57-403c-424c-a6a6-b12f6a8943bd",
"lastUpdateTime": "2021-10-12 13:01:10",
"props": [
"#city"
]
}
],
"projectId": 377,
"userProps": [
{
"createTime": "2021-10-12 11:47:30",
"creator": "TG-38045d57-403c-424c-a6a6-b12f6a8943bd",
"desc": "",
"displayName": "Balance",
"lastUpdateAuth": "TG-38045d57-403c-424c-a6a6-b12f6a8943bd",
"lastUpdateTime": "2021-10-12 11:47:30",
"name": "accountbalance",
"type": "number",
"updateTypeName": ""
}
]
},
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | - | Object | Returned data |
| data.commonEventProps | - | List | Super property information |
| data.commonEventProps.name | #device_id | String | Property name |
| data.commonEventProps.displayName | Device ID | String | Property display name |
| data.commonEventProps.type | string | String | Type |
| data.commonEventProps.desc | String | Description | |
| data.eventProps | - | List | Event property list |
| data.eventProps.createTime | 2021-10-12 11:47:30 | Date | Created at |
| data.eventProps.creator | TG-38045d57-403c-424c-a6a6-b12f6a8943bd | String | Creator |
| data.eventProps.desc | - | String | Description |
| data.eventProps.displayName | Reason | String | Display name |
| data.eventProps.lastUpdateAuth | TG-38045d57-403c-424c-a6a6-b12f6a8943bd | String | Last updated by |
| data.eventProps.lastUpdateTime | 2021-10-12 11:47:30 | Date | Last updated |
| data.eventProps.name | reason | String | Name |
| data.eventProps.type | string | String | Type |
| data.events | - | List | Event list |
| data.events.createTime | 2021-10-12 11:47:30 | Date | Created at |
| data.events.creator | TG-38045d57-403c-424c-a6a6-b12f6a8943bd | String | Creator |
| data.events.displayName | - | String | Display name |
| data.events.eventDesc | Attend activity 3 | String | Description |
| data.events.eventName | activity_attend | String | Name |
| data.events.eventTag | 111,aaa | String | Tags |
| data.events.lastUpdateAuth | TG-38045d57-403c-424c-a6a6-b12f6a8943bd | String | Last updated by |
| data.events.lastUpdateTime | 2021-10-12 13:01:10 | Date | Last updated |
| data.events.props | ["#city"] | List | Event property list |
| data.projectId | 377 | Integer | Project ID |
| data.userProps | - | String | User property list |
| data.userProps.createTime | 2021-10-12 11:47:30 | Date | Created at |
| data.userProps.creator | TG-38045d57-403c-424c-a6a6-b12f6a8943bd | String | Creator |
| data.userProps.desc | - | String | Description |
| data.userProps.displayName | Balance | String | Display name |
| data.userProps.lastUpdateAuth | TG-38045d57-403c-424c-a6a6-b12f6a8943bd | String | Last updated by |
| data.userProps.lastUpdateTime | 2021-10-12 11:47:30 | Date | Last updated |
| data.userProps.name | accountbalance | String | Name |
| data.userProps.type | number | String | Type |
| data.userProps.updateTypeName | - | String | |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -3004,
"return_message": "Invalid project"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -3004 | Integer | Return code |
| return_message | Invalid project | String | Return message |
2. Export the tracking plan
Downloads the tracking plan as an Excel file. An error is returned if the project has no tracking plan
Endpoint URL
/open/track-export?token=xxx&projectId=2
Request method
GET
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 2 | Integer | Yes | Project ID |
Success response example
The exported file is an xlsx file that contains sheets such as Integration Essentials, #User ID System, #Events, #Public Event Properties, # User Properties, Data Type Design Principles, Super Property Setup Methods, Multi-platform Integration Notes, and Tracking Recommendations for Multiple User ID Systems, as shown below:
Error response example
{
"return_code": -1023,
"return_message": "Target object no longer exists"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1023 | Integer | Return code |
| return_message | Target object no longer exists | String | Return message |
3. Export the tracking plan from metadata
Endpoint URL
/open/meta-export-track?token=xxx&projectId=2
Request method
GET
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 2 | Integer | Yes | Project ID |
Success response example
The exported file is an xlsx file that contains sheets such as Integration Essentials, #User ID System, #Events, #Public Event Properties, # User Properties, Data Type Design Principles, Super Property Setup Methods, Multi-platform Integration Notes, and Tracking Recommendations for Multiple User ID Systems, as shown below:
Error response example
{
"return_code": -3004,
"return_message": "Invalid project"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -3004 | Integer | Return code |
| return_message | Invalid project | String | Return message |
4. Validate tracking data
Endpoint URL
/open/track-check?token=xxx
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
Request body parameters
{
"projectId": 0,
"checkScope": {
"startTime": "2021-01-01 10:00",
"endTime": "2021-02-01 10:00",
"checkDataTypes": ["event_data", "user_data"],
"checkEvents": ["event1", "event2"],
"eventFilter": {
},
"userFilter": {
"tableType":"user",
"columnName": "#os",
"comparator": "equal",
"ftv": [
"ios"
]
}
},
"resultScope": {
"eventResults": ["unreported_event", "unplanned_event"],
"userResults": ["unreported_user_prop", "unplanned_user_prop"]
}
}
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| checkScope | - | Object | Yes | Validation scope |
| checkScope.checkDataTypes | event_data | List | No | Data types to validate: event_data for event data and user_data for user data. Both are validated by default |
| checkScope.checkEvents | string | List | No | Events to validate. null means all events are validated |
| checkScope.endTime | string | Date | No | End time of the validation period. Defaults to the current server time |
| checkScope.eventFilter | - | List | No | Event filter conditions. Only metadata event properties can be used for filtering (virtual properties and user tags can't be used) |
| checkScope.eventFilter.filterType | SIMPLE | String | No | Filter:
|
| checkScope.eventFilter.filts | - | List | No | List of filter values |
| checkScope.eventFilter.filts.filterType | SIMPLE | String | No | Filter:
|
| checkScope.eventFilter.relation | and | String | No | Logical relationship of the filter |
| checkScope.hasEmptyCheck | false | Boolean | No | Whether to treat empty strings as null values |
| checkScope.propNullValueThreshold | 0 | Integer | No | Property null rate threshold |
| checkScope.startTime | string | Date | No | Start time of the validation period. Defaults to the time the tracking plan was uploaded |
| checkScope.userFilter | - | List | No | User filter conditions. Only metadata user properties can be used for filtering (virtual properties and user tags can't be used) |
checkScope.userFilter.filterType | SIMPLE | String | No | Filter:
|
| checkScope.userFilter.filts | - | List | No | List of filter values |
checkScope.userFilter.filts.filterType | SIMPLE | String | No | Filter:
|
| checkScope.userFilter.relation | and | String | No | Logical relationship of the filter |
| projectId | 0 | Integer | Yes | Project ID |
| resultScope | - | Object | No | Result scope (if null, all results are selected by default) |
resultScope.eventResults | ["unreported_event"] | List | No | Event result scope. Valid values:
|
resultScope.userResults | ["missing_user_prop"] | List | No | User result scope. Valid values:
|
Success response example
{
"data": "d611d456-e74d-47e3-b078-370b79a134af",
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | d611d456-e74d-47e3-b078-370b79a134af | Object | Key for querying the validation result |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "projectId cannot be null"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | projectId cannot be null | String | Return message |
5. Query tracking validation results
Endpoint URL
/open/track-check-result-query?token=xxx&key=d611d456-e74d-47e3-b078-370b79a134af
Request method
GET
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| key | d611d456-e74d-47e3-b078-370b79a134af | String | Yes | Validation result key |
Success response example
{
"return_code": 0,
"return_message": "success",
"data": {
"projectId": 100,
"checkTime": "2021-04-23 14:00:00",
"checkScope": {},
"checkResultType": "result_fail",
"eventResults": [
{
"name": "event1",
"resultType": "success",
"details": [
{
"sample": [
""
]
}
],
"propNullRates": [
{
"propName": "property1",
"displayName": "displayName1",
"hasRequired": true,
"propNullRate": 60
}
]
},
{
"name": "event2",
"displayName": "Event 2",
"resultType": "fail",
"details": [
{
"propName": "property1",
"errorType": "type_error_prop",
"reportType": "string",
"planType": "number",
"sample": [
""
]
},
{
"propName": "property2",
"errorType": "unreported"
}
],
"propNullRates": [
{
"propName": "property1",
"displayName": "displayName1",
"hasRequired": true,
"propNullRate": 60
}
]
}
],
"userResult": {
"userSamples": [
{}
],
"userPropDetails": [
{
"name": "property1",
"displayName": "User property 1",
"resultType": "success",
"propNullRate": 10
}
]
}
}
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
| data | - | Object | Key for querying the validation result |
| data.projectId | 100 | Integer | Project ID |
| data.checkTime | 2021-04-23 14:00:00 | Date | Validation time |
| data.checkScope | {} | Object | Validation condition scope, that is, the request body of the /track-check API |
| data.checkResultType | result_fail | String | checkResultType: validation result type. There are 4 values:
|
| data.eventResults | - | List | Event data validation results |
| data.eventResults.name | event1 | String | Event name |
| data.eventResults.resultType | success | String | Event validation result type. There are 4 types:
|
| data.eventResults.details | - | List | Collection of detailed data |
| data.eventResults.details.sample | {} | Object | Sample examples. There are no samples when the event validation result type is unreported |
| data.eventResults.propNullRates | - | List | Property null rates |
| data.eventResults.propNullRates.propName | property1 | String | Event property name |
| data.eventResults.propNullRates.displayName | displayName1 | String | Event property display name |
| data.eventResults.propNullRates.hasRequired | true | Boolean | Whether required |
| data.eventResults.propNullRates.propNullRate | 60 | Integer | Null rate |
| data.userResult | - | Object | User data validation results |
| data.userResult.userSamples | {} | List | 10 sample users |
| data.userResult.userPropDetails | - | List | User property details |
| data.userResult.userPropDetails.name | property1 | String | User property name |
| data.userResult.userPropDetails.displayName | User property 1 | String | User property display name |
| data.userResult.userPropDetails.resultType | success | String | User property validation result type. There are 4 types:
|
| data.userResult.userPropDetails.propNullRate | 10 | Integer | Property null rates |
Error response example
{
"return_code": -1008,
"return_message": "key not exist"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | key not exist | String | Return message |
6. Save tracking items from Excel
Upload the Excel template with the file parameter
Endpoint URL
/open/track-excel-save?token=xxx&projectId=0
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 0 | Integer | Yes | Project ID |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": 0,
"return_message": "success",
"data": ""
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
| data | Object | Returned data |
7. Add tracking items
If the requested event name or property name already exists in the tracking plan, an error is returned
Example: add an event property to an existing event (add the register_name event property and bind it to the existing event register)
Endpoint URL
/open/track-insert?token=xxx
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
Request body parameters
{
"projectId": 100,
"events": [
{
"eventName": "register",
"displayName": "Registration event",
"hasAutoCollect": false,
"dataOrigin": "ios",
"eventDesc": "The registration event is triggered when a user registers for the game",
"eventTag": "",
"props": [
"register_name"
]
}
],
"eventProps": [
{
"name": "register_name",
"displayName": "Registration name",
"type": "string",
"hasRequired": true,
"desc": ""
}
],
"userProps": [
{
"name": "user_name",
"displayName": "User name",
"type": "string",
"updateType": "user_set",
"desc": "",
"propTag": ""
}
],
"commonEventProps": [
{
"name": "#device_id",
"displayName": "Device ID",
"type": "string",
"hasRequired": true,
"desc": ""
}
]
}
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| projectId | 100 | Integer | Yes | Project ID |
| events | - | List | No | Event information |
| events.eventName | register | String | Yes | Event name |
| events.displayName | Registration event | String | Yes | Event display name |
| events.hasAutoCollect | false | Boolean | No | Whether the event is auto-collected. Defaults to no |
| events.dataOrigin | ios | String | No | Data source. The data source is the value of the #lib field in the raw data. If there is no #lib, the source is Other |
| events.eventDesc | The registration event is triggered when a user registers for the game | String | No | Event description |
| events.eventTag | String | No | Event tag | |
| events.props | register_name | List | No | Event property list, a collection of event property names |
| eventProps | - | List | No | Event property information |
| eventProps.name | register_name | String | Yes | Event property name. Required |
| eventProps.displayName | Registration name | String | Yes | Event property display name |
| eventProps.type | string | String | Yes | Event property type. There are five types: string, number, datetime, bool, and array |
| eventProps.hasRequired | true | Boolean | No | Defaults to true |
| eventProps.desc | String | No | Event property description | |
| userProps | - | List | No | User property information |
| userProps.name | user_name | String | Yes | User property name |
| userProps.displayName | User name | String | Yes | User property display name |
| userProps.type | string | String | Yes | User property type. There are five types: string, number, datetime, bool, and array |
| userProps.updateType | user_set | String | No | User property update method. There are three types: user_setOnce, user_set, and user_add |
| userProps.desc | String | No | User property description | |
| userProps.propTag | String | No | User property tag | |
| commonEventProps | - | List | No | Super property information |
| commonEventProps.name | #device_id | String | Yes | Event property name |
| commonEventProps.displayName | Device ID | String | Yes | Event property display name |
| commonEventProps.type | string | String | Yes | Event property type. There are five types: string, number, datetime, bool, and array |
| commonEventProps.hasRequired | true | Boolean | No | Defaults to true |
| commonEventProps.desc | String | No | Event property description |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -3004,
"return_message": "Invalid project"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -3004 | Integer | Return code |
| return_message | Invalid project | String | Return message |
8. Save tracking items
Unlike the add API, this API also supports updating existing tracking properties
Endpoint URL
/open/track-save?token=xxx
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
Request body parameters
{
"projectId": 100,
"events": [
{
"eventName": "register",
"displayName": "Registration event",
"hasAutoCollect": false,
"dataOrigin": "ios",
"eventDesc": "The registration event is triggered when a user registers for the game",
"eventTag": "",
"props": [
"register_name"
]
}
],
"eventProps": [
{
"name": "register_name",
"displayName": "Registration name",
"type": "string",
"hasRequired": true,
"desc": ""
}
],
"userProps": [
{
"name": "user_name",
"displayName": "User name",
"type": "string",
"updateType": "user_set",
"desc": "",
"propTag": ""
}
],
"commonEventProps": [
{
"name": "#device_id",
"displayName": "Device ID",
"type": "string",
"hasRequired": true,
"desc": ""
}
]
}
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| projectId | 100 | Integer | Yes | Project ID |
| events | - | List | No | Event information |
| events.eventName | register | String | Yes | Event name |
| events.displayName | Registration event | String | Yes | Event display name |
| events.hasAutoCollect | false | Boolean | No | Whether the event is auto-collected. Defaults to no |
| events.dataOrigin | ios | String | No | Data source. The data source is the value of the #lib field in the raw data. If there is no #lib, the source is Other |
| events.eventDesc | The registration event is triggered when a user registers for the game | String | No | Event description |
| events.eventTag | String | No | Event tag | |
| events.props | register_name | List | No | Event property list, a collection of event property names |
| eventProps | - | List | No | Event property information |
| eventProps.name | register_name | String | Yes | Event property name. Required |
| eventProps.displayName | Registration name | String | Yes | Event property display name |
| eventProps.type | string | String | Yes | Event property type. There are five types: string, number, datetime, bool, and array |
| eventProps.hasRequired | true | Boolean | No | Defaults to true |
| eventProps.desc | String | No | Event property description | |
| userProps | - | List | No | User property information |
| userProps.name | user_name | String | Yes | User property name |
| userProps.displayName | User name | String | Yes | User property display name |
| userProps.type | string | String | Yes | User property type. There are five types: string, number, datetime, bool, and array |
| userProps.updateType | user_set | String | No | User property update method. There are three types: user_setOnce, user_set, and user_add |
| userProps.desc | String | No | User property description | |
| userProps.propTag | String | No | User property tag | |
| commonEventProps | - | List | No | Super property information |
| commonEventProps.name | #device_id | String | Yes | Event property name |
| commonEventProps.displayName | Device ID | String | Yes | Event property display name |
| commonEventProps.type | string | String | Yes | Event property type. There are five types: string, number, datetime, bool, and array |
| commonEventProps.hasRequired | true | Boolean | No | Defaults to true |
| commonEventProps.desc | String | No | Event property description |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -3004,
"return_message": "Invalid project"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -3004 | Integer | Return code |
| return_message | Invalid project | String | Return message |
9. Edit tracking items
Provide the exact values of the other fields that you are not updating, because the data is updated as a whole
Endpoint URL
/open/track-update?token=xxx
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
Request body parameters
{
"projectId": 2,
"targetName": "buy_shopitem",
"event": {
"eventName": "buy_shopitem",
"displayName": "testName",
"eventTag": "testTag",
"eventDesc": "12",
"props": [
"#app_version"
]
},
"deleteProps": [
{
"displayName": "Carrier",
"hasReported": true,
"name": "#carrier",
"type": "string"
}
],
"eventProps": [
{
"displayName": "App version",
"hasReported": true,
"name": "#app_version",
"type": "string"
}
],
"userProps": [
{
"displayName": "Coin quantity card",
"desc": "",
"name": "coin_num",
"type": "string",
"updateType": "user_set",
"propTag": "testPropTag"
}
]
}
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| projectId | 2 | Integer | Yes | Project ID |
| targetName | buy_shopitem | String | Yes | Target name |
| events | - | List | - | Event information |
| events.eventName | buy_shopitem | String | Yes | Event name |
| events.displayName | testName | String | Yes | Event display name |
| events.hasAutoCollect | false | Boolean | No | Whether the event is auto-collected. Defaults to no |
| events.dataOrigin | ios | String | No | Data source. The data source is the value of the #lib field in the raw data. If there is no #lib, the source is Other |
| events.eventDesc | 12 | String | No | Event description |
| events.eventTag | testTag | String | No | Event tag |
| events.props | ["#app_version"] | List | No | Event property list, a collection of event property names |
| eventProps | - | List | - | Event property information |
| eventProps.name | #app_version | String | Yes | Event property name. Required |
| eventProps.displayName | App version | String | Yes | Event property display name |
| eventProps.type | string | String | Yes | Event property type. There are five types: string, number, datetime, bool, and array |
| eventProps.hasReported | true | Boolean | No | Defaults to true |
| eventProps.desc | String | No | Event property description | |
| userProps | - | List | - | User property information |
| userProps.name | coin_num | String | Yes | User property name |
| userProps.displayName | Coin quantity card | String | Yes | User property display name |
| userProps.type | string | String | Yes | User property type. There are five types: string, number, datetime, bool, and array |
| userProps.updateType | user_set | String | No | User property update method. There are three types: user_setOnce, user_set, and user_add |
| userProps.desc | String | No | User property description | |
| userProps.propTag | testPropTag | String | No | User property tag |
| commonEventProps | - | List | - | Super property information |
| commonEventProps.name | #device_id | String | Yes | Event property name |
| commonEventProps.displayName | Device ID | String | Yes | Event property display name |
| commonEventProps.type | string | String | Yes | Event property type. There are five types: string, number, datetime, bool, and array |
| commonEventProps.hasReported | true | Boolean | No | Defaults to true |
| commonEventProps.desc | String | No | Event property description | |
| deleteProps | - | List | No | Event properties to delete completely |
| deleteProps.name | #carrier | String | Yes | Event property name |
| deleteProps.displayName | Carrier | String | Yes | Event property display name |
| deleteProps.type | string | String | Yes | Event property type. There are five types: string, number, datetime, bool, and array |
| deleteProps.hasReported | true | Boolean | No | Defaults to true |
| deleteProps.desc | String | No | Event property description |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -3004,
"return_message": "Invalid project"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -3004 | Integer | Return code |
| return_message | Invalid project | String | Return message |
10. Upload a tracking plan
If the project already has a plan, the existing plan is deleted and a new one is created
Endpoint URL
/open/track-upload?token=xxx
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
Request body parameters
{
"projectId": 0,
"events": [
{
"eventName": "register",
"displayName": "Registration event",
"hasAutoCollect": false,
"dataOrigin": "ios",
"eventDesc": "The registration event is triggered when a user registers for the game",
"eventTag": "General",
"props": ["register_name"]
}
],
"eventProps": [
{
"name": "register_name",
"displayName": "Registration name",
"type": "string",
"hasRequired": true,
"desc": ""
}
],
"userProps": [
{
"name": "user_name",
"displayName": "User name",
"type": "string",
"updateType": "user_set",
"desc": "",
"propTag": ""
}
],
"commonEventProps": [
{
"name": "#device_id",
"displayName": "Device ID",
"type": "string",
"hasRequired": true,
"desc": ""
}
]
}
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| projectId | 100 | Integer | Yes | Project ID |
| events | - | List | No | Event information |
| events.eventName | register | String | Yes | Event name |
| events.displayName | Registration event | String | Yes | Event display name |
| events.hasAutoCollect | false | Boolean | No | Whether the event is auto-collected. Defaults to no |
| events.dataOrigin | ios | String | No | Data source. The data source is the value of the #lib field in the raw data. If there is no #lib, the source is Other |
| events.eventDesc | The registration event is triggered when a user registers for the game | String | No | Event description |
| events.eventTag | General | String | No | Event tag |
| events.props | register_name | String | No | Event property list, a collection of event property names |
| eventProps | - | List | No | Event property information |
| eventProps.name | register_name | String | Yes | Event property name. Required |
| eventProps.displayName | Registration name | String | Yes | Event property display name |
| eventProps.type | string | String | Yes | Event property type. There are five types: string, number, datetime, bool, and array |
| eventProps.hasRequired | true | Boolean | No | Whether required. Defaults to true |
| eventProps.desc | String | No | Event property description | |
| userProps | - | List | No | User property information |
| userProps.name | user_name | String | Yes | User property name |
| userProps.displayName | User name | String | Yes | User property display name |
| userProps.type | string | String | Yes | User property type. There are five types: string, number, datetime, bool, and array |
| userProps.updateType | user_set | String | No | User property update method. There are three types: user_setOnce, user_set, and user_add |
| userProps.desc | String | No | User property description | |
| userProps.propTag | String | No | User property tag | |
| commonEventProps | - | List | No | Super property information |
| commonEventProps.name | #device_id | String | Yes | Event property name |
| commonEventProps.displayName | Device ID | String | Yes | Event property display name |
| commonEventProps.type | string | String | Yes | Event property type. There are five types: string, number, datetime, bool, and array |
| commonEventProps.hasRequired | true | Boolean | No | Whether required. Defaults to true |
| commonEventProps.desc | String | No | Event property description |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -3004,
"return_message": "Invalid project"
}
11. Delete the tracking plan
Endpoint URL
/open/track-delete?token=xxx&projectId=100
Request method
GET
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 100 | Integer | Yes | Project ID |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -3004,
"return_message": "Invalid project"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -3004 | Integer | Return code |
| return_message | Invalid project | String | Return message |
12. Delete tracking items
- When you delete an event, the entire event and its bindings to event properties are deleted
- When you delete an event property, its bindings to all events are deleted
Endpoint URL
/open/track-delete-item?token=xxx
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
Request body parameters
{
"projectId": 0,
"events": [
"login_in"
],
"eventPropNames": [
"register_name"
],
"userPropNames": [
"user_name"
],
"commonEventPropNames": [
"#device_id"
]
}
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| projectId | 100 | Integer | Yes | Project ID |
| events | ["login_in"] | List | No | Event name list |
| eventPropNames | ["register_name"] | List | No | Event property name list |
| userPropNames | ["user_name"] | List | No | User property name list |
| commonEventPropNames | ["#device_id"] | List | No | Super property name list |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -3004,
"return_message": "Invalid project"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -3004 | Integer | Return code |
| return_message | Invalid project | String | Return message |

