Ad Revenue
Returns Ad Revenue data for a specific date range.
Request format
GET https://api.appmetrica.yandex.ru/logs/v1/export/ad_revenue_events.{csv | json}
? application_id=<int>
& date_since=<string>
& date_until=<string>
& fields=<string>
& [date_dimension=<string>]
& [limit=<string>]
& [use_utf8_bom=<bool>]
& [<any field name>=<string>]
|
Filtering by the app's numeric ID in AppMetrica |
|
Start of the date range in |
|
End of the date range in |
|
A comma-separated list of fields for the sample. A list that contains all available fields (for quick copy):
|
|
This parameter defines the point to calculate the date range from:
|
|
Limit on the number of items in the list. Takes the maximum value by default. There is no guarantee that results will match from request to request (there may be differences in results sorting). |
|
Parameter that enables the use of byte order mark. The default value is |
|
Filtering by the value of one of the available fields. Only the equality check operation is supported. |
Response format
If all available fields are requested:
{
"data": [
{
"ad_revenue_type": "string",
"ad_revenue": "string",
"ad_revenue_currency": "string",
"ad_revenue_data_source": "string",
"ad_revenue_network": "string",
"ad_revenue_placement_id": "string",
"ad_revenue_placement_name": "string",
"ad_revenue_unit_id": "string",
"ad_revenue_unit_name": "string",
"ad_revenue_precision": "string",
"ad_revenue_payload": "string",
"ad_revenue_datetime": "string",
"ad_revenue_receive_datetime": "string",
"ad_revenue_receive_timestamp": "integer",
"ad_revenue_timestamp": "integer",
"session_id": "integer",
"installation_id": "string",
"android_id": "string",
"appmetrica_device_id": "integer",
"appmetrica_sdk_version": "integer",
"city": "string",
"connection_type": "string",
"country_iso_code": "string",
"device_ipv6": "string",
"device_locale": "string",
"device_manufacturer": "string",
"device_model": "string",
"google_aid": "string",
"ios_ifa": "string",
"ios_ifv": "string",
"mcc": "integer",
"mnc": "integer",
"operator_name": "string",
"original_device_model": "string",
"os_version": "string",
"profile_id": "string",
"windows_aid": "string",
"app_build_number": "integer",
"app_package_name": "string",
"app_version_name": "string"
},
...
]
}
application_id,ios_ifa,os_name,...
1111,024AE7EB-4128-4237-9803-D24950323D4D,ios,...
1111,3A86D5E8-1985-4A23-B147-5A1C0CF8781E,ios,...
1111,,android
...
|
Date and time of the event in |
|
Time of the event in Unix time format. With the Post API, you can upload events only if the difference between the event date (event_timestamp) and the upload date is no more than seven days. The API expects a value in seconds. |
|
Date and time the event was received on the server side. May differ from |
|
Time when the event was received on the server side in Unix time format. May differ from |
|
Ad Revenue amount. |
|
Ad Revenue currency. |
|
Ad Revenue type. Possible values:
|
|
Flag indicating that Ad Revenue was automatically collected. Possible values:
|
|
Advertising network. |
|
Ad placement ID |
|
Ad placement name. |
|
Ad unit ID. |
|
Ad unit name. |
|
Accuracy of the Ad Revenue amount (as passed to the SDK). For example, "publisher_defined" or "estimated". |
|
Additional data serialized into JSON. |
|
Session ID. The set of values |
|
Installation ID. |
|
Android device ID. |
|
A unique device identifier detected by the AppMetrica service. In Android from AppSetId, in iOS from IFV. |
|
Version of the AppMetrica SDK. |
|
The name of the city where the click was made (in English). |
|
Type of connection. Possible values: |
|
ISO country code. |
|
The IP address at the time of the event in IPv6 format. For example, 2a02:6b8::40c:6676:baff:fea6:53d8, ::ffff:5.255.232.147. |
|
The language on the device. |
|
The device manufacturer detected by the AppMetrica service (for example, Apple or Samsung). |
|
The device model detected by the AppMetrica service (for example, Galaxy S6). |
|
The device's Google AID in the format received from the device. |
|
The device's IFA in the format received from the device. |
|
IFV for the app in the format received from the device. |
|
Mobile country code. |
|
Mobile network code. |
|
Name of the mobile operator. |
|
Factory model of the device (for example, the following values are possible for Galaxy S8: SM-G9550, SM-G9558, and so on). |
|
The version of the operating system on the user's device. |
|
User profile ID. |
|
The device's Windows AID in the format received from the device. |
|
App build number. |
|
The package name for Android, or the Bundle ID for iOS (for example, ru.yandex.metro). |
|
The app version in the format specified by the developer. |
Example
Request:
curl -X GET \
'https://api.appmetrica.yandex.ru/logs/v1/export/ad_revenue_events.json?application_id=1111&date_since=2018-10-10&date_until=2018-10-11&fields=ad_revenue_datetime,ad_revenue_timestamp,ad_revenue_receive_datetime,ad_revenue_receive_timestamp,ad_revenue,ad_revenue_currency,ad_revenue_type,ad_revenue_data_source,ad_revenue_network,ad_revenue_placement_id,ad_revenue_placement_name,ad_revenue_unit_id,ad_revenue_unit_name,ad_revenue_precision,ad_revenue_payload,session_id,installation_id,android_id,appmetrica_device_id,appmetrica_sdk_version,city,connection_type,country_iso_code,device_ipv6,device_locale,device_manufacturer,device_model,device_type,google_aid,ios_ifa,ios_ifv,mcc,mnc,operator_name,original_device_model,os_version,profile_id,windows_aid,app_build_number,app_package_name,app_version_name' \
-H 'Authorization: OAuth oauth_token'
Response:
{
"data": [
{
"ad_revenue_type": "banner",
"ad_revenue": "299",
"ad_revenue_currency": "RUB",
"ad_revenue_data_source": "manual",
"ad_revenue_network": "network__example",
"ad_revenue_placement_id": "ad_revenue_placement_id__example",
"ad_revenue_placement_name": "ad_revenue_placement_name__example",
"ad_revenue_unit_id": "ad_revenue_unit_id__example",
"ad_revenue_unit_name": "ad_revenue_unit_name__example",
"ad_revenue_precision": "estimated",
"ad_revenue_payload": "{\"example_key1\":\"example_value1\", \"example_key2\":\"example_value2\"}",
"ad_revenue_datetime": "yyyy-mm-dd hh:mm:ss",
"ad_revenue_receive_datetime": "yyyy-mm-dd hh:mm:ss",
"ad_revenue_receive_timestamp": "1556258667",
"ad_revenue_timestamp": "1556258660",
"session_id": "10000000049",
"installation_id": "installation_id__example",
"android_id": "android_id__example",
"appmetrica_device_id": "123456789012345678",
"appmetrica_sdk_version": "3001000",
"city": "Moscow",
"connection_type": "wifi",
"country_iso_code": "RU",
"device_ipv6": "::ffff:5.255.232.147",
"device_locale": "ru_RU",
"device_manufacturer": "Apple",
"device_model": "iPhone X",
"google_aid": "google_aid__example",
"ios_ifa": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ios_ifv": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"mcc": "250",
"mnc": "1",
"operator_name": "MTS RUS",
"original_device_model": "iPhone10,3",
"os_version": "12.2",
"profile_id": "test",
"windows_aid": "windows_aid__example",
"app_build_number": "1",
"app_package_name": "ru.yandex.metro",
"app_version_name": "1.0"
}
]
}
If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.