Ad revenue API

We created a special Ad revenue API endpoint to allow our customers to send information about revenue earned by ads displayed in their apps.

Do not apply this API if you use ad networks that utilize the server-server protocol for sending ad revenue data (ironSource, AppLovin MAX, and Fyber networks) and you already set up this method of data collection because if you use both data sources, your revenue data may be duplicated.

You need your project's API Key which can be obtained by going to 'Settings -> SDK -> Integration' section in the Application menu.

Path:

https://api.devtodev.com/track/impression/?apikey={API_KEY}

List of fields

NameRequiredTypeDescription

timestamp

true

Long

Ad display date, Unix timestamp in milliseconds

ad_network

true

String

Name of the ad network serving the impression

placement

false

String

Banner ad placement

ad_unit

false

String

Banner ad name

advertisingid

if devtodevid is missing

String

User Advertising ID

devtodevid

if advertisingid is missing

Long

User devtodev id if known

country

false

String

Country code, (ISO 3166 alpha 2)

revenue

true

Double

Reward for displaying the banner ad (in USD). The amount is shown for all impressions specified in the impressions field

impressions

false

Long

Number of impressions (for pre-aggregated data)

Example:

{
    "timestamp": 1237651332,
    "ad_network": "Facebook",
    "placement": "End of the round",
    "ad_unit": "TestAdUnit",
    "revenue": 0.3434,
    "impressions": 1,
    "advertisingid": "abcdef12-1234-1234-1234-12345678abcd",
    "counrty":"US"
}jso

Valid query options:

  1. POST:

POST https://api.devtodev.com/track/impression/?apikey={devtodev_api_key}  
{
    "timestamp": 1237651332,
    "ad_network": "Facebook",
    "placement": "End of the round",
    "ad_unit": "TestAdUnit",
    "revenue": 0.3434,
    "advertisingid": "abcdef12-1234-1234-1234-12345678abcd",
    "devtodevid": "123456"
}

2. POST:

POST https://api.devtodev.com/track/impression/?apikey={devtodev_api_key}  
[{
    "timestamp": 1237651332,
    "ad_network": "Facebook",
    "placement": "End of the round",
    "ad_unit": "TestAdUnit",
    "revenue": 0.3434,
    "advertisingid": "abcdef12-1234-1234-1234-12345678abcd"
},
{  
  ...
},
...
]

Last updated