渠道分析

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

功能介绍

获取本APP的渠道分析报告相关数据

接口

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

请求参数

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

获取表格数据

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

指标

指标名描述适用接口
new_user_count_channel本渠道新用户channel/a
brand_new_user_count_channel新用户channel/a,channel/f
session_count_channel启动次数channel/a,channel/f
user_count_channel启动用户channel/a,channel/f
average_session_time_channel平均使用时长channel/a,channel/f

对于channel/f的请求,其channel参数必填;对于channel/a的请求,其channel参数无效

示例

获取活跃留存用户数报表

请求

https://openapi.baidu.com/rest/2.0/mtj/svc/app/getDataByKey?access_token=[ACCESS_TOKEN]&key=[APP_KEY]&method=channel/a&start-date=20170101000000&end-date=20170101232359&metrics=new_user_count_channel,brand_new_user_count_channel,session_count_channel,user_count_channel,average_session_time_channel

响应

{
    "status": 0,
    "msg": "",
    "data": {
        "offset": 0,
        "timeSpan": [
            "2017/11/02 - 2017/11/08"
        ],
        "fields": [
            "channel_title",
            "new_user_count_channel",
            "brand_new_user_count_channel",
            "session_count_channel",
            "user_count_channel",
            "average_session_time_channel"
        ],
        "total": 4929,
        "sum": [
            [
                "--",
                "--",
                "--",
                "--",
                "--"
            ],
            []
        ],
        "pageSum": [],
        "items": [
            [
                [
                    {
                        "channelId": "0",
                        "channelName": "未知",
                        "channelOriginalName": "未知"
                    }
                ],
                [
                    {
                        "channelId": "3760840152507167029",
                        "channelName": "1014517c",
                        "channelOriginalName": "1014517c"
                    }
                ],
                [
                    {
                        "channelId": "3544385895416215857",
                        "channelName": "1001190c",
                        "channelOriginalName": "1001190c"
                    }
                ],
                [
                    {
                        "channelId": "3544385895449964599",
                        "channelName": "1001703e",
                        "channelOriginalName": "1001703e"
                    }
                ],
                [
                    {
                        "channelId": "3760840152473350454",
                        "channelName": "1014613a",
                        "channelOriginalName": "1014613a"
                    }
                ],
                [
                    {
                        "channelId": "3472328301344928056",
                        "channelName": "1000813a",
                        "channelOriginalName": "1000813a"
                    }
                ],
                [
                    {
                        "channelId": "3688782558469305144",
                        "channelName": "1013838c",
                        "channelOriginalName": "1013838c"
                    }
                ],
                [
                    {
                        "channelId": "3832616271702407221",
                        "channelName": "1005584k",
                        "channelOriginalName": "1005584k"
                    }
                ],
                [
                    {
                        "channelId": "4048789053883101750",
                        "channelName": "1008621o",
                        "channelOriginalName": "1008621o"
                    }
                ],
                [
                    {
                        "channelId": "4121128122696742456",
                        "channelName": "1019866c",
                        "channelOriginalName": "1019866c"
                    }
                ],
                [
                    {
                        "channelId": "3688782558586548535",
                        "channelName": "1013715j",
                        "channelOriginalName": "1013715j"
                    }
                ],
                [
                    {
                        "channelId": "3544385895668332593",
                        "channelName": "1001187r",
                        "channelOriginalName": "1001187r"
                    }
                ],
                [
                    {
                        "channelId": "3616443489421046576",
                        "channelName": "1002037a",
                        "channelOriginalName": "1002037a"
                    }
                ],
                [
                    {
                        "channelId": "3544385895684714809",
                        "channelName": "1001911s",
                        "channelOriginalName": "1001911s"
                    }
                ],
                [
                    {
                        "channelId": "3472328301412430901",
                        "channelName": "1000549e",
                        "channelOriginalName": "1000549e"
                    }
                ],
                [
                    {
                        "channelId": "4121128122764046649",
                        "channelName": "1019919g",
                        "channelOriginalName": "1019919g"
                    }
                ],
                [
                    {
                        "channelId": "3472331625649483824",
                        "channelName": "7300001a",
                        "channelOriginalName": "7300001a"
                    }
                ],
                [
                    {
                        "channelId": "3760840152507102006",
                        "channelName": "1014636c",
                        "channelOriginalName": "1014636c"
                    }
                ],
                [
                    {
                        "channelId": "3544667370628395314",
                        "channelName": "1011219q",
                        "channelOriginalName": "1011219q"
                    }
                ],
                [
                    {
                        "channelId": "3472328301445723957",
                        "channelName": "1000575g",
                        "channelOriginalName": "1000575g"
                    }
                ]
            ],
            [
                [
                    1949978,
                    1106446,
                    147418202,
                    11733805,
                    431
                ],
                [
                    1134808,
                    902017,
                    483053345,
                    23385672,
                    468
                ],
                [
                    1088982,
                    962801,
                    396880080,
                    23018203,
                    492
                ],
                [
                    806754,
                    704276,
                    377068535,
                    23341185,
                    486
                ],
                [
                    437432,
                    354576,
                    131962955,
                    7613394,
                    532
                ],
                [
                    427706,
                    163273,
                    518722430,
                    18862837,
                    546
                ],
                [
                    335137,
                    49583,
                    113120110,
                    4349517,
                    503
                ],
                [
                    317241,
                    158743,
                    59104997,
                    3406924,
                    475
                ],
                [
                    262066,
                    170328,
                    16858931,
                    1204850,
                    473
                ],
                [
                    231638,
                    157078,
                    5120643,
                    549916,
                    427
                ],
                [
                    219537,
                    163285,
                    34209254,
                    2678207,
                    287
                ],
                [
                    183010,
                    116534,
                    9525835,
                    1026436,
                    371
                ],
                [
                    171443,
                    91364,
                    42868358,
                    2156976,
                    496
                ],
                [
                    168923,
                    131490,
                    65903924,
                    3600865,
                    558
                ],
                [
                    157526,
                    100436,
                    30923638,
                    2065781,
                    522
                ],
                [
                    115639,
                    81609,
                    4651194,
                    389945,
                    433
                ],
                [
                    114432,
                    75919,
                    9664902,
                    800368,
                    418
                ],
                [
                    108397,
                    49902,
                    55884375,
                    2734584,
                    532
                ],
                [
                    105540,
                    49343,
                    15349286,
                    740647,
                    507
                ],
                [
                    102606,
                    49536,
                    27002912,
                    1354335,
                    488
                ]
            ],
            [],
            []
        ]
    }
}