👍

Try it!

Try out the Daily Exports API using your Branch data via the API reference here

概述

Benefits of Daily Exports API

Branch’s Daily Exports pull granular Branch event data directly. You can do so either via the Daily Exports section in your Branch dashboard OR via API directly.

API Limitations

Limitation

细节

Data Availability

由于数据每24小时处理一次,因此只会在一天结束后显示

Max number of days that can be queried at a time

7 Days.

Export Window

Rolling 7 day window

Data Visibility

列入白名单日期之前的数据将不可见。注册后,将在下一个 UTC 日生成数据。

Data Visibility for Keys

数据仅对您的 live key(而不是 test key)可见。

Click data related to SANs (e.g. Google Ads)

Can be found at the campaign level rather than device level.

Data Purge

Branch will purge last-attributed data after 60 days

Data Hashing

Many fields are hashed, including IP address and advertising identifiers, after 7 days. See Data Hashing for further details.

File Limitations

Multiple files are expected with 200K rows per file when using Daily Exports. If your export has less than 200K rows, there will only be one file.

Prerequisites & API Access

先决条件

  • You must have a Data Feeds subscription.
  • Toggle on the Data Export API using the slider on the Data Feeds Manager page.
  • To access the API, you must have Sensitive Data and Export access.

Third Party API Access

任何有权访问帐户的 API keys 的用户都将能够访问 Branch 的 Daily Export API(从而可以访问未经筛选的日志级数据)。因此,我们建议您不要在邀请过程中向第三方(代理商和广告合作伙伴)提供查看 API keys 所需的权限,即敏感数据和应用级设置。

认证

Calls to the Branch Daily Export API require a branch_key and branch_secret String parameter to be passed with each request.

API Usage

Daily Exports Request

POST
https://api2.branch.io/v3/export
Headers:
Content-Type: application/json
Body: JSON parameters
Host: api2.branch.io

Request Headers:

标头

描述

必要项

Content-Type

application/json

Request Body Parameters:

参数

描述

必要项

branch_key

The Branch key of the originating app.

branch_secret

The Branch secret key of the originating app.

export_date

The UTC date of the requested data export.

Response Body Parameters:

参数

类型

可读名称

eo_branch_cta_view

Array of Strings

CTA Views

eo_click

Array of Strings

Clicks

eo_commerce_event

Array of Strings

商业活动

eo_content_event

Array of Strings

Content Event

eo_custom_event

Array of Strings

自订活动

eo_impression

Array of Strings

Impressions(展示)

eo_install

Array of Strings

Installs

eo_open

Array of Strings

Open

eo_pageview

Array of Strings

浏览量

eo_reinstall

Array of Strings

Reinstall

eo_sms_sent

Array of Strings

短信已发送

eo_user_lifecycle_event

Array of Strings

用户 Lifecycle Event

eo_web_session_start

Array of Strings

Web Session Start

eo_web_to_app_auto_redirect

Array of Strings

Web To App Auto Redirects

eo_dismissal

Array of Strings

Dismissal

Example Request/Response:

curl --request POST \
     --url https://api2.branch.io/v3/export \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '
{
     "branch_key": "key_live_xxxxxxxxxxxx",
     "branch_secret": "secret_live_xxxxxxxxxx",
     "export_date": "2022-06-01"
}
{
 "eo_branch_cta_view": <Array of String(s)>,
  "eo_click": <Array of String(s)>,
  "eo_commerce_event": <Array of String(s)>,
  "eo_content_event": <Array of String(s)>,
  "eo_custom_event": <Array of String(s)>,
  "eo_impression": <Array of String(s)>,
  "eo_install": <Array of String(s)>,
  "eo_open": <Array of String(s)>,
  "eo_pageview": <Array of String(s)>,
  "eo_reinstall": <Array of String(s)>,
  "eo_sms_sent": <Array of String(s)>,
  "eo_user_lifecycle_event": <Array of String(s)>,
  "eo_web_session_start": <Array of String(s)>,
  "eo_web_to_app_auto_redirect": <Array of String(s)>,
  "eo_dismissal": <Array of String(s)>
}

