Zum Inhalt springen

Ereignis- und Tag-Statistiken

Diese Methoden geben Nutzungsstatistiken für Ereignisse und Tags zurück. Verwenden Sie /getEventStatistics, um zu zählen, wie oft ein Ereignis in einem Zeitraum ausgelöst wurde, und /getTagStats, um Statistiken für einen einzelnen Tag abzurufen.

getEventStatistics

Anchor link to

Ruft die Anzahl der Auslösungen eines Ereignisses während eines bestimmten Zeitraums ab.

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

Parameter des Anfrage-Body
Anchor link to
Name
ErforderlichTypBeschreibung
authJastringAPI-Zugriffstoken aus dem Pushwoosh Control Panel.
applicationJastringPushwoosh-Anwendungscode
eventJastringEreignisname, exakt wie im Pushwoosh Control Panel erstellt.
date_fromJastringBeginn des Zeitraums, für den Statistiken abgerufen werden sollen.
date_toJastringEnde des Zeitraums, für den Statistiken abgerufen werden sollen.
attributesNeinarrayEin Array von Ereignisattributen zum Filtern der Ergebnisse.
Beispielanfrage
Anchor link to
{
"request": {
"auth":"yxoPUlwqm…………pIyEX4H", // required. API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // required. Pushwoosh application code
"event": "Event name", // required. The name of Event exactly as created in Pushwoosh Control Panel
"date_from": "2024-09-12", // required. Start of the reporting period
"date_to": "2024-09-12", // required. End of the reporting period
"attributes": [{ // optional.
"name": "attributeName",
"operator": "EQ",
"values": ["val"]
}]
}
}
Beispielantwort
Anchor link to
{
"status_code": 200,
"status_message": "OK",
"response": {
"request_id": "DC1_bc63f00c736696d75cea17aa6855ba19"
}
}

Abrufen geplanter Anfrageergebnisse

Anchor link to
Parameter des Anfrage-Body
Anchor link to
FeldTypBeschreibung
request_idstringID der geplanten Anfrage. Verwenden Sie /getResults, um die Ergebnisse abzurufen.
Antwort der geplanten Anfrage (/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

Ruft Statistiken für einen bestimmten Tag ab.

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

Parameter des Anfrage-Body
Anchor link to
Name
ErforderlichTypBeschreibung
authJastringAPI-Zugriffstoken aus dem Pushwoosh Control Panel.
tagJastringTag-Name, exakt wie im Pushwoosh Control Panel.
applicationsNeinarrayListe der Anwendungen. Legt den Umfang der Statistik fest. Mit applications erhalten Sie Zählungen pro Anwendung. Ohne diesen Parameter erhalten Sie eine Zusammenfassung für das gesamte Konto.
Beispielanfrage
Anchor link to
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H",
"tag": "TAG_NAME",
"applications": [
"APPLICATION_1",
"APPLICATION_2",
"APPLICATION_3"
]
}
}

Abrufen geplanter Anfrageergebnisse

Anchor link to
/getResults-Antwort
Anchor link to
{
"status_code": 200,
"status_message": "OK",
"response": {
"fileName": "DIRECT_FILE_URL.csv"
}
}

Beispielhafter CSV-Inhalt

Anchor link to

Mit applications hat jede Zeile das Format application code;tag value;count, gruppiert nach Anwendung:

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

Ohne applications hat jede Zeile das Format tag value;count für das gesamte Konto, eine Zeile pro Wert, sortiert nach Wert:

ua_settingpushbod;5
ua_settingpushhealth;4
ua_settingpushstrength;3
ua_settingpushupdate;2