跳到内容

营销活动统计

getCampaignStats

Anchor link to

检索特定营销活动在指定时间段内的统计数据。

POST https://api.pushwoosh.com/json/1.3/getCampaignStats

请求正文参数
Anchor link to
名称
必需类型描述
auth是字符串来自 Pushwoosh Control Panel 的 API access token。
campaign是字符串唯一的营销活动代码。
datefrom是字符串报告期的开始时间(格式为 Y-m-d H:i:s)。
dateto是字符串报告期的结束时间(格式为 Y-m-d H:i:s)。
请求示例
Anchor link to
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // 必需。来自 Pushwoosh Control Panel 的 API access token
"campaign": "XXXXX-XXXXX", // 必需。营销活动代码
"datefrom": "2024-05-01 00:00:00", // 必需。报告期的开始时间
"dateto": "2024-05-10 23:59:59" // 必需。报告期的结束时间
}
}
响应示例
Anchor link to
{
"status_code": 200,
"status_message": "OK",
"response": {
"request_id": "a3ef436445abfdef6255cc2f65ce7614"
}
}

检索计划请求的结果

Anchor link to
getResults 响应示例
{
"status_code": 200,
"status_message": "OK",
"response": {
"formatter": "hourly",
"rows": [{
"count": 0,
"action": "open",
"datetime": "2024-05-09 00:00:00",
"platformid": 14
}, {
"count": 0,
"action": "send",
"datetime": "2024-05-09 00:00:00",
"platformid": 14
}, {
"count": 0,
"action": "send",
"datetime": "2024-05-11 00:00:00",
"platformid": 14
}],
// 转化(如果允许目标跟踪)
"conversion": {
"send": 10,
"open": 5,
"events": [{
"uid": 1,
"event": "event name",
"hits": 5,
"conversion": "100%",
"revenue": 15.34
}]
}
}
}