📘

Windows Command Prompt 格式

Please note that if you are trying to run this curl command in Command Prompt on a machine running Windows, you will need to change ' to " and escape the " in curly brackets with a . Here is a final example:

curl --request POST \
     --url https://api2.branch.io/v3/export \
     --header "Accept: application/json" \
     --header "Content-Type: application/json" \
     --data "
{\"branch_key\": \"key_live_xxxxxxxxxxxx\",\"branch_secret\": \"secret_live_xxxxxxxxxx\",\"export_date\": \"2022-06-01\"}"

The response payload will be in JSON format and for each export, it will have an array of paths to files on S3 to download.

  • Note that there may be multiple files (depending on the size of the day's export) and that each CSV file will be gzipped.
  • Each of the keys in the example above may not be present in the response depending on if you had any events for that topic for the specified day.

All exports via Data Feeds are powered by Branch's People-Based Attribution. For an exhaustive list of events included in these exports and more detailed definitions of each event, please see the Event Ontology Data Schema.

Response Codes:

Response Code

描述

200

Status of aggregate export

400

Authentication Failed

附录

Data Hashing

根据与 GDPR 相关的内部政策和其他数据保护法律,我们会在7天后对许多字段进行哈希处理,包括 IP 地址和广告标识符。

这意味着,如果要通过操作后台 (Dashboard)的 CSV 导出或通过请求手动数据转储来导出7天以上的数据,则这些字段将不再包含原始值。

因此,我们强烈建议您确保在7天内导出原始数据。

Daily Download Availability

A full day's files will be available on our S3 bucket at that location to download around 4:00 am UTC. It will return a blank array from S3 for any empty files until the UTC day is over and the data has been transferred to S3, therefore it is recommended you schedule any ETLs to fetch the data for the previous day around 7:00 am UTC.

知识产权差异

对于无法将 IP 解析到某个位置的事件,只有很少一部分事件无法使用国家和城市等地理数据。

时间限制

数据发布后 6 个月内可通过 API 检索到。如果您需要超过 6 个月的数据记录,请在系统中设置定期导出和存储数据。

导出超过7天

根据与 GDPR 相关的内部政策和其他数据保护法律,我们会在7天后对许多字段进行哈希处理,包括 IP 地址和广告标识符。这意味着,如果要通过操作后台 (Dashboard)的 CSV 导出或通过请求手动数据转储来导出7天以上的数据,则这些字段将不再包含原始值。因此,我们强烈建议您始终在7天内导出原始数据。

📘

手动数据转储

由于完成手动数据转储所需的资源,该服务仅对 Branch Enterprise 层客户端可用。

Daily Exports Fields

id
origin
name
timestamp
timestamp_iso
event_timestamp
store_install_begin_timestamp
referrer_click_timestamp
days_from_install_to_opt_in
days_from_last_attributed_touch_to_event
hours_from_last_attributed_touch_to_event
minutes_from_last_attributed_touch_to_event
seconds_from_last_attributed_touch_to_event
deep_linked
first_event_for_user
customer_event_alias
di_match_click_token
hash_version
request_id
match_guaranteed
custom_data
last_attributed_touch_type
last_attributed_touch_timestamp
last_attributed_touch_timestamp_iso
last_attributed_touch_data_tilde_id
last_attributed_touch_data_tilde_campaign
last_attributed_touch_data_tilde_campaign_id
last_attributed_touch_data_tilde_channel
last_attributed_touch_data_tilde_feature
last_attributed_touch_data_tilde_stage
last_attributed_touch_data_tilde_tags
last_attributed_touch_data_tilde_advertising_partner_name
last_attributed_touch_data_tilde_secondary_publisher
last_attributed_touch_data_tilde_creative_name
last_attributed_touch_data_tilde_creative_id
last_attributed_touch_data_tilde_ad_set_name
last_attributed_touch_data_tilde_ad_set_id
last_attributed_touch_data_tilde_ad_name
last_attributed_touch_data_tilde_ad_id
last_attributed_touch_data_tilde_branch_ad_format
last_attributed_touch_data_tilde_technology_partner
last_attributed_touch_data_tilde_banner_dimensions
last_attributed_touch_data_tilde_placement
last_attributed_touch_data_tilde_keyword_id
last_attributed_touch_data_tilde_agency
last_attributed_touch_data_tilde_optimization_model
last_attributed_touch_data_tilde_secondary_ad_format
last_attributed_touch_data_tilde_journey_name
last_attributed_touch_data_tilde_journey_id
last_attributed_touch_data_tilde_view_name
last_attributed_touch_data_tilde_view_id
last_attributed_touch_data_plus_current_feature
last_attributed_touch_data_plus_via_features
last_attributed_touch_data_dollar_3p
last_attributed_touch_data_plus_web_format
last_attributed_touch_data_custom_fields
last_attributed_touch_data_tilde_keyword
last_attributed_touch_data_tilde_customer_campaign
last_attributed_touch_data_tilde_campaign_type
last_attributed_touch_data_tilde_agency_id
last_attributed_touch_data_plus_touch_id
last_attributed_touch_data_tilde_keyword_match_type
last_attributed_touch_data_tilde_organic_search_url
last_attributed_touch_data_dollar_marketing_title
last_cta_view_timestamp
last_cta_view_timestamp_iso
last_cta_view_data_tilde_id
last_cta_view_data_tilde_campaign
last_cta_view_data_tilde_campaign_id
last_cta_view_data_tilde_channel
last_cta_view_data_tilde_feature
last_cta_view_data_tilde_stage
last_cta_view_data_tilde_tags
last_cta_view_data_tilde_advertising_partner_name
last_cta_view_data_tilde_secondary_publisher
last_cta_view_data_tilde_creative_name
last_cta_view_data_tilde_creative_id
last_cta_view_data_tilde_ad_set_name
last_cta_view_data_tilde_ad_set_id
last_cta_view_data_tilde_ad_name
last_cta_view_data_tilde_ad_id
last_cta_view_data_tilde_branch_ad_format
last_cta_view_data_tilde_technology_partner
last_cta_view_data_tilde_banner_dimensions
last_cta_view_data_tilde_placement
last_cta_view_data_tilde_keyword_id
last_cta_view_data_tilde_agency
last_cta_view_data_tilde_optimization_model
last_cta_view_data_tilde_secondary_ad_format
last_cta_view_data_plus_via_features
last_cta_view_data_dollar_3p
last_cta_view_data_plus_web_format
last_cta_view_data_custom_fields
last_cta_view_data_plus_touch_id
last_cta_view_data_tilde_campaign_type
user_data_os
user_data_os_version
user_data_model
user_data_browser
user_data_geo_country_code
user_data_app_version
user_data_sdk_version
user_data_geo_dma_code
user_data_environment
user_data_platform
user_data_aaid
user_data_idfa
user_data_idfv
user_data_android_id
user_data_limit_ad_tracking
user_data_user_agent
user_data_ip
user_data_developer_identity
user_data_language
user_data_brand
user_data_cross_platform_id
user_data_past_cross_platform_ids
user_data_prob_cross_platform_ids
user_data_os_version_android
user_data_geo_city_code
user_data_geo_city_en
user_data_http_referrer
user_data_installer_package_name
user_data_cpu_type
user_data_screen_width
user_data_screen_height
user_data_build
user_data_internet_connection_type
user_data_opted_in
user_data_opted_in_status
user_data_oaid
event_data_revenue_in_usd
event_data_exchange_rate
event_data_transaction_id
event_data_revenue
event_data_currency
event_data_shipping
event_data_tax
event_data_coupon
event_data_affiliation
event_data_search_query
event_data_description