Атрибуция Дохода От Рекламы
Последняя версия в PDF: Ad Revenue Attribution Docs.pdf (For May 23rd, 2019)
Общая информация
Некоторые пользователи Appodeal имеют возможность использовать Ad Revenue Attribution API. Чтобы воспользоваться им, нужно подать заявку и Appodeal рассмотрит возможность включения этого API.
Файлы логов формируются автоматически и сохраняются на протяжении 7 дней.
После включения пользователь может скачать файлы используя наше API
Начать работу с API очень просто. Вам нужно получить ваш API key и user id на странице https://app.appodeal.com/profile/api_credentials и использовать их в каждом запросе к API.
Существует только одна конечная точка, которую можно использовать для получения списка доступных файлов.
Пример запроса:
https://api-services.appodeal.com/api/v2/get_log_urls?api_key={your api key}&user_id={your user id}
Выдаст такой результат (если файлы существуют):
{
log_files: [
"https://appodeal-ad-rev-attribution.s3.amazonaws.com/for_{your user id}/2017_10_04_clicks_116bc9d7e45906241a6a4.csv",
"https://appodeal-ad-rev-attribution.s3.amazonaws.com/for_{your user id}/2017_10_04_impressions_f7d8ec46adbef8442469e.csv",
"https://appodeal-ad-rev-attribution.s3.amazonaws.com/for_{your user id}/2017_10_05_clicks_fd310ab6ceac36a7f9edb.csv",
"https://appodeal-ad-rev-attribution.s3.amazonaws.com/for_{your user id}/2017_10_05_impressions_cf09dae6ba0d8efb64a26.csv",
"https://appodeal-ad-rev-attribution.s3.amazonaws.com/for_{your user id}/2017_10_06_clicks_f5de438b44378d6143118.csv",
"https://appodeal-ad-rev-attribution.s3.amazonaws.com/for_{your user id}/2017_10_06_impressions_3d939797c3bf301921e62.csv",
"https://appodeal-ad-rev-attribution.s3.amazonaws.com/for_{your user id}/2017_10_07_clicks_11135427a1befd9ce7583.csv",
"https://appodeal-ad-rev-attribution.s3.amazonaws.com/for_{your user id}/2017_10_07_impressions_66795a3cfef15031e7658.csv",
"https://appodeal-ad-rev-attribution.s3.amazonaws.com/for_{your user id}/2017_10_08_clicks_87dde4827d94498e306e1.csv",
"https://appodeal-ad-rev-attribution.s3.amazonaws.com/for_{your user id}/2017_10_08_impressions_4e22c7d6f974cb94a5ab1.csv"
],
status: 200,
message: "success"
}
URL формат:
https://appodeal-ad-rev-attribution.s3.amazonaws.com/for\_{your user id}/{log date with underscore}\_{clicks or impressions log}\_{dynamic unique hash}.csv
- {your user id} - id вашего пользователя
- {log date with underscore} - дата с разделителем символ подчеркивания
- {clicks or impressions log} - [clicks|impressions] - тип лога в файле
- {dynamic unique hash} - уникальный хеш
Запрос на получение списка демо лог-файлов:
https://api-services.appodeal.com/api/v2/demo_log_files_urls?api_key={your api key}&user_id={your user id}
Данные в выходных файлах имеют задержку в 5 дней. Первые данные появятся только через 5 дней с момента включения API!
Формат файлов CSV
Каждый файл, который можно загрузить, содержит следующую информацию, разделенную табуляцией:
Field | Description | Type |
---|---|---|
timestamp | record unix timestamp | integer |
ad_type | ad type interstitial = 1, video = 2, banner = 3, native = 4, mrec = 5, rewarded_video = 6 | integer |
model | device model | string |
platform | platform ID GOOGLE = 1, AMAZON = 2, IOS = 4, TVOS = 5 | integer |
ip | IP address | string |
device | device ID | string |
country | Country code | string |
app | application key | string |
os_version | device OS version | string |
sdk | sdk version | string |
gender | device user gender | string |
age | device user age | string |
relation | device user relation | string |
address | device user address | string |
tz | timezone | string |
lat | latitude | decimal |
lon | longtitude | decimal |
connection | device connection to the internet | string |
battery | battery level | string |
kind | device kind | string |
education | device user education | string |
kids | device user kids | string |
network | ad network name | string |
package_version | application package version | string |
revenue | revenue | decimal |
total_session_impressions | Total impressions from all ad types for session, only sent if ad_type is 2 or 6, otherwise 0 | integer |
total_session_clicks | Total clicks from all ad types for session | integer |
total_session_views | Total full video views from all ad types for session | integer |
session_impressions | Impressions for ad_type for session | integer |
session_clicks | Clicks for ad_type for session | integer |
session_views | Full video views for ad_type for session, only sent if ad_type is 2 or 6, otherwise 0 | integer |
session_id | current sesssion | string |
hashed_waterfall | md5 hash of created waterfall (as long as we can, e.g. 256 bytes) | string |
install_time | timestamp for the first open | bigint |
ad_stats_show_count | (session impressions) | integer |
Country Codes
Id | Code | Name | Id | Code | Name | Id | Code | Name |
---|---|---|---|---|---|---|---|---|
1 | TH | Thailand | 81 | QA | Qatar | 161 | DZ | Algeria |
2 | JP | Japan | 82 | KW | Kuwait | 162 | GN | Guinea |
3 | CN | China | 83 | GP | Guadeloupe | 163 | CD | Congo |
4 | AU | Australia | 84 | MQ | Martinique | 164 | SZ | Swaziland |
5 | IN | India | 85 | GF | French Guiana | 165 | BF | Burkina Faso |
6 | MY | Malaysia | 86 | EG | Egypt | 166 | SL | Sierra Leone |
7 | KR | South Korea | 87 | DO | Dominican Republic | 167 | SO | Somalia |
8 | TW | Taiwan | 88 | GU | Guam | 168 | NE | Niger |
9 | HK | Hong Kong | 89 | PR | Puerto Rico | 169 | CF | Central African Republic |
10 | PH | Philippines | 90 | VI | U.S. Virgin Islands | 170 | TG | Togo |
11 | VN | Vietnam | 91 | NZ | New Zealand | 171 | BI | Burundi |
12 | FR | France | 92 | SG | Singapore | 172 | GQ | Equatorial Guinea |
13 | DE | Germany | 93 | ID | Indonesia | 173 | SS | South Sudan |
14 | IL | Israel | 94 | NP | Nepal | 174 | SN | Senegal |
15 | SE | Sweden | 95 | PG | Papua New Guinea | 175 | MR | Mauritania |
16 | IT | Italy | 96 | PK | Pakistan | 176 | DJ | Djibouti |
17 | NL | Netherlands | 97 | PA | Panama | 177 | KM | Comoros |
18 | GR | Greece | 98 | CR | Costa Rica | 178 | TN | Tunisia |
19 | ES | Spain | 99 | BB | Barbados | 179 | BT | Bhutan |
20 | AT | Austria | 100 | BS | Bahamas | 180 | UY | Uruguay |
21 | GB | United Kingdom | 101 | LC | Saint Lucia | 181 | GL | Greenland |
22 | BE | Belgium | 102 | AR | Argentina | 182 | XK | Kosovo |
23 | AE | United Arab Emirates | 103 | BD | Bangladesh | 183 | KY | Cayman Islands |
24 | RU | Russia | 104 | TK | Tokelau | 184 | JM | Jamaica |
25 | KZ | Kazakhstan | 105 | MO | Macao | 185 | GT | Guatemala |
26 | DK | Denmark | 106 | KH | Cambodia | 186 | MH | Marshall Islands |
27 | PT | Portugal | 107 | MV | Maldives | 187 | AW | Aruba |
28 | SA | Saudi Arabia | 108 | NC | New Caledonia | 188 | MC | Monaco |
29 | SI | Slovenia | 109 | FJ | Fiji | 189 | AI | Anguilla |
30 | IR | Iran | 110 | MN | Mongolia | 190 | GD | Grenada |
31 | NO | Norway | 111 | WF | Wallis and Futuna | 191 | PY | Paraguay |
32 | US | United States | 112 | AL | Albania | 192 | MS | Montserrat |
33 | MX | Mexico | 113 | UZ | Uzbekistan | 193 | TC | Turks and Caicos Islands |
34 | CA | Canada | 114 | ME | Montenegro | 194 | AG | Antigua and Barbuda |
35 | SY | Syria | 115 | BZ | Belize | 195 | TV | Tuvalu |
36 | UA | Ukraine | 116 | KP | North Korea | 196 | PF | French Polynesia |
37 | CY | Cyprus | 117 | VA | Vatican City | 197 | SB | Solomon Islands |
38 | CZ | Czech Republic | 118 | AQ | Antarctica | 198 | VU | Vanuatu |
39 | CH | Switzerland | 119 | PE | Peru | 199 | SR | Suriname |
40 | IQ | Iraq | 120 | BM | Bermuda | 200 | CK | Cook Islands |
41 | RO | Romania | 121 | CW | Curaçao | 201 | KI | Kiribati |
42 | TR | Turkey | 122 | CO | Colombia | 202 | NU | Niue |
43 | LB | Lebanon | 123 | VE | Venezuela | 203 | TO | Tonga |
44 | HU | Hungary | 124 | EC | Ecuador | 204 | TF | French Southern Territories |
45 | GE | Georgia | 125 | ZA | South Africa | 205 | NF | Norfolk Island |
46 | AF | Afghanistan | 126 | KN | Saint Kitts and Nevis | 206 | BN | Brunei |
47 | BR | Brazil | 127 | WS | Samoa | 207 | TM | Turkmenistan |
48 | AZ | Azerbaijan | 128 | BO | Bolivia | 208 | PN | Pitcairn Islands |
49 | PS | Palestine | 129 | GG | Guernsey | 209 | SM | San Marino |
50 | LT | Lithuania | 130 | MT | Malta | 210 | AX | Åland |
51 | OM | Oman | 131 | TJ | Tajikistan | 211 | FO | Faroe Islands |
52 | RS | Serbia | 132 | SC | Seychelles | 212 | SJ | Svalbard and Jan Mayen |
53 | SK | Slovakia | 133 | BH | Bahrain | 213 | CC | Cocos [Keeling] Islands |
54 | FI | Finland | 134 | NG | Nigeria | 214 | NR | Nauru |
55 | IS | Iceland | 135 | ZW | Zimbabwe | 215 | GS | South Georgia and the South Sandwich Islands |
56 | MD | Republic of Moldova | 136 | LR | Liberia | 216 | UM | U.S. Minor Outlying Islands |
57 | BG | Bulgaria | 137 | GH | Ghana | 217 | SX | Sint Maarten |
58 | MK | Macedonia | 138 | TZ | Tanzania | 218 | GW | Guinea-Bissau |
59 | LI | Liechtenstein | 139 | ZM | Zambia | 219 | MF | Saint Martin |
60 | JE | Jersey | 140 | NA | Namibia | 220 | VC | Saint Vincent and the Grenadines |
61 | PL | Poland | 141 | MG | Madagascar | 221 | PM | Saint Pierre and Miquelon |
62 | HR | Croatia | 142 | AO | Angola | 222 | BL | Saint-Barthélemy |
63 | BA | Bosnia and Herzegovina | 143 | CI | Ivory Coast | 223 | DM | Dominica |
64 | EE | Estonia | 144 | SD | Sudan | 224 | ST | São Tomé and Príncipe |
65 | LV | Latvia | 145 | UG | Uganda | 225 | FK | Falkland Islands |
66 | JO | Jordan | 146 | CM | Cameroon | 226 | MP | Northern Mariana Islands |
67 | KG | Kyrgyzstan | 147 | MW | Malawi | 227 | TL | East Timor |
68 | RE | Réunion | 148 | GA | Gabon | 228 | BQ | Bonaire |
69 | YT | Mayotte | 149 | ML | Mali | 229 | FM | Federated States of Micronesia |
70 | IE | Ireland | 150 | BJ | Benin | 230 | PW | Palau |
71 | IM | Isle of Man | 151 | TD | Chad | 231 | GY | Guyana |
72 | LY | Libya | 152 | BW | Botswana | 232 | HN | Honduras |
73 | LU | Luxembourg | 153 | CV | Cape Verde | 233 | NI | Nicaragua |
74 | AM | Armenia | 154 | RW | Rwanda | 234 | SV | El Salvador |
75 | VG | British Virgin Islands | 155 | CG | Republic of the Congo | 235 | AD | Andorra |
76 | YE | Yemen | 156 | MZ | Mozambique | 236 | MM | Myanmar [Burma] |
77 | BY | Belarus | 157 | GM | Gambia | 237 | LK | Sri Lanka |
78 | GI | Gibraltar | 158 | LS | Lesotho | 238 | HT | Haiti |
79 | KE | Kenya | 159 | MU | Mauritius | |||
80 | CL | Chile | 160 | MA | Morocco |