ข้ามไปยังเนื้อหา

สถิติแคมเปญ

getCampaignStats

Anchor link to

ดึงข้อมูลสถิติของแคมเปญเฉพาะสำหรับช่วงเวลาที่กำหนด

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

พารามิเตอร์ Request body
Anchor link to
ชื่อ
จำเป็นประเภทคำอธิบาย
authใช่stringAPI access token จาก Pushwoosh Control Panel
campaignใช่stringรหัสแคมเปญ ที่ไม่ซ้ำกัน
datefromใช่stringจุดเริ่มต้นของช่วงเวลาการรายงาน (รูปแบบ Y-m-d H:i:s)
datetoใช่stringจุดสิ้นสุดของช่วงเวลาการรายงาน (รูปแบบ Y-m-d H:i:s)
ตัวอย่างคำขอ
Anchor link to
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // จำเป็น API access token จาก Pushwoosh Control Panel
"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 (หากอนุญาตให้ติดตามเป้าหมาย)
"conversion": {
"send": 10,
"open": 5,
"events": [{
"uid": 1,
"event": "event name",
"hits": 5,
"conversion": "100%",
"revenue": 15.34
}]
}
}
}