本文档用于指导 AI 或程序自动生成事件分析请求参数。请求应尽量精简、稳定,并使用名称而不是 ID 来描述事件和属性。
使用稳定名称生成请求:
eventNameanalysis[0] 或 customEvents 中的属性名columnNamecustomEvents不要生成:
eventIDid最小结构:
{
"eventsSelect": [],
"eventsFilter": {
"relation": "and",
"filterType": "SIMPLE",
"filters": []
},
"eventsGroup": {
"globalization": []
},
"eventsView": {
"timeParticleSize": "day",
"recentDay": "0$$6",
"dynamicDate": ""
},
"timeZoneOffset": 0,
"dataBase": "dt_xxx"
}
dataBase 是必填字段,格式为 dt_xxx。
普通事件总次数:
{
"eventType": "default",
"eventName": "$app_install",
"eventDisplayName": "App Install Count",
"analysis": ["A100"],
"relation": "and",
"filterType": "SIMPLE",
"filters": []
}
事件属性聚合:
{
"eventType": "default",
"eventName": "#ad_paid",
"eventDisplayName": "Ad Revenue",
"analysis": ["#ad_value", "A103"],
"relation": "and",
"filterType": "SIMPLE",
"filters": []
}
使用 customEvents 描述公式指标。
{
"eventType": "customized",
"eventDisplayName": "ROAS",
"customEvents": "#ad_paid.#ad_value.A103 / DT@first_install.vep$cac.A103",
"format": "PERCENTAGE",
"relation": "and",
"filterType": "SIMPLE",
"filters": [],
"customFilters": [
{
"relation": "and",
"filterType": "SIMPLE",
"filters": []
},
{
"relation": "and",
"filterType": "SIMPLE",
"filters": []
}
]
}
规则:
customEvents 中每个事件因子都必须有一个对应的 customFilters 项。customFilters 的顺序必须和 customEvents 中事件因子的顺序一致。format 控制。eventSplitIndex。例如:
{
"eventSplitIndex": [0, 1]
}
空筛选容器:
{
"relation": "and",
"filterType": "SIMPLE",
"filters": []
}
普通筛选:
{
"relation": "and",
"filterType": "SIMPLE",
"filters": [
{
"columnName": "$uid",
"columnDesc": "DT User ID",
"columnType": "string",
"tableType": "event",
"type": 0,
"comparator": "C06",
"filterValue": [],
"extra": {
"parent_column_type": null
}
}
]
}
嵌套筛选:
{
"relation": "and",
"filterType": "SIMPLE",
"filters": [
{
"relation": "and",
"filterType": "SIMPLE",
"filters": [
{
"columnName": "#active_device_brand",
"columnDesc": "Device Brand",
"columnType": "string",
"tableType": "user",
"type": 1,
"comparator": "C01",
"filterValue": ["WIKO", "FCNT"],
"extra": {
"parent_column_type": null
}
}
]
}
]
}
维度属性的 type 为 4,需要保留最小 extra。
{
"columnName": "$active_country_code@full_name@zh-CN",
"columnDesc": "Country/Region",
"columnType": "string",
"tableType": "user",
"type": 4,
"comparator": "C00",
"filterValue": ["美国(US)"],
"extra": {
"bound_prop": "$active_country_code",
"dimension_app_id": "conf",
"dimension_table_type_code": 1
}
}
不要为维度属性生成 dimension_id 或 bound_prop_id。
对象子属性需要带 extra.parent_column_type。
对象子属性:
{
"columnName": "item.price",
"columnDesc": "Item Price",
"columnType": "number",
"tableType": "event",
"type": 2,
"comparator": "C04",
"filterValue": ["10"],
"extra": {
"parent_column_type": "object"
}
}
对象组子属性:
{
"columnName": "items.price",
"columnDesc": "Item Price",
"columnType": "number",
"tableType": "event",
"type": 2,
"comparator": "C04",
"filterValue": ["10"],
"extra": {
"parent_column_type": "objectArray"
}
}
对象组整体匹配使用 C25、C26、C27,并且必须带嵌套 filter:
C25:对象组中存在满足条件的对象C26:对象组中不存在满足条件的对象C27:对象组中所有对象都满足条件{
"columnName": "items",
"columnDesc": "Items",
"columnType": "objectArray",
"tableType": "event",
"type": 2,
"comparator": "C25",
"filterValue": [],
"extra": {
"parent_column_type": null
},
"filter": {
"relation": "and",
"filterType": "SIMPLE",
"filters": [
{
"columnName": "items.price",
"columnDesc": "Item Price",
"columnType": "number",
"tableType": "event",
"type": 2,
"comparator": "C04",
"filterValue": ["10"],
"extra": {
"parent_column_type": "objectArray"
}
}
]
}
}
维度属性绑定在对象或对象组子属性上时,额外保留父属性信息:
{
"columnName": "items.country@full_name@zh-CN",
"columnDesc": "Item Country",
"columnType": "string",
"tableType": "event",
"type": 4,
"comparator": "C00",
"filterValue": ["美国(US)"],
"extra": {
"bound_prop": "country",
"dimension_app_id": "conf",
"dimension_table_type_code": 0,
"bound_parent_prop": "items",
"bound_parent_prop_type": "objectArray"
}
}
如果对象或对象组子属性用于事件属性聚合,建议同时传 boundProp:
{
"eventType": "default",
"eventName": "#purchase",
"eventDisplayName": "Item Revenue",
"analysis": ["items.price", "A103"],
"relation": "and",
"filterType": "SIMPLE",
"filters": [],
"boundProp": [
{
"name": "items.price",
"parent_column_type": "objectArray"
}
]
}
无分组:
{
"eventsGroup": {
"globalization": []
}
}
普通分组:
{
"columnName": "#active_screen_height",
"columnType": "number",
"tableType": "user",
"type": 1,
"displayName": "Screen Height",
"propertyRangeType": 2,
"propertyRange": [800],
"timeGroupType": "daily",
"extra": {
"parent_column_type": null
}
}
规则:
displayName。propertyRangeType 和 propertyRange。tagVersion 和 tagHistoryDate。动态时间:
{
"eventsView": {
"timeParticleSize": "day",
"recentDay": "0$$6",
"dynamicDate": ""
}
}
静态时间:
{
"eventsView": {
"timeParticleSize": "day",
"recentDay": "",
"dateList": ["2026-06-18", "2026-06-24"],
"dynamicDate": ""
}
}
时间对比:
{
"eventsView": {
"timeParticleSize": "day",
"recentDay": "0$$6",
"dynamicDate": "",
"comparedDate": [
{
"recentDay": "4$$7",
"dynamicDate": ""
}
]
}
}
规则:
recentDay。dateList。comparedDate[].key。{
"eventsSpliter": {
"eventsToSplit": [
{
"eventName": "$app_install"
},
{
"eventName": "#session_start"
}
],
"splitPriority": "first",
"propertyGroup": [
{
"columnName": "#event_name",
"columnType": "string",
"tableType": "event",
"type": 1,
"displayName": "Event Name",
"propertyRangeType": 1,
"propertyRange": [0],
"timeGroupType": "daily",
"extra": {
"parent_column_type": null
}
}
]
}
}
规则:
eventsToSplit 只需要 eventName。eventsToSplit[].eventID。eventSplitIndex。AI 生成最小请求时,不要包含以下字段:
key
eventID
id
has_dimension
name
display_name
describe
data_type
table_type_code
table_type
calcu_symbol
defaultOpen
presetEventDisplayName
boundProp when empty
retention_metrics when empty
update_time
debugQuery
eventsGroup.individuality
comparedDate[].key
empty filter.filter
dimension_id
bound_prop_id
eventsToSplit[].eventID
返回请求前检查:
eventType。eventName、eventDisplayName、analysis、relation、filterType、filters。customEvents、eventDisplayName、format、customFilters。customFilters 数量和 customEvents 中事件因子数量一致。columnName、columnType、tableType、type、comparator、filterValue、extra。columnName、columnType、tableType、type、displayName。eventID 或属性 id。