💰Ad Revenue Reports API

Track your revenue from our products over an easy-to-use API.

This API lets you access detailed reports for each of your Property IDs. If you have multiple Property IDs with us, you will have to make individual requests to get revenue reports on each Property.

We are working on a new version of the Ad Revenue Reports API which will allow you to query data against your . Keep an eye out for updates to this doc.

Making the request

Ad Revenue Reports API

POST https://arnab.gamezop.com/revenue/v2/reports

Gets Ad Revenue data for any Property ID against a given configuration.

Headers

Name
Type
Description

id*

String

The Property ID for which you are querying data

auth_token*

String

.

Content-Type

String

application/json

Request Body

Name
Type
Description

start_date*

String

The date from which you want the revenue reports in YYYY-MM-DD (stats for this date will be included in the report)

end_date*

String

The date till which you want the revenue reports in YYYY-MM-DD (stats for this date will be included in the report)

report_config*

String

Stringified JSON containing the metrics and dimensions you want in the report. This is explained below.

The report_config value

Dimensions are same as breakdowns for your report. For example, if you want to see earnings broken down by date, you will use the date dimension. If you want to see a breakdown by combination of date and country, you will use both of those dimensions. Here are all the supported dimensions:

Dimension key
Description

ad_unit

Breakdown of revenue by the different types of ad units we serve on page

country

Breakdown of revenue by country

date

Breakdown of revenue by date

key_values

Only relevant for Publishers using CAAP

You have to send true for the dimensions you want to filter by, and false for the others.

Metrics are the values in your report. Here are the supported metrics:

Metric key
Description

total_impressions

Count of ad impressions served

total_average_ecpm_usd

Average eCPM (earnings for every 1,000 impressions served) Note: We classify certain revenue with the ad unit type "Additional". We do not consider this while calculating eCPM.

total_clicks

Count of clicks on the ads shown to users

total_average_ctr

Click-through rate (% of impressions which received a click)

total_revenue_usd

Total revenue made (in USD) - this includes our share of revenue as well

partner_revenue_usd

Your share of the revenue made (in USD)

Here is a sample request body for the Ad Revenue Reports API:

{
    "start_date": "2023-12-01",
    "end_date": "2023-12-01",
    "report_config": "{\"dimensions\":{\"ad_unit\":false,\"country\":false,\"date\":true,\"key_values\":false},\"metrics\":{\"total_impressions\":true,\"total_average_ecpm_usd\":true,\"total_clicks\":true,\"total_average_ctr\":false,\"total_revenue_usd\":true,\"partner_revenue_usd\":true}}"
}

Note that report_config is a stringified JSON value.

Response structure

The API provides a JSON reponse with an array of report objects. Each report object will contain the metrics that you requested for, broken down by the dimensions you included in your request. Here is a sample response:

{
    "report": [
        {
            "ad_unit": "Gamezop_336x280(21688255353)",
            "country": "India",
            "date": "2018-07-17",
            "partner_revenue_usd": 4.98,
            "total_average_ecpm_usd": 0.42,
            "total_clicks": "587",
            "total_impressions": "23947",
            "total_revenue_usd": 9.96,
        },
        {
            "ad_unit": "Gamezop_PR(21617086529)",
            "country": "India",
            "date": "2018-07-17",
            "partner_revenue_usd": 4.33,
            "total_average_ecpm_usd": 1.7,
            "total_clicks": "625",
            "total_impressions": "5095",
            "total_revenue_usd": 8.67,
        }
    ]
}

Other notes

  • Only use the key_values dimension if you are using CAAP tracking

  • Average response times on this API can be high (>30 seconds in some cases)

  • The best way to use this API is to hit it once everyday, for the previous day's report. Requesting data for long periods of time may be more time-consuming.

  • If you are fetching the current day's report, note that there may be intra-day fluctuations in the revenue values owing to exchange rate fluctuations

Last updated