事件分析

优质
小牛编辑
138浏览
2023-12-01

功能介绍

获取本APP的事件列表数据

接口

https://openapi.baidu.com/rest/2.0/mtj/svc/app/getDataByKey

请求参数

此处仅列本接口特有参数,公共参数请参考报告级API说明

获取表格数据

参数名参数类型是否必须描述
methodstringevent/a
metricsstring指标列表,指标间逗号分隔

指标

指标名描述适用接口
daily_event_count触发次数(日均)event/a
daily_event_user_count触发用户数(日均)event/a
average_event_time事件平均时长event/a

示例

获取事件列表数据

请求

https://openapi.baidu.com/rest/2.0/mtj/svc/app/getDataByKey?access_token=[ACCESS_TOKEN]&key=[APP_KEY]&method=event/a&start-date=20171102000000&end-date=20171108232359&metrics=daily_event_count,daily_event_user_count,average_event_time

响应

{
    "status": 0,
    "msg": "",
    "data": {
        "offset": 0,
        "timeSpan": [
            "2017\/11\/02 - 2017\/11\/08"
        ],
        "fields": [
            "event_title",
            "event_name",
            "daily_event_count",
            "daily_event_user_count",
            "average_event_time"
        ],
        "total": 5,
        "end": 0,
        "sum": [
            [
                "--",
                "--",
                "--"
            ],
            []
        ],
        "pageSum": [],
        "items": [
            [
                [
                    {
                        "id": 344971,
                        "eventId": "10001",
                        "eventName": "搜索关键字",
                        "type": 0,
                        "web": 0
                    }
                ],
                [
                    {
                        "id": 345035,
                        "eventId": "10002",
                        "eventName": "保存头像",
                        "type": 0,
                        "web": 0
                    }
                ],
                [
                    {
                        "id": 345149,
                        "eventId": "10000",
                        "eventName": "启动",
                        "type": 0,
                        "web": 0
                    }
                ],
                [
                    {
                        "id": 346384,
                        "eventId": "10003",
                        "eventName": "收藏",
                        "type": 0,
                        "web": 0
                    }
                ],
                [
                    {
                        "id": 346385,
                        "eventId": "10004",
                        "eventName": "保存高清头像",
                        "type": 0,
                        "web": 0
                    }
                ]
            ],
            [
                [
                    "--",
                    "--",
                    "--"
                ],
                [
                    "--",
                    "--",
                    "--"
                ],
                [
                    "--",
                    "--",
                    "--"
                ],
                [
                    "--",
                    "--",
                    "--"
                ],
                [
                    "--",
                    "--",
                    "--"
                ]
            ],
            [],
            []
        ]
    }
}