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

สถิติ Events และ Tags

getEventStatistics

Anchor link to

ดึงข้อมูลจำนวนครั้งที่ Event ถูกทริกเกอร์ในช่วงเวลาที่กำหนด

POST https://cp.pushwoosh.com/json/1.3/getEventStatistics

พารามิเตอร์ของ Request
Anchor link to
ชื่อ
จำเป็นประเภทคำอธิบาย
authใช่stringAPI access token จาก Pushwoosh Control Panel
applicationใช่stringรหัสแอปพลิเคชัน Pushwoosh
eventใช่stringชื่อ Event ตรงตามที่สร้างไว้ใน Pushwoosh Control Panel
date_fromใช่stringวันเริ่มต้นของช่วงเวลาที่ต้องการดึงข้อมูลสถิติ
date_toใช่stringวันสิ้นสุดของช่วงเวลาที่ต้องการดึงข้อมูลสถิติ
attributesไม่ใช่arrayอาร์เรย์ของ attribute ของ event สำหรับการกรองผลลัพธ์
ตัวอย่าง Request
Anchor link to
{
"request": {
"auth":"yxoPUlwqm…………pIyEX4H", // จำเป็น โทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // จำเป็น รหัสแอปพลิเคชัน Pushwoosh
"event": "Event name", // จำเป็น ชื่อของ Event ตรงตามที่สร้างไว้ใน Pushwoosh Control Panel
"date_from": "2024-09-12", // จำเป็น วันเริ่มต้นของระยะเวลารายงาน
"date_to": "2024-09-12", // จำเป็น วันสิ้นสุดของระยะเวลารายงาน
"attributes": [{ // ไม่จำเป็น
"name": "attributeName",
"operator": "EQ",
"values": ["val"]
}]
}
}
ตัวอย่าง Response
Anchor link to
{
"status_code": 200,
"status_message": "OK",
"response": {
"request_id": "DC1_bc63f00c736696d75cea17aa6855ba19"
}
}

การดึงผลลัพธ์ของ Request ที่กำหนดเวลาไว้

Anchor link to
พารามิเตอร์ของ Request
Anchor link to
ฟิลด์ประเภทคำอธิบาย
request_idstringID ของ Request ที่กำหนดเวลาไว้ ใช้ /getResults เพื่อดึงผลลัพธ์
Response ของ Scheduled (/getResults)
{
"status_code": 200,
"status_message": "OK",
"response": [{
"date": "2024-09-12 00:00",
"count": 12
}, {
"date": "2024-09-12 01:00",
"count": 2
}, {
"date": "2024-09-12 02:00",
"count": 4
}, {
"date": "2024-09-12 03:00",
"count": 8
}, {
"date": "2024-09-12 04:00",
"count": 9
}, {
"date": "2024-09-12 05:00",
"count": 2
}, {
"date": "2024-09-12 06:00",
"count": 0
}, {
"date": "2024-09-12 07:00",
"count": 0
}, {
"date": "2024-09-12 08:00",
"count": 0
}, {
"date": "2024-09-12 09:00",
"count": 0
}, {
"date": "2024-09-12 10:00",
"count": 0
}, {
"date": "2024-09-12 11:00",
"count": 0
}, {
"date": "2024-09-12 12:00",
"count": 0
}, {
"date": "2024-09-12 13:00",
"count": 0
}, {
"date": "2024-09-12 14:00",
"count": 0
}, {
"date": "2024-09-12 15:00",
"count": 0
}, {
"date": "2024-09-12 16:00",
"count": 0
}, {
"date": "2024-09-12 17:00",
"count": 0
}, {
"date": "2024-09-12 18:00",
"count": 0
}, {
"date": "2024-09-12 19:00",
"count": 0
}, {
"date": "2024-09-12 20:00",
"count": 0
}, {
"date": "2024-09-12 21:00",
"count": 0
}, {
"date": "2024-09-12 22:00",
"count": 0
}, {
"date": "2024-09-12 23:00",
"count": 0
}]
}

getTagStats

Anchor link to

ดึงข้อมูลสถิติสำหรับ Tag ที่ระบุ

POST https://go.pushwoosh.com/json/1.3/getTagStats

พารามิเตอร์ของ Request
Anchor link to
ชื่อ
จำเป็นประเภทคำอธิบาย
authใช่stringAPI access token จาก Pushwoosh Control Panel
tagใช่stringชื่อ Tag ตรงตามที่อยู่ใน Pushwoosh Control Panel
applicationsไม่ใช่arrayรายการแอปพลิเคชัน ระบุเฉพาะในกรณีที่ Tag เป็นแบบเฉพาะแอปพลิเคชันเท่านั้น
ตัวอย่าง Request
Anchor link to
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H",
"tag": "TAG_NAME",
"applications": [
"APPLICATION_1",
"APPLICATION_2",
"APPLICATION_3"
]
}
}

การดึงผลลัพธ์ของ Request ที่กำหนดเวลาไว้

Anchor link to
Response ของ /getResults
Anchor link to
{
"status_code": 200,
"status_message": "OK",
"response": {
"fileName": "DIRECT_FILE_URL.csv"
}
}

ตัวอย่างเนื้อหาไฟล์ CSV

Anchor link to
13C2B-72C62;ua_settingpushbod;3
13C2B-72C62;ua_settingpushhealth;3
13C2B-72C62;ua_settingpushstrength;3
13C2B-72C62;ua_settingpushupdate;2