Ad Revenue Attribution

Last version in PDF: Ad Revenue Attribution Docs.pdf (For May 23rd, 2019)

General info

Ad Revenue attribution API is available for our customers and can be enabled on request. Appodeal will decide regarding the enabling of this API.

After enabling it is very easy to start working with API: Appodeal will automatically generate a set of daily files including the information described below.

All files are created automatically and are stored for 7 days.

You should use your API key and user ID at https://www.appodeal.com/profile/api_integration or https://www.appodeal.ru/profile/api_integration and use these credentials in every API call.


There is only one endpoint that can be used to get a list of available files.

Example of the request:

https://api-services.appodeal.com/api/v2/get_log_urls?api_key={your api key}&user_id={your user id}


The result is (in case there are files available):

{

    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 format:

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 of the user
  • {log date with underscore} - a date for which the data is presented
  • {clicks or impressions log} - [clicks|impressions] - shows what is contained in  the file
  • {dynamic unique hash} - the unique hash

Request to get the list of demo log files: 

https://api-services.appodeal.com/api/v2/demo_log_files_urls?api_key={your api key}&user_id={your user id}

Please pay your attention:

The data in output files have 5 days delay. The first data will appear only after 5 days from the time the API was enabled!

CSV files format

Every file that can be downloaded contains the following information separated with tabulation:

* `timestamp` (/integer/): record unix timestamp
* `ad_type` (/integer/): ad type; interstitial = *1*, video = *2*, banner = *3*, native = *4*, mrec = *5*, rewarded_video = *6*.
* `model` (/string/): device model
* `platform` (/integer/): platform ID GOOGLE = *1*, AMAZON = *2*, IOS = *4*, TVOS = *5*
* `ip` (/string/): IP address
* `device` (/string/): device ID
* `country` (/integer/): Country code
* `app` (/integer/ ): application key
* `user`(/integer/): Appodeal internal user ID
* `os_version` (/string/): device OS version
* `sdk` (/string/): sdk version
* `address` (/string/): device user address
* `tz` (/string/): timezone
* `lat` (/decimal/): latitude
* `lon` (/decimal/): longtitude
* `connection` (/string/): device connection to the internet
* `battery` (/integer/): battery level
* `kind` (/string/): device kind
* `network` (/string/): ad network name
* `image`(/integer/): Appodeal internal ad unit ID
* `package_version` (/string/): application package version
* `revenue` (/decimal/): revenue
* `total_session_impressions ` (/integer/): total impressions from all ad types for session
* `total_session_clicks ` (/integer/): total clicks from all ad types for session
* `total_session_views` (/integer/): total full video views from all ad types for session, only sent if ad_type is 2 or 6, otherwise 0
* `session_impressions ` (/integer/): impressions for ad_type for session
* `session_clicks ` (/integer/): clicks for ad_type for session
* `session_views ` (/integer/): full video views for ad_type for session,
only sent if ad_type is 2 or 6, otherwise 0
* `session_id ` (/string/): current sesssion
* `session_uptime ` (/integer/): session uptime / length in seconds
* `hashed_waterfall ` (/string/): md5 hash of created waterfall (as long as we can, e.g. 256 bytes)
* `install_time ` (/bigint/): timestamp for the first open
* `segment` (/integer/): ID of Appodeal's user segment
* `attribution_id` (/string/): device identifier from mobile attribution service (appsflyer_id, adjust_id, kochava_id, etc.)
* `media_source_id` (/integer): numeric identifier of media source for device
* `revenue_key`(string): DEPRECATED
* `appsflyer_id`(string): DEPRECATED! Use attribution_id instead of appsflyer_id.

Country Codes

Id

Code

Name

Id

Code

Name

Id

Code

Name

1

TH

Thailand

35

SY

Syria

69

YT

Mayotte

2

JP

Japan

36

UA

Ukraine

70

IE

Ireland

3

CN

China

37

CY

Cyprus

71

IM

Isle of Man

4

AU

Australia

38

CZ

Czech Republic

72

LY

Libya

5

IN

India

39

CH

Switzerland

73

LU

Luxembourg

6

MY

Malaysia

40

IQ

Iraq

74

AM

Armenia

7

KR

South Korea

41

RO

Romania

75

VG

British Virgin Islands

8

TW

Taiwan

42

TR

Turkey

76

YE

Yemen

9

HK

Hong Kong

43

LB

Lebanon

77

BY

Belarus

10

PH

Philippines

44

HU

Hungary

78

GI

Gibraltar

11

VN

Vietnam

45

GE

Georgia

79

KE

Kenya

12

FR

France

46

AF

Afghanistan

80

CL

Chile

13

DE

Germany

47

BR

Brazil

81

QA

Qatar

14

IL

Israel

48

AZ

Azerbaijan

82

KW

Kuwait

15

SE

Sweden

49

PS

Palestine

83

GP

Guadeloupe

16

IT

Italy

50

LT

Lithuania

84

MQ

Martinique

17

NL

Netherlands

51

OM

Oman

85

GF

French Guiana

18

GR

Greece

52

RS

Serbia

86

EG

Egypt

19

ES

Spain

53

SK

Slovakia

87

DO

Dominican Republic

20

AT

Austria

54

FI

Finland

88

GU

Guam

21

GB

United Kingdom

55

IS

Iceland

89

PR

Puerto Rico

22

BE

Belgium

56

MD

Republic of Moldova

90

VI

U.S. Virgin Islands

23

AE

United Arab Emirates

57

BG

Bulgaria

91

NZ

New Zealand

24

RU

Russia

58

MK

Macedonia

92

SG

Singapore

25

KZ

Kazakhstan

59

LI

Liechtenstein

93

ID

Indonesia

26

DK

Denmark

60

JE

Jersey

94

NP

Nepal

27

PT

Portugal

61

PL

Poland

95

PG

Papua New Guinea

28

SA

Saudi Arabia

62

HR

Croatia

96

PK

Pakistan

29

SI

Slovenia

63

BA

Bosnia and Herzegovina

97

PA

Panama

30

IR

Iran

64

EE

Estonia

98

CR

Costa Rica

31

NO

Norway

65

LV

Latvia

99

BB

Barbados

32

US

United States

66

JO

Jordan

100

BS

Bahamas

33

MX

Mexico

67

KG

Kyrgyzstan

101

LC

Saint Lucia

34

CA

Canada

68

RE

Réunion

102

AR

Argentina

Id

Code

Name

Id

Code

Name

Id

Code

Name

103

BD

Bangladesh

137

GH

Ghana

171

BI

Burundi

104

TK

Tokelau

138

TZ

Tanzania

172

GQ

Equatorial Guinea

105

MO

Macao

139

ZM

Zambia

173

SS

South Sudan

106

KH

Cambodia

140

NA

Namibia

174

SN

Senegal

107

MV

Maldives

141

MG

Madagascar

175

MR

Mauritania

108

NC

New Caledonia

142

AO

Angola

176

DJ

Djibouti

109

FJ

Fiji

143

CI

Ivory Coast

177

KM

Comoros

110

MN

Mongolia

144

SD

Sudan

178

TN

Tunisia

111

WF

Wallis and Futuna

145

UG

Uganda

179

BT

Bhutan

112

AL

Albania

146

CM

Cameroon

180

UY

Uruguay

113

UZ

Uzbekistan

147

MW

Malawi

181

GL

Greenland

114

ME

Montenegro

148

GA

Gabon

182

XK

Kosovo

115

BZ

Belize

149

ML

Mali

183

KY

Cayman Islands

116

KP

North Korea

150

BJ

Benin

184

JM

Jamaica

117

VA

Vatican City

151

TD

Chad

185

GT

Guatemala

118

AQ

Antarctica

152

BW

Botswana

186

MH

Marshall Islands

119

PE

Peru

153

CV

Cape Verde

187

AW

Aruba

120

BM

Bermuda

154

RW

Rwanda

188

MC

Monaco

121

CW

Curaçao

155

CG

Republic of the Congo

189

AI

Anguilla

122

CO

Colombia

156

MZ

Mozambique

190

GD

Grenada

123

VE

Venezuela

157

GM

Gambia

191

PY

Paraguay

124

EC

Ecuador

158

LS

Lesotho

192

MS

Montserrat

125

ZA

South Africa

159

MU

Mauritius

193

TC

Turks and Caicos Islands

126

KN

Saint Kitts and Nevis

160

MA

Morocco

194

AG

Antigua and Barbuda

127

WS

Samoa

161

DZ

Algeria

195

TV

Tuvalu

128

BO

Bolivia

162

GN

Guinea

196

PF

French Polynesia

129

GG

Guernsey

163

CD

Congo

197

SB

Solomon Islands

130

MT

Malta

164

SZ

Swaziland

198

VU

Vanuatu

131

TJ

Tajikistan

165

BF

Burkina Faso

199

SR

Suriname

132

SC

Seychelles

166

SL

Sierra Leone

200

CK

Cook Islands

133

BH

Bahrain

167

SO

Somalia

201

KI

Kiribati

134

NG

Nigeria

168

NE

Niger

202

NU

Niue

135

ZW

Zimbabwe

169

CF

Central African Republic

203

TO

Tonga

136

LR

Liberia

170

TG

Togo

204

TF

French Southern Territories


Id

Code

Name

Id

Code

Name

205

NF

Norfolk Island

239

TT

Trinidad and Tobago

206

BN

Brunei

240

AS

American Samoa

207

TM

Turkmenistan

241

LA

Laos

208

PN

Pitcairn Islands

242

CU

Cuba

209

SM

San Marino

243

ET

Ethiopia

210

AX

Åland

244

SH

Saint Helena

211

FO

Faroe Islands

245

ER

Eritrea

212

SJ

Svalbard and Jan Mayen

246

IO

British Indian Ocean Territory

213

CC

Cocos [Keeling] Islands

247

ZZ

Other

214

NR

Nauru

249

CX

Christmas Island

215

GS

South Georgia and the South Sandwich Islands




216

UM

U.S. Minor Outlying Islands




217

SX

Sint Maarten




218

GW

Guinea-Bissau




219

MF

Saint Martin




220

VC

Saint Vincent and the Grenadines




221

PM

Saint Pierre and Miquelon




222

BL

Saint-Barthélemy




223

DM

Dominica




224

ST

São Tomé and Príncipe




225

FK

Falkland Islands




226

MP

Northern Mariana Islands




227

TL

East Timor




228

BQ

Bonaire




229

FM

Federated States of Micronesia




230

PW

Palau




231

GY

Guyana




232

HN

Honduras




233

NI

Nicaragua




234

SV

El Salvador




235

AD

Andorra




236

MM

Myanmar [Burma]




237

LK

Sri Lanka




238

HT

Haiti