回传

返回特定日期范围内的回传数据。

请求格式

GET https://api.appmetrica.yandex.com/logs/v1/export/postbacks.{csv | json}
  ? application_id=<int>
  & date_since=<string>
  & date_until=<string>
  & fields=<string>
  & [limit=<int>]
  & [use_utf8_bom=<bool>]
  & [<any field name>=<string>]
  & [skip_unavailable_shards=<bool>]

应用ID*

按应用在 AppMetrica 中的数字 ID 过滤。

date_since*

日期范围的开始,格式为 yyyy-mm-dd hh:mm:ss。

date_until*

日期范围的结束,格式为 yyyy-mm-dd hh:mm:ss。

fields*

用逗号分隔的字段列表,用于示例。

一个包含所有可用字段的列表(便于快速复制):

application_id,attributed_touch_type,click_datetime,click_id,click_ipv6,click_timestamp,click_url_parameters,click_user_agent,publisher_id,publisher_name,tracker_name,tracking_id,install_datetime,install_ipv6,install_timestamp,match_type,appmetrica_device_id,device_locale,device_manufacturer,device_model,device_type,google_aid,oaid,ios_ifa,os_name,os_version,windows_aid,app_package_name,app_version_name,conversion_datetime,conversion_timestamp,event_name,attempt_datetime,attempt_timestamp,cost_model (postback_type),notifying_status,postback_url,postback_url_parameters,response_body,response_code

限制

列表中项目数量的限制。 默认取最大值。 不保证请求之间的结果一致(结果排序可能存在差异)。

use_utf8_bom

启用字节顺序标记使用的参数。 默认值为 false。

<any field name>

按可用字段之一的值过滤。 仅支持相等检查操作。

skip_unavailable_shards

用于提高数据可用性。 默认值为 false。

响应格式

如果请求了所有可用的字段:

{
  "data": [
    {
      "application_id": "integer",
      "attributed_touch_type": "string",
      "click_datetime": "string",
      "click_id": "string",
      "click_ipv6": "string",
      "click_timestamp": "integer",
      "click_url_parameters": "string",
      "click_user_agent": "string",
      "publisher_id": "integer",
      "publisher_name": "string",
      "tracker_name": "string",
      "tracking_id": "integer",
      "install_datetime": "string",
      "install_ipv6": "string",
      "install_timestamp": "integer",
      "match_type": "string",
      "appmetrica_device_id": "integer",
      "device_locale": "string",
      "device_manufacturer": "string",
      "device_model": "string",
      "device_type": "string",
      "google_aid": "string",
      "oaid": "string",
      "ios_ifa": "string",
      "ios_ifv": "string",
      "os_name": "string",
      "os_version": "string",
      "windows_aid": "string",
      "app_package_name": "string",
      "app_version_name": "string",
      "conversion_datetime": "string",
      "conversion_timestamp": "integer",
      "event_name": "string",
      "attempt_datetime": "string",
      "attempt_timestamp": "integer",
      "cost_model": "string",
      "notifying_status": "string",
      "postback_url": "string",
      "postback_url_parameters": "string",
      "response_body": "string",
      "response_code": "integer"
    },
    ...
  ]
}
application_id,ios_ifa,os_name,...
1111,024AE7EB-4128-4237-9803-D24950323D4D,ios,...
1111,3A86D5E8-1985-4A23-B147-5A1C0CF8781E,ios,...
1111,,android
...

application_id

应用在 AppMetrica 中的唯一数字标识符。

attributed_touch_type

广告互动类型:click | impression | unknown。

点击日期时间

点击/展示的日期和时间,格式为 yyyy-mm-dd hh:mm:ss。

click_id

点击/展示的 ID 或 ''(如果 ID 不可用则为空字符串)。

点击 IPv6

点击/展示时的 IP 地址,格式为 IPv6。 例如:2a02:6b8::40c:6676:baff:fea6:53d8, ::ffff:5.255.232.147。

click_timestamp

点击/展示的时间,格式为 Unix time,以秒为单位。

点击URL参数

参数在 URL 中的显示方式。 特殊字符必须转义(例如,?param1=1&param2=2... 在请求中会显示为 ?param1%3D1%26param2%3D2...)。

点击用户代理

点击/展示的用户代理。

publisher_id

AppMetrica 发布者的 ID。 您可以使用它在 AppMetrica 报表中识别发布者。 如果为跟踪器启用了未归因回传,则字段值为 0。

出版商名称

AppMetrica 合作伙伴的名称。 如果为跟踪器启用了未归因回传,则字段值为空。

tracker_name

添加到 AppMetrica 界面的跟踪器名称。 如果为跟踪器启用了未归因回传,则字段值为空。

tracking_id

AppMetrica 跟踪器的 ID。 您可以使用它在 AppMetrica 报表中识别发布者。 如果为跟踪器启用了未归因回传,则字段值为 0。

install_datetime

安装的日期和时间,格式为 yyyy-mm-dd hh:mm:ss。

安装IPv6

安装时的 IP 地址,格式为 IPv6(例如,2a02:6b8::40c:6676:baff:fea6:53d8, ::ffff:5.255.232.147)。

install_timestamp

安装的时间,格式为 Unix time,以秒为单位。

match_type

归因方法:指纹 | 来源页 | 标识符 | ''(空字符串)。

appmetrica_device_id

