Best Practices & Examples
Best Practices & Tips
- Use the /interval endpoint to avoid querying missing data
- Cache /games and /dimensions calls to reduce load
- Normalize timestamps to UTC
- Pair with Organization API to programmatically manage games or users
- Combine with tools like Postman or Python scripts for automation
Examples
Group Query
Top 3 countries by ARPPU on July 1st, 2025
Request:
{
"interval": "2025-07-01/P1D",
"granularity": "day",
"query": {
"type": "group",
"dimension": "country_code",
"limit": 3
}
}
Response:
{
"result": [
{
"result": [
{
"arppu": 896.64,
"country_code": "GB",
"paying_users": 1,
"total_revenue": 89664
},
{
"arppu": 4.16,
"country_code": "US",
"paying_users": 1,
"total_revenue": 416
},
{
"arppu": 2.99,
"country_code": "CN",
"paying_users": 2,
"total_revenue": 598
}
],
"timestamp": "2025-07-01T00:00:00.000Z"
}
]
}
Split Query
ARPPU split by country and platform on July 1st, 2025
Request:
{
"interval": "2025-07-01/P1D",
"granularity": "day",
"query": {
"type": "split",
"dimensions": ["country_code", "platform"]
}
}
Response:
{
"result": [
{
"event": {
"arppu": 16273.37,
"country_code": "US",
"platform": "android",
"paying_users": 2,
"total_revenue": 3254674
},
"timestamp": "2025-07-01T00:00:00.000Z"
},
{
"event": {
"arppu": 1302.86,
"country_code": "US",
"platform": "ios",
"paying_users": 5,
"total_revenue": 651430
},
"timestamp": "2025-07-01T00:00:00.000Z"
}
// ...
]
}
Time Series Query
ARPPU over 3 days from July 1st, 2025
Request:
{
"interval": "2025-07-01/P3D",
"granularity": "day",
"query": {
"type": "timeseries"
}
}
Response:
{
"result": [
{
"result": {
"arppu": 16.47,
"paying_users": 3555,
"total_revenue": 5856147
},
"timestamp": "2025-07-01T00:00:00.000Z"
},
{
"result": {
"arppu": 7.30,
"paying_users": 3660,
"total_revenue": 2671878
},
"timestamp": "2025-07-02T00:00:00.000Z"
}
// ...
]
}