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

สถิติ Events และ Tags

getEventStatistics

Anchor link to

ดึงจำนวนครั้งที่ event ถูก trigger ในช่วงเวลาที่กำหนด

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

พารามิเตอร์ใน Request body
Anchor link to
ชื่อ
จำเป็นประเภทคำอธิบาย
authใช่stringAPI access token จาก Pushwoosh Control Panel
applicationใช่stringPushwoosh application code
eventใช่stringชื่อ Event ตามที่สร้างไว้ใน Pushwoosh Control Panel
date_fromใช่stringจุดเริ่มต้นของช่วงเวลาที่จะดึงสถิติ
date_toใช่stringจุดสิ้นสุดของช่วงเวลาที่จะดึงสถิติ
attributesไม่arrayอาร์เรย์ของ attributes ของ event สำหรับกรองผลลัพธ์
ตัวอย่าง request
Anchor link to
{
"request": {
"auth":"yxoPUlwqm…………pIyEX4H", // จำเป็น API access token จาก Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // จำเป็น Pushwoosh application code
"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"
}
}

การดึงผลลัพธ์ของ scheduled request

Anchor link to
พารามิเตอร์ใน Request body
Anchor link to
ฟิลด์ประเภทคำอธิบาย
request_idstringID ของ Scheduled 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://api.pushwoosh.com/json/1.3/getTagStats

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

การดึงผลลัพธ์ของ scheduled 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