AppMetrica 服务检测到的唯一设备标识符。 在 Android 中来自 AppSetId,在 iOS 中来自 IFV。

device_locale

设备上的语言。

设备制造商

AppMetrica 服务检测到的设备制造商(例如,Apple 或 Samsung)。

设备型号

AppMetrica 服务检测到的设备型号(例如,Galaxy S6)。

device_type

AppMetrica 服务检测到的设备类型。 可能的值:phone | tablet | unknown。

google_aid

设备的 Google AID,格式为从设备接收的格式。

oaid

设备的华为 OAID,格式为从设备接收的格式。

ios_ifa

设备的 IFA,格式为从设备接收的格式。

ios_ifv

应用的 IFV,格式为从设备接收的格式。

os_name

用户设备上的操作系统:ios | android | windows。

os_version

用户设备上的操作系统版本。

windows_aid

设备的 Windows AID,格式为从设备接收的格式。

app_package_name

Android 的包名,或 iOS 的 Bundle ID(例如,ru.yandex.metro)。

app_version_name

开发者指定的应用版本格式。

conversion_datetime

事件(对于 CPA 回传)、安装(对于 CPI 回传)或重新参与(对于 CPR 回传)的日期和时间,格式为 yyyy-mm-dd hh:mm:ss。

conversion_timestamp

事件(对于 CPA 回传)、安装(对于 CPI 回传)或重新参与(对于 CPR 回传)的时间,格式为 Unix time。

event_name

事件名称(按传递给 SDK 的方式)。

attempt_datetime

发送的日期和时间,格式为 yyyy-mm-dd hh:mm:ss。

attempt_timestamp

发送的时间,格式为 Unix time。

成本模型

回传类型。 可能的值:cpi(安装)| cpa(事件)| cpr(重新参与)。

通知状态

回传发送的状态(failed | sent)。 如果发送失败,同一回传可能在响应中出现多次。

postback_url

完整的回传 URL。

postback_url_parameters

回传 URL 参数在 URL 中的显示方式。 例如,param1=1&param2=2...。

response_body

从服务器接收的数据。

response_code

发送回传的 HTTP 代码。

Example

请求:

curl -X GET \
  'https://api.appmetrica.yandex.com/logs/v1/export/postbacks.json?application_id=1111&date_since=2018-10-10&date_until=2018-10-11&fields=application_id,attributed_touch_type,click_datetime,click_id,click_ipv6,click_timestamp,click_url_parameters,click_user_agent,publisher_id,publisher_name,tracker_name,tracking_id,install_datetime,install_ipv6,install_timestamp,match_type,appmetrica_device_id,device_locale,device_manufacturer,device_model,device_type,google_aid,oaid,ios_ifa,ios_ifv,os_name,os_version,windows_aid,app_package_name,app_version_name,conversion_datetime,conversion_timestamp,event_name,attempt_datetime,attempt_timestamp,cost_model,notifying_status,postback_url,postback_url_parameters,response_body,response_code' \
  -H 'Authorization: OAuth oauth_token'

响应:

{
  "data": [
    {
      "application_id": "1111",
      "attributed_touch_type": "click",
      "click_datetime": "yyyy-mm-dd hh:mm:ss",
      "click_id": "f2ae4254de8844dda58b29cac2cf0e87",
      "click_ipv6": "::ffff:5.255.232.147",
      "click_timestamp": "1556258660",
      "click_url_parameters": "click_id=f2ae4254de8844dda58b29cac2cf0e87&c=1234&google_aid=&google_aid_sha1=&google_aid_md5=&ios_ifa=&ios_ifa_sha1=&ios_ifa_md5&click_timestamp=1554824136&afpub_id=&site_id=&creative_id=&goal_id1=&goal_id2 ",
      "click_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1",
      "publisher_id": "39",
      "publisher_name": "AdColony",
      "tracker_name": "Advertising iOS campaign",
      "tracking_id": "12345678901234567890",
      "install_datetime": "yyyy-mm-dd hh:mm:ss",
      "install_ipv6": "::ffff:5.255.232.147",
      "install_timestamp": "1556258660",
      "match_type": "fingerprint",
      "appmetrica_device_id": "123456789012345678",
      "device_locale": "ru_RU",
      "device_manufacturer": "Apple",
      "device_model": "iPhone X",
      "device_type": "phone",
      "google_aid": "",
      "oaid": "",
      "ios_ifa": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "ios_ifv": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "os_name": "ios",
      "os_version": "12.2",
      "windows_aid": "",
      "app_package_name": "ru.yandex.metro",
      "app_version_name": "1.0",
      "conversion_datetime": "yyyy-mm-dd hh:mm:ss",
      "conversion_timestamp": "1556258660",
      "event_name": "New person",
      "attempt_datetime": "yyyy-mm-dd hh:mm:ss",
      "attempt_timestamp": "1556258660",
      "cost_model": "cpi",
      "notifying_status": "sent",
      "postback_url": "https://adcolony.servecvr.com/?transaction_id=f2ae4254de8844dda58b29cac2cf0e87",
      "postback_url_parameters": "transaction_id=f2ae4254de8844dda58b29cac2cf0e87",
      "response_body": "SUCCESS",
      "response_code": "200"
    }
  ]
}

如果您没有找到所需答案,可以通过反馈表单提交您的问题。 请尽可能详细地描述问题。 如果可能,请附上截图。

联系支持 为文档提出改进建议
上一篇
下一篇