สถิติแคมเปญ
getCampaignStats
Anchor link toดึงข้อมูลสถิติของแคมเปญเฉพาะสำหรับช่วงเวลาที่กำหนด
POST
https://api.pushwoosh.com/json/1.3/getCampaignStats
พารามิเตอร์ของคำขอ
Anchor link toชื่อ | จำเป็น | ประเภท | คำอธิบาย |
---|---|---|---|
auth | ใช่ | string | โทเค็นการเข้าถึง API จาก Pushwoosh Control Panel |
campaign | ใช่ | string | ID แคมเปญที่ไม่ซ้ำกัน |
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 }] } }}