Statistics

Retrieve the statistics of your applications

Get statistics

GET https://api.ogury.io/reporting/v1/stats

This endpoint allows you to get your statistics.

Query Parameters

Headers

{
    "info": "Additionals information available here",
    "fromDate": "2020-09-30",
    "toDate": "2020-10-02",
    "applications": [
        12345,
        23456,
        34567
    ],
    "applicationInfos": [
        {
            "apiKey": 12345,
            "platform": "ANDROID"
        },
        {
            "apiKey": 23456,
            "platform": "iOS"
        },
        {
            "apiKey": 34567,
            "platform": "ANDROID"
        }
    ],
    "aggregationDescription": "day,ad_unit_id",
    "aggregation": {
        "2020-09-30": {
            "aggregation": {
                "12345_default": {
                    "stats": {
                        "impressions": 2488036,
                        "revenue": 28938.08,
                        "requests": 3510954,
                        "ecpm": 11.63
                    }
                },
                "23456_default": {
                    "stats": {
                        "impressions": 1306279,
                        "revenue": 14882.52,
                        "requests": 2092813,
                        "ecpm": 11.39
                    }
                }
            }
        },
        "2020-10-01": {
            "aggregation": {
                "12345_default": {
                    "stats": {
                        "impressions": 1355770,
                        "revenue": 13314.8,
                        "requests": 3648636,
                        "ecpm": 9.82
                    }
                },
                "23456_default": {
                    "stats": {
                        "impressions": 697663,
                        "revenue": 6632.94,
                        "requests": 1843377,
                        "ecpm": 9.51
                    }
                }
            }
        },
        "2020-10-02": {
            "aggregation": {
                "12345_default": {
                    "stats": {
                        "impressions": 336664,
                        "revenue": 3848.27,
                        "requests": 3942938,
                        "ecpm": 11.43
                    }
                },
                "23456_default": {
                    "stats": {
                        "impressions": 138516,
                        "revenue": 1596.62,
                        "requests": 1605168,
                        "ecpm": 11.53
                    }
                }
            }
        }
    }
}

Examples

Retrieve the statistics for the previous month to now

curl -H 'Content-Type: application/json' \
     -H 'x-auth-apikey: MY_API_KEY' \
     -H 'x-auth-secret: MY_API_SECRET' \
     'https://api.ogury.io/reporting/v1/stats?group_by=month'

Retrieve the statistics for a specific month

curl -H 'Content-Type: application/json' \
     -H 'x-auth-apikey: MY_API_KEY' \
     -H 'x-auth-secret: MY_API_SECRET' \
     'https://api.ogury.io/reporting/v1/stats?from_date=2020-09-01&to_date=2020-09-01&group_by=month'

For the group by month, the from_date is truncated to the beginning of the month and the to_date is set to the end of the month.

In this example, to_date is modified by 2020-09-30.

Retrieve the statistics by day, ad_unit_id, and country

curl -H 'Content-Type: application/json' \
     -H 'x-auth-apikey: MY_API_KEY' \
     -H 'x-auth-secret: MY_API_SECRET' \
     'https://api.ogury.io/reporting/v1/stats?from_date=2020-09-01&to_date=2020-09-30&group_by=day,ad_unit_id,country'

The application route gives you the details of your ad_unit.

If you want to re-group them by type, you can use the /applications to retrieve the details about the ad_unit and re-group them by application and ad_unit type.

Last updated