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

สถิติแคมเปญ

getCampaignStats

Anchor link to

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

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

พารามิเตอร์ของคำขอ
Anchor link to
ชื่อจำเป็นประเภทคำอธิบาย
authใช่stringโทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
campaignใช่stringID แคมเปญที่ไม่ซ้ำกัน
datefromใช่stringจุดเริ่มต้นของระยะเวลารายงาน (รูปแบบ Y-m-d H:i:s)
datetoใช่stringจุดสิ้นสุดของระยะเวลารายงาน (รูปแบบ Y-m-d H:i:s)
ตัวอย่างคำขอ
Anchor link to
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // จำเป็น โทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
"campaign": "XXXXX-XXXXX", // จำเป็น ID แคมเปญ
"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
}]
}
}
}