Skip to content

Events and tags statistics

These methods return usage statistics for events and tags. Use /getEventStatistics to count how many times an event was triggered in a period and /getTagStats to get statistics for a single tag.

getEventStatistics

Anchor link to

Retrieves the number of times an event was triggered during a specified period.

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

Request body parameters
Anchor link to
Name
RequiredTypeDescription
authYesstringAPI access token from Pushwoosh Control Panel.
applicationYesstringPushwoosh application code
eventYesstringEvent name, exactly as created in Pushwoosh Control Panel.
date_fromYesstringStart of the period to retrieve statistics for.
date_toYesstringEnd of the period to retrieve statistics for.
attributesNoarrayAn array of event attributes for filtering results.
Example request
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"]
}]
}
}
Example response
Anchor link to
{
"status_code": 200,
"status_message": "OK",
"response": {
"request_id": "DC1_bc63f00c736696d75cea17aa6855ba19"
}
}

Retrieving scheduled request results

Anchor link to
Request body parameters
Anchor link to
FieldTypeDescription
request_idstringScheduled request ID. Use /getResults to retrieve results.
Scheduled (/getResults) response
{
"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

Retrieves statistics for a specific tag.

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

Request body parameters
Anchor link to
Name
RequiredTypeDescription
authYesstringAPI access token from Pushwoosh Control Panel.
tagYesstringTag name, exactly as in Pushwoosh Control Panel.
applicationsNoarrayList of applications. Sets the scope of the statistics. With applications, you get counts per application. Without it, you get one summary for the whole account.
Example request
Anchor link to
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H",
"tag": "TAG_NAME",
"applications": [
"APPLICATION_1",
"APPLICATION_2",
"APPLICATION_3"
]
}
}

Retrieving scheduled request results

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

Example CSV content

Anchor link to

With applications, each row is application code;tag value;count, grouped by application:

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

Without applications, each row is tag value;count for the whole account, one row per value, sorted by value:

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