电子商务
返回特定日期范围内的应用内购买数据。
请求格式
GET https://api.boost.yandex.com/logs/v1/export/ecommerce_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>]
& [skip_unavailable_shards=<bool>]
|
|
按应用在 Analytics module 中的数字 ID 过滤。 |
|
|
日期范围的开始,格式为 |
|
|
日期范围的结束,格式为 |
|
|
用逗号分隔的字段列表,用于示例。 一个包含所有可用字段的列表(便于快速复制):
|
|
|
此参数定义计算日期范围的起点:
|
|
|
列表中项目数量的限制。 默认取最大值。 不保证请求之间的结果一致(结果排序可能存在差异)。 |
|
|
启用字节顺序标记使用的参数。 默认值为 |
|
|
按可用字段之一的值过滤。 仅支持相等检查操作。 |
|
|
用于提高数据可用性。 默认值为 |
响应格式
如果请求了所有可用的字段:
{
"data": [
{
"ecom_type": "string",
"ecom_screen_name": "string",
"ecom_screen_search_query": "string",
"ecom_screen_payload": "string",
"ecom_screen_category_path_1": "string",
"ecom_screen_category_path_2": "string",
"ecom_screen_category_path_3": "string",
"ecom_screen_category_path_4": "string",
"ecom_screen_category_path_5": "string",
"ecom_screen_category_path_6": "string",
"ecom_screen_category_path_7": "string",
"ecom_screen_category_path_8": "string",
"ecom_screen_category_path_9": "string",
"ecom_screen_category_path_10": "string",
"ecom_product_name": "string",
"ecom_product_sku": "integer",
"ecom_product_promocodes": "string",
"ecom_product_payload": "string",
"ecom_product_category_path_1": "string",
"ecom_product_category_path_2": "string",
"ecom_product_category_path_3": "string",
"ecom_product_category_path_4": "string",
"ecom_product_category_path_5": "string",
"ecom_product_category_path_6": "string",
"ecom_product_category_path_7": "string",
"ecom_product_category_path_8": "string",
"ecom_product_category_path_9": "string",
"ecom_product_category_path_10": "string",
"ecom_product_actual_price_fiat_unit_type": "string",
"ecom_product_actual_price_fiat_value": "string",
"ecom_product_actual_price_internal_components": "string",
"ecom_product_original_price_fiat_unit_type": "string",
"ecom_product_original_price_fiat_value": "string",
"ecom_product_original_price_internal_components": "string",
"ecom_cart_item_price_fiat_unit_type": "string",
"ecom_cart_item_price_fiat_value": "string",
"ecom_cart_item_quantity": "integer",
"ecom_cart_item_internal_components": "string",
"ecom_referrer_type": "string",
"ecom_referrer_id": "integer",
"ecom_order_id": "integer",
"ecom_order_payload": "string",
"event_datetime": "string",
"event_json": "string",
"event_name": "string",
"event_receive_datetime": "string",
"event_receive_timestamp": "integer",
"event_timestamp": "integer",
"session_id": "integer",
"installation_id": "string",
"appmetrica_device_id": "integer",
"city": "string",
"connection_type": "string",
"country_iso_code": "string",
"device_ipv6": "string",
"device_locale": "string",
"device_manufacturer": "string",
"device_model": "string",
"device_type": "string",
"google_aid": "string",
"ios_ifa": "string",
"ios_ifv": "string",
"mcc": "integer",
"mnc": "integer",
"operator_name": "string",
"original_device_model": "string",
"os_name": "string",
"os_version": "string",
"profile_id": "string",
"windows_aid": "string",
"app_build_number": "integer",
"app_package_name": "string",
"app_version_name": "string",
"application_id": "integer"
},
...
]
}
application_id,ios_ifa,os_name,...
1111,024AE7EB-4128-4237-9803-D24950323D4D,ios,...
1111,3A86D5E8-1985-4A23-B147-5A1C0CF8781E,ios,...
1111,,android
...
|
|
购买事件类型。 可能的值:
|
|
|
屏幕名称。 |
|
|
搜索查询。 |
|
|
SDK传递的屏幕参数 格式是一个 JSON 对象,包含字符串键值对,例如:
|
|
|
屏幕类别。 Level 1. |
|
|
屏幕类别。 Level 2. |
|
|
屏幕类别。 Level 3. |
|
|
屏幕类别。 Level 4. |
|
|
屏幕类别。 Level 5. |
|
|
屏幕类别。 Level 6. |
|
|
屏幕类别。 Level 7. |
|
|
屏幕类别。 Level 8. |
|
|
屏幕类别。 Level 9. |
|
|
屏幕类别。 Level 10. |
|
|
产品名称。 |
|
|
Product ID. |
|
|
产品促销码。 格式为 JSON 数组字符串,例如:
|
|
|
传递给 SDK 的产品参数。 格式为 JSON 对象,包含字符串键值对,例如:
|
|
|
产品类别。 Level 1. |
|
|
产品类别。 Level 2. |
|
|
产品类别。 Level 3. |
|
|
产品类别。 Level 4. |
|
|
产品类别。 Level 5. |
|
|
产品类别。 Level 6. |
|
|
产品类别。 Level 7. |
|
|
产品类别。 Level 8. |
|
|
产品类别。 Level 9. |
|
|
产品类别。 Level 10. |
|
|
实际产品价格的货币。 |
|
|
实际产品价格。 |
|
|
产品实际价格的组成部分。 格式为 JSON 对象数组,每个对象包含一对键值对,例如:
|
|
|
基础产品价格的货币。 |
|
|
基础产品价格。 |
|
|
基础产品价格的组成部分。 格式为 JSON 对象数组,每个对象包含一对键值对,例如:
|
|
|
购物车中商品的价格货币。 |
|
|
购物车中商品的价格。 |
|
|
购物车中的商品数量。 |
|
|
购物车中商品的价格组成。 格式为 JSON 对象数组,每个对象包含一对键值对,例如:
|
|
|
流量来源类型。 |
|
|
流量来源 ID。 |
|
|
购买 ID。 |
|
|
购买参数传递给SDK。 格式是一个 JSON 对象,包含字符串键值对,例如:
|
|
|
事件的日期和时间,格式为 |
|
|
事件名称(按传递给 SDK 的方式)。 |
|
|
服务器端收到事件的日期和时间。 由于网络延迟或用户设备在事件发生时未连接,可能与 |
|
|
服务器端收到事件的时间,格式为 Unix time。 由于网络延迟或用户设备在事件发生时未连接,可能与 |
|
|
事件的时间,格式为 Unix time。 使用 Post API,您只能在事件日期(event_timestamp)与上传日期之间的差异不超过 14 天时上传事件。 API 期望以秒为单位的值。 |
|
|
会话 ID。 |
|
|
安装 ID。 |
|
|
城市名称(英文)。 |
|
|
连接类型。 可能的值: |
|
|
ISO 国家代码。 |
|
|
事件时的 IP 地址,格式为 IPv6。 例如,2a02:6b8::40c:6676:baff:fea6:53d8, ::ffff:5.255.232.147。 |
|
|
设备上的语言。 |
|
|
Analytics 服务检测到的设备制造商(例如,Apple 或 Samsung)。 |
|
|
Analytics 服务检测到的设备型号(例如,Galaxy S6)。 |
|
|
Analytics 服务检测到的设备类型。 可能的值: |
|
|
设备的 Google AID,格式为从设备接收的格式。 |
|
|
设备的 IFA,格式为从设备接收的格式。 |
|
|
应用的 IFV,格式为从设备接收的格式。 |
|
|
移动国家代码。 |
|
|
移动网络代码。 |
|
|
移动运营商名称。 |
|
|
设备的出厂型号(例如,对于 Galaxy S8,可能的值有:SM-G9550、SM-G9558 等)。 |
|
|
用户设备上的操作系统: |
|
|
用户设备上的操作系统版本。 |
|
|
用户个人资料 ID。 |
|
|
设备的 Windows AID,格式为从设备接收的格式。 |
|
|
应用构建号。 |
|
|
Android 的包名,或 iOS 的 Bundle ID(例如,ru.yandex.metro)。 |
|
|
开发者指定的应用版本格式。 |
|
|
应用在 Analytics module 中的唯一数字标识符。 |
Example
请求:
curl -X GET \
'https://api.boost.yandex.com/logs/v1/export/ecommerce_events.json?application_id=2421017&date_since=2023-01-04+00%3A00%3A00&date_until=2023-01-04+23%3A59%3A59&date_dimension=receive&use_utf8_bom=true&fields=ecom_type,ecom_screen_name,ecom_screen_search_query,ecom_screen_payload,ecom_screen_category_path_1,ecom_screen_category_path_2,ecom_screen_category_path_3,ecom_screen_category_path_4,ecom_screen_category_path_5,ecom_screen_category_path_6,ecom_screen_category_path_7,ecom_screen_category_path_8,ecom_screen_category_path_9,ecom_screen_category_path_10,ecom_product_name,ecom_product_sku,ecom_product_promocodes,ecom_product_payload,ecom_product_category_path_1,ecom_product_category_path_2,ecom_product_category_path_3,ecom_product_category_path_4,ecom_product_category_path_5,ecom_product_category_path_6,ecom_product_category_path_7,ecom_product_category_path_8,ecom_product_category_path_9,ecom_product_category_path_10,ecom_product_actual_price_fiat_unit_type,ecom_product_actual_price_fiat_value,ecom_product_actual_price_internal_components,ecom_product_original_price_fiat_unit_type,ecom_product_original_price_fiat_value,ecom_product_original_price_internal_components,ecom_cart_item_price_fiat_unit_type,ecom_cart_item_price_fiat_value,ecom_cart_item_quantity,ecom_cart_item_internal_components,ecom_referrer_type,ecom_referrer_id,ecom_order_id,ecom_order_payload,event_datetime,event_json,event_name,event_receive_datetime,event_receive_timestamp,event_timestamp,session_id,installation_id,appmetrica_device_id,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_name,os_version,profile_id,windows_aid,app_build_number,app_package_name,app_version_name,application_id' \
-H 'Authorization: OAuth oauth_token'
响应:
{
"data": [
{
"ecom_type": "show_screen",
"ecom_screen_name": "",
"ecom_screen_search_query": "",
"ecom_screen_payload": {
"full_screen": "true"
},
"ecom_screen_category_path_1": "",
"ecom_screen_category_path_2": "",
"ecom_screen_category_path_3": "",
"ecom_screen_category_path_4": "",
"ecom_screen_category_path_5": "",
"ecom_screen_category_path_6": "",
"ecom_screen_category_path_7": "",
"ecom_screen_category_path_8": "",
"ecom_screen_category_path_9": "",
"ecom_screen_category_path_10": "",
"ecom_product_name": "",
"ecom_product_sku": "",
"ecom_product_promocodes": [],
"ecom_product_payload": {},
"ecom_product_category_path_1": "",
"ecom_product_category_path_2": "",
"ecom_product_category_path_3": "",
"ecom_product_category_path_4": "",
"ecom_product_category_path_5": "",
"ecom_product_category_path_6": "",
"ecom_product_category_path_7": "",
"ecom_product_category_path_8": "",
"ecom_product_category_path_9": "",
"ecom_product_category_path_10": "",
"ecom_product_actual_price_fiat_unit_type": "",
"ecom_product_actual_price_fiat_value": 0,
"ecom_product_actual_price_internal_components": [],
"ecom_product_original_price_fiat_unit_type": "",
"ecom_product_original_price_fiat_value": 0,
"ecom_product_original_price_internal_components": [],
"ecom_cart_item_price_fiat_unit_type": "",
"ecom_cart_item_price_fiat_value": 0,
"ecom_cart_item_quantity": 0,
"ecom_cart_item_internal_components": [],
"ecom_referrer_type": "",
"ecom_referrer_id": "",
"ecom_order_id": "",
"ecom_order_payload": {},
"event_datetime": "2024-07-29 23:37:01",
"event_receive_datetime": "2024-07-29 23:37:14",
"event_name": "",
"event_receive_timestamp": 1722285434,
"event_timestamp": 1722285421,
"session_id": 10000000807,
"installation_id": "6559cf2bb96c44189ef889bc4976b240",
"appmetrica_device_id": 383777566819598200,
"city": "",
"connection_type": "wifi",
"country_iso_code": "RU",
"device_ipv6": "::ffff:79.173.67.100",
"device_locale": "ru_RU",
"device_manufacturer": "Realme",
"device_model": "realme C21",
"device_type": "phone",
"google_aid": "",
"ios_ifa": "",
"ios_ifv": "",
"mcc": 250,
"mnc": 1,
"operator_name": "MTS RUS",
"original_device_model": "RMX3201",
"os_name": "android",
"os_version": 11,
"profile_id": 107010519,
"windows_aid": "",
"app_build_number": 2024060301,
"app_package_name": "com.biglion",
"app_version_name": "7.4.40",
"application_id": 178725
},
...
]
}
另请参见
如果您没有找到所需答案,可以通过反馈表单提交您的问题。 请尽可能详细地描述问题。 如果可能,请附上截图。