跳转到主要内容

MACT 概览

X 的移动应用推广测量功能使广告主能够跟踪在 X 上旨在推动安装或其他应用内转化的广告活动效果。X 的移动测量合作伙伴可帮助广告主管理他们希望从在 X 上推广的 App 中跟踪的转化指标。广告主一旦设置好需要跟踪的事件类型及其时间窗口,移动测量合作伙伴将把这些事件全部发送至 X,并即时接收归因数据,指明促成转化的用户所接触的活动和创意。

转化事件

为了向 X 报告转化事件并获取归因数据,合作伙伴必须发送移动 App 的 ID、转化类型与时间戳,以及广告/设备 ID 的哈希值。提供这些数据将会在 X 平台记录该转化事件,并在适当情况下返回归因信息。此外,广告主还可以选择提供有关该转化事件的额外元数据,例如购买金额、产品 ID,或注册方式。

API 参考文档

转换事件

POST conversion_event

记录一次移动端测量转化事件。响应会指示 X 或 X Audience Platform(TAP)的归因结果。 这与 GET conversion_attribution endpoint 相关。 响应中将声明 X、TAP,或不归因三者之一。当没有 X 归因时,twitter_attribution 节点将始终存在,且其值为 null(见下方示例响应)。如果声明了 TAP 归因,则会出现 tpn_attribution 节点,并相应填充。请参阅 TAP 概览 了解更多信息。 有多个可选参数可用于设置与每个转化事件关联的 metadata。此 metadata 不影响归因计算。
资源 URL
https://ads-api.x.com/12/conversion_event
参数
名称说明
app_id
必填
与相应应用商店对应的唯一标识符。

Type: int, string

示例:333903271com.vine.android
conversion_time
必填
转化事件发生的时间,使用 ISO-8601 时间戳格式并包含毫秒。

Type: string

示例:2014-05-22T02:38:28.103Z
conversion_type
必填
转化事件的类型。

Type: enum

可能的取值:PURCHASESIGN_UPINSTALLRE_ENGAGEUPDATETUTORIAL_COMPLETERESERVATIONADD_TO_CARTADD_TO_WISHLISTLOGINCHECKOUT_INITIATEDSEARCHLEVEL_ACHIEVEDACHIEVEMENT_UNLOCKEDCONTENT_VIEWSHAREINVITEADDED_PAYMENT_INFOSPENT_CREDITSRATED
hashed_device_id
必填
采用 HMAC_SHA-256 生成的 IDFA 或 AdID 的 hash。

Type: string

示例:ABCD1234XYZ
os_type
必填
该 App 的操作系统类型。

Type: enum

可能的取值:IOSANDROID
click_window
可选
此事件的点击回溯窗口(天)。

Type: int

注意click_window 必须大于或等于 view_through_window

默认值:14
可能的取值:171430
device_ip_address
可选
转化事件发生时设备的 IPv4 或 IPv6 地址。

Type: string

示例:192.133.78.1
level
可选
与此事件关联的等级/关卡。

Type: int

示例:2
non_twitter_engagement_time
可选
转化之前最近一次非 Twitter 互动的时间。

Type: string

示例:2014-05-22T02:38:28.103Z
non_twitter_engagement_type
可选
转化事件之前的非 Twitter 互动类型。

Type: enum

可能的取值:CLICKVIEW
number_items
可选
与此事件关联的商品/项目数量。

Type: int

示例:2
price_currency
可选
需为 ISO 4217 代码,用于表示与此事件关联的货币。

Type: string

示例:EURUSDJPY
price_micro
可选
与此事件关联的价格,单位为微额(micro)。

Type: int

示例:123450000
user_payment_info
可选
布尔值,表示与此事件关联的 App 中是否存储了用户的支付信息。

Type: bool

可能的取值:truefalse
view_through_window
可选
此事件的曝光回溯窗口(天)。

注意

click_window 必须大于或等于 view_through_window。

Type: int

默认值:1
可能的取值:0171430
示例请求
https://ads-api.x.com/12/conversion_event?app_id=333903271&os_type=IOS&hashed_device_id=ABCD1234XYZ&conversion_type=INSTALL&conversion_time=2013-04-16T07:00:00.123Z&click_window=14&view_through_window=1
示例响应
    {
      "data": {
        "conversion_value_micro": 0,
        "view_through_window": 1,
        "tpn_attribution": null,
        "conversion_time": "2017-01-21T01:14:00.602Z",
        "click_window": 30,
        "limit_ad_tracking": false,
        "event_metadata": null,
        "non_twitter_engagement_type": null,
        "conversion_type": "INSTALL",
        "partner_client_id": "com.appname 联系 id",
        "app_id": "com.appname",
        "hashed_device_id": "lke1GZa3AseB343ZcCQq7svfHzLfuSqyYnE+Rf49MOI=",
        "twitter_attribution": {
          "country_code": "US",
          "engagement_time": "2017-01-21T01:13:00.602Z",
          "engagement_type": "CLICK",
          "attribution_type": "PROMOTED",
          "promoted_properties": {
            "campaign_id": "4ns44",
            "line_item_id": "3x44d",
            "publisher_app_id": "333903271"
            "account_id":"18ce11e3egb",
            "line_item_objective": "APP_INSTALLS",
            "campaign_name": null
          },
          "tweet_id": "11434635565377600"
        },
        "os_type": "ANDROID",
        "non_twitter_engagement_time": null
      },
      "request": {
        "params": {
          "version_number": "1",
          "app_id": "com.appname",
          "conversion_type": "INSTALL",
          "os_type": "ANDROID"
          "hashed_device_id": "lke1GZa3AseB343ZcCQq7svfHzLfuSqyYnE+Rf49MOI=",
          "conversion_time": "2017-01-21T01:14:00.602Z",
          "click_window": "30",
          "view_through_window": "1",
          "limit_ad_tracking": "false"
        }
      }
    }

App 事件标签

GET accounts/:account_id/app_event_tags

检索与当前账户关联的部分或全部 App 事件标签的详细信息。 这些标签用于定义移动 App 转化跟踪中为各类转化类型配置的转化窗口。
资源 URL
https://ads-api.x.com/12/accounts/:account_id/app_event_tags
参数
名称说明
account_id
必填
被使用的账户标识符。该参数出现在资源路径中,通常对除 GET accounts 外的所有 Advertiser API 请求都是必需的。指定的账户必须与已认证用户关联。

Type: string

Example: 18ce54d4x5t
app_event_tag_ids
可选
通过指定以逗号分隔的标识符列表,仅返回所需的 App 事件标签。最多可提供 200 个 ID。

Type: string

Example: jhp
count
可选
指定每个独立请求尝试检索的记录数。

Type: int

Default: 200
Min, Max: 1, 1000
cursor
可选
指定用于获取下一页结果的游标。更多信息参见 分页

Type: string

Example: 8x7v00oow
sort_by
可选
按受支持的属性进行升序或降序排序。更多信息参见 排序

Type: string

Example: created_at-asc
with_deleted
可选
在请求中包含已删除的结果。

Type: boolean

Default: false
Possible values: true, false
with_total_count
可选
在响应中包含 total_count 属性。

注意:此参数与 cursor 互斥。

注意:包含 total_count 的请求将具有较低的请求速率限制,目前为每 15 分钟 200 次。

Type: boolean

Default: false
Possible values: true, false
示例请求
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/app_event_tags?app_event_tag_ids=jhp
示例响应
    {
      "request": {
        "params": {
          "app_event_tag_ids": [
            "jhp"
          ],
          "account_id": "18ce54d4x5t"
        }
      },
      "next_cursor": null,
      "data": [
        {
          "provider_app_event_name": null,
          "app_store_identifier": "co.vine.android",
          "post_view_attribution_window": 1,
          "deep_link_scheme": "vine://",
          "id": "jhp",
          "retargeting_enabled": true,
          "conversion_type": "INSTALL",
          "created_at": "2016-12-08T07:49:58Z",
          "post_engagement_attribution_window": 14,
          "provider_app_event_id": null,
          "last_tracked_at": "2021-05-22T17:00:04Z",
          "status": "TRACKING",
          "updated_at": "2016-12-08T23:07:54Z",
          "os_type": "ANDROID",
          "deleted": false
        }
      ]
    }

GET accounts/:account_id/app_event_tags/:app_event_tag_id

检索与当前账户关联的特定 App 事件标签。 这些标签用于定义移动应用转化跟踪中各转化类型的转化窗口设置。
资源 URL
https://ads-api.x.com/12/accounts/:account_id/app_event_tags/:app_event_tag_id
参数
名称说明
account_id
必填
所使用账户的标识符。该值出现在资源路径中,通常是除 GET accounts 外所有 Advertiser API 请求的必填参数。指定的账户必须与已认证用户关联。

Type: string

Example: 18ce54d4x5t
app_event_tag_id
必填
你在请求中所操作的 app event tag 的引用。

Type: string

Example: jhp
with_deleted
可选
在请求结果中包含已删除项。

Type: boolean

Default: false
Possible values: true, false

示例请求

GET https://ads-api.x.com/12/accounts/18ce54d4x5t/app_event_tags/jhp

示例响应

    {
      "request": {
        "params": {
          "app_event_tag_id": "jhp",
          "account_id": "18ce54d4x5t"
        }
      },
      "data": {
        "provider_app_event_name": null,
        "app_store_identifier": "co.vine.android",
        "post_view_attribution_window": 1,
        "deep_link_scheme": "vine://",
        "id": "jhp",
        "retargeting_enabled": true,
        "conversion_type": "INSTALL",
        "created_at": "2016-12-08T07:49:58Z",
        "post_engagement_attribution_window": 14,
        "provider_app_event_id": null,
        "last_tracked_at": "2021-05-22T17:00:04Z",
        "status": "TRACKING",
        "updated_at": "2016-12-08T23:07:54Z",
        "os_type": "ANDROID",
        "deleted": false
      }
    }

POST accounts/:account_id/app_event_tags

创建与当前账号关联的新 App 事件标签。
资源 URL
https://ads-api.x.com/12/accounts/:account_id/app_event_tags
参数
名称说明
account_id
必填
目标账户的标识符。出现在资源路径中,通常是除 GET accounts 之外所有 Advertiser API 请求的必需参数。指定的账户必须与已通过身份验证的用户关联。

Type: string

Example: 18ce54d4x5t
app_store_identifier
必填
应用商店标识符。

Type: string

Example: com.twitter.android
conversion_type
必填
转化事件类型。

Type: enum

Possible values: ACHIEVEMENT_UNLOCKED, ADDED_PAYMENT_INFO, ADD_TO_CART, ADD_TO_WISHLIST, CHECKOUT_INITIATED, CONTENT_VIEW, INSTALL, INVITE, LEVEL_ACHIEVED, LOGIN, PURCHASE, RATED, RESERVATION, RE_ENGAGE, SEARCH, SHARE, SIGN_UP, SPENT_CREDITS, TUTORIAL_COMPLETE, UPDATE
os_type
必填
应用的操作系统类型。

Type: enum

Possible values: IOS, ANDROID
provider_app_event_id
必填
提供商站点上的转化标签 ID。

Type: string

Example: provider_tag_j5394
provider_app_event_name
必填
提供商站点上的转化标签名称。

Type: string

Example: provider_name_a4382
deep_link_scheme
可选
指定与此标签关联的应用的深度链接 URI。

Type: string

Example: twitter://
post_engagement_attribution_window
可选
这些事件的互动后归因窗口。

Type: int

Default: 30
Possible values: 1, 7, 14, 30
post_view_attribution_window
可选
这些事件的曝光后归因窗口。

Type: int

Default: 1
Possible values: 0, 1, 7, 14, 30
retargeting_enabled
可选
指定是否为此应用事件标签启用重定向(再营销)。

Type: boolean

Default: true
Possible values: true, false
示例请求
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/app_event_tags?app_store_identifier=com.twitter.android&os_type=ANDROID&conversion_type=PURCHASE&provider_app_event_id=abc123&provider_app_event_name=test-tag
示例响应
    {
      "data": {
        "provider_app_event_name": "test-tag",
        "app_store_identifier": "com.twitter.android",
        "post_view_attribution_window": 1,
        "deep_link_scheme": "https://",
        "id": "3p3t",
        "retargeting_enabled": true,
        "conversion_type": "PURCHASE",
        "created_at": "2017-09-06T06:58:22Z",
        "post_engagement_attribution_window": 30,
        "provider_app_event_id": "abc123",
        "updated_at": "2017-09-06T06:58:22Z",
        "os_type": "ANDROID",
        "deleted": false
      },
      "request": {
        "params": {
          "provider_app_event_name": "test-tag",
          "app_store_identifier": "com.twitter.android",
          "account_id": "18ce54d4x5t",
          "conversion_type": "PURCHASE",
          "provider_app_event_id": "abc123",
          "os_type": "ANDROID"
        }
      }
    }

DELETE accounts/:account_id/app_event_tags/:id

删除当前账户所属的指定 App 事件标签。
资源 URL
https://ads-api.x.com/12/accounts/:account_id/app_event_tags/:id
参数
名称描述
account_id
必填
已借用账户的标识符。该参数出现在资源路径中,通常是除 GET accounts 外所有 Advertiser API 请求的必填参数。指定的账户必须与已通过身份验证的用户关联。

Type: string

Example: 18ce54d4x5t
id
必填
请求中所操作的 App 事件标签的引用。

Type: string

Example: jhp
示例请求
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/app_event_tags/jhp
示例响应
    {
      "data": {
        "provider_app_event_name": null,
        "app_store_identifier": "co.vine.android",
        "post_view_attribution_window": 1,
        "deep_link_scheme": "vine://",
        "id": "jhp",
        "retargeting_enabled": true,
        "conversion_type": "INSTALL",
        "created_at": "2016-12-08T07:49:58Z",
        "post_engagement_attribution_window": 14,
        "provider_app_event_id": null,
        "last_tracked_at": "2021-05-22T17:00:04Z",
        "status": "TRACKING",
        "updated_at": "2017-08-30T05:44:57Z",
        "os_type": "ANDROID",
        "deleted": true
      },
      "request": {
        "params": {
          "id": "jhp",
          "account_id": "5gvk9h"
        }
      }
    }

App 列表

GET accounts/:account_id/app_lists

获取与当前账户关联的部分或全部 App 列表的详细信息。
资源 URL
https://ads-api.x.com/12/accounts/:account_id/app_lists

参数

名称说明
account_id
必填
被使用账户的标识符。该标识符会出现在资源路径中,通常是除 GET accounts 外所有 Advertiser API 请求的必填参数。指定的账户必须与已认证用户关联。

Type: string

Example: 18ce54d4x5t
app_list_ids
可选
通过提供以逗号分隔的标识符列表,将响应限定为所需的 App 列表。最多可提供 200 个 ID。

Type: string

Example: wm7x
count
可选
指定每个请求尝试检索的记录数量。

Type: int

Default: 200
Min, Max: 1, 1000
cursor
可选
指定用于获取下一页结果的游标。更多信息参见 Pagination

Type: string

Example: 8x7v00oow
sort_by
可选
按受支持的属性进行升序或降序排序。更多信息参见 Sorting

Type: string

Example: created_at-asc
with_deleted
可选
在请求中包含已删除的结果。

Type: boolean

Default: false
Possible values: true, false
with_total_count
可选
包含 total_count 响应属性。

注意:此参数与 cursor 互斥。

注意:包含 total_count 的请求将受到更低的请求速率限制,目前为每 15 分钟 200 次。

Type: boolean

Default: false
Possible values: true, false
示例请求
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/app_lists?app_list_ids=wm7x
示例响应
    {
      "request": {
        "params": {
          "app_list_ids": [
            "wm7x"
          ],
          "account_id": "18ce54d4x5t"
        }
      },
      "next_cursor": null,
      "data": [
        {
          "id": "wm7x",
          "name": "foo @ 14026528192426843"
        }
      ]
    }

GET accounts/:account_id/app_lists/:app_list_id

获取与当前账户关联的特定 App 列表。
资源 URL
https://ads-api.x.com/12/accounts/:account_id/app_lists/:app_list_id
参数
名称说明
account_id
必填
目标账户的标识符。出现在资源路径中,通常是除 GET accounts 之外所有 Advertiser API 请求的必需参数。指定的账户必须与已验证用户关联。

Type: string

Example: 18ce54d4x5t
app_list_id
必填
在本次请求中所操作的 App 列表的引用。

Type: string

Example: 28ukf
with_deleted
可选
是否在响应中包含已删除的结果。

Type: boolean

Default: false
Possible values: true, false
示例请求
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/app_lists/28ukf
示例响应
    {
      "data": {
        "name": "twitter @ 262689209670784",
        "id": "28ukf",
        "created_at": "2017-08-17T17:07:42Z",
        "updated_at": "2017-08-17T17:07:42Z",
        "deleted": false,
        "apps": [
          {
            "app_store_identifier": "com.twitter.android",
            "os_type": "Android"
          }
        ]
      },
      "request": {
        "params": {
          "app_list_id": "28ukf",
          "account_id": "18ce54d4x5t"
        }
      }
    }

POST accounts/:account_id/app_lists

创建一个与当前账户关联的 app_list 目前,每个 account_id 最多可拥有 100 个 app_list 对象,每个 app_list 最多可包含 500 个 App。
资源 URL
https://ads-api.x.com/12/accounts/:account_id/app_lists
参数
名称说明
account_id
必填
所使用账户的标识符。出现在资源路径中,一般为除 GET accounts 外所有 Advertiser API 请求的必填参数。指定的账户必须与已通过认证的用户关联。

Type: string

Example: 18ce54d4x5t
app_store_identifiers
必填
要包含在 app_list 中的应用商店标识符。

Type: string

Example: com.twitter.android
name
必填
要为 app_list 指定的名称。

Type: string

Example: My First App List
示例请求
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/app_lists?name=app list&app_store_identifiers=com.twitter.android
示例响应
    {
      "data": {
        "name": "App 列表",
        "id": "2a4um",
        "created_at": "2017-09-06T07:17:26Z",
        "updated_at": "2017-09-06T07:17:26Z",
        "deleted": false,
        "apps": [
          {
            "app_store_identifier": "com.twitter.android",
            "os_type": "Android",
          }
        ]
      },
      "request": {
        "params": {
          "app_store_identifiers": [
            "com.twitter.android"
          ],
          "name": "App 列表",
          "account_id": "18ce54d4x5t"
        }
      }
    }

DELETE accounts/:account_id/app_lists/:app_list_id

删除当前账户关联的指定 App 列表。
资源 URL
https://ads-api.x.com/12/accounts/:account_id/app_lists/:app_list_id
参数
名称说明
account_id
必填
杠杆账户的标识符。该参数出现在资源路径中,通常是除 GET accounts 外所有 Advertiser API 请求的必填参数。指定的账户必须与已认证用户关联。

Type: string

Example: 18ce54d4x5t
app_list_id
必填
在本次请求中所操作的 App 的 List 的引用。

Type: string

Example: 28ukf
示例请求
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/app_lists/28ukf
示例响应
    {
      "data": {
        "name": "twitter @ 262689209670784",
        "id": "28ukf",
        "created_at": "2017-08-17T17:07:42Z",
        "updated_at": "2017-09-12T22:20:33Z",
        "deleted": true,
        "apps": [
          {
            "app_store_identifier": "com.twitter.android",
            "os_type": "Android"
          }
        ]
      },
      "request": {
        "params": {
          "app_list_id": "28ukf",
          "account_id": "18ce54d4x5t"
        }
      }
    }

App 事件提供商配置

GET accounts/:account_id/app_event_provider_configurations

获取与当前账户关联的部分或全部 App 事件提供商配置(移动应用转化跟踪的核心配置)的详细信息。
资源 URL
https://ads-api.x.com/11/accounts/:account_id/app_event_provider_configurations
参数
名称说明
account_id
必填
被调用(使用)的账户标识符。该值出现在资源路径中,通常是除 GET accounts 之外所有 Advertiser API 请求的必需参数。指定的账户必须与已认证用户关联。

Type: string

Example: 18ce54d4x5t
count
可选
指定每个请求尝试检索的记录数。

Type: int

Default: 200
Min, Max: 1, 1000
cursor
可选
指定用于获取下一页结果的游标。参见 Pagination 以了解更多信息。

Type: string

Example: 8x7v00oow
ids
可选
通过指定以逗号分隔的标识符列表,将响应限定为所需的配置。最多可提供 200 个 ID。

Type: string

Example: 25n
sort_by
可选
按受支持的属性进行升序或降序排序。参见 Sorting 以了解更多信息。

Type: string

Example: created_at-asc
with_deleted
可选
在请求中包含已删除的结果。

Type: boolean

Default: false
Possible values: true, false
with_total_count
可选
在响应中包含 total_count 属性。

注意:此参数与 cursor 互斥。

注意:包含 total_count 的请求将适用较低的请求速率限制,当前为每 15 分钟 200 次。

Type: boolean

Default: false
Possible values: true, false
示例请求
GET https://ads-api.x.com/11/accounts/18ce54d4x5t/app_event_provider_configurations?ids=25n
示例响应
    {
      "data": [
        {
          "provider_name": "Fabric 驱动的 Answers",
          "id": "25n",
          "provider_advertiser_id": "54ac2766f0de9e1f7a00001a",
          "created_at": "2016-12-08T07:49:58Z",
          "provider_advertiser_identifier": "54ac2766f0de9e1f7a00001a",
          "updated_at": "2017-05-12T21:37:15Z",
          "deleted": false
        }
      ],
      "next_cursor": null,
      "request": {
        "params": {
          "ids": [
            "25n"
          ],
          "account_id": "18ce54d4x5t"
        }
      }
    }

GET accounts/:account_id/app_event_provider_configurations/:id

检索与当前账户关联的事件提供方配置(移动应用转化跟踪的核心配置)的特定 id。
资源 URL
https://ads-api.x.com/11/accounts/:account_id/app_event_provider_configurations/:id
参数
名称描述
account_id
必填
目标账户的标识符。出现在资源路径中,通常是除 GET accounts 之外所有 Advertiser API 请求的必填参数。指定的账户必须与已认证用户关联。

Type: string

Example: 18ce54d4x5t
id
必填
你在请求中使用的 App 事件提供方配置的引用。

Type: string

Example: 25n
with_deleted
可选
在请求中包含已删除的结果。

Type: boolean

Default: false
Possible values: true, false
示例请求
GET https://ads-api.x.com/11/accounts/18ce54d4x5t/app_event_provider_configurations/25n
示例响应
    {
      "data_type": "App 事件提供商配置",
      "data": {
        "provider_name": "API McTestface",
        "id": "25n",
        "provider_advertiser_id": "123",
        "created_at": "2017-03-24T22:24:56Z",
        "provider_advertiser_identifier": "123",
        "updated_at": "2017-03-24T22:24:56Z",
        "deleted": false
      },
      "request": {
        "params": {
          "id": "25n",
          "account_id": "18ce54d4x5t"
        }
      }
    }
POST accounts/:account_id/app_event_provider_configurations
创建一个与当前账户关联的 App 事件提供商配置。每个广告账户最多只能关联一个 MACT 提供商。
资源 URL
https://ads-api.x.com/11/accounts/:account_id/app_event_provider_configurations
参数
名称描述
account_id
必填
目标账户的标识符。出现在资源路径中,通常是除 GET accounts 外所有 Advertiser API 请求的必填参数。指定的账户必须与已通过身份验证的用户关联。

Type: string

Example: 18ce54d4x5t
provider_advertiser_id
必填
来自提供方站点的广告主标识符。

Type: string

Example: client1
示例请求
POST https://ads-api.x.com/11/accounts/18ce54d4x5t/app_event_provider_configurations?provider_advertiser_id=client1
示例响应
    {
      "data": {
        "provider_name": "InternalTestProvider",
        "id": "e5g",
        "provider_advertiser_id": "client1",
        "created_at": "2017-08-30T05:40:07Z",
        "provider_advertiser_identifier": "client1",
        "updated_at": "2017-09-06T06:39:03Z",
        "deleted": false
      },
      "request": {
        "params": {
          "provider_advertiser_id": "client1",
          "account_id": "18ce54d4x5t"
        }
      }
    }

DELETE accounts/:account_id/app_event_provider_configurations/:id[¶]

删除当前账户所属的指定 App 事件提供方配置。
资源 URL
https://ads-api.x.com/11/accounts/:account_id/app_event_provider_configurations/:id
参数
名称说明
account_id
必填
已授权账户的标识符。出现在资源路径中,通常对除 GET accounts 之外的所有 Advertiser API 请求都是必需参数。指定的账户必须与已通过身份验证的用户关联。

Type: string

Example: 18ce54d4x5t
id
必填
请求中所使用的 App 事件提供商配置的引用。

Type: string

Example: e5g
示例请求
DELETE https://ads-api.x.com/11/accounts/18ce54d4x5t/app_event_provider_configurations/e5g
示例响应
    {
      "data": {
        "provider_name": "InternalTestProvider",
        "id": "e5g",
        "provider_advertiser_id": "client1",
        "created_at": "2017-08-30T05:40:07Z",
        "provider_advertiser_identifier": "client1",
        "updated_at": "2017-08-30T05:40:26Z",
        "deleted": true
      },
      "request": {
        "params": {
          "id": "e5g",
          "account_id": "18ce54d4x5t"
        }
      }
    }

转化归因

GET conversion_attribution

在不写入转化事件的情况下,向 X 发起查询以检查转化归因。响应将指示 X 的归因结果。 这与 POST conversion_event endpoint 相关。 响应中将可能声明 X、TAP 或无归因。当没有 X 归因时,twitter_attribution 节点将始终存在且其值为 null;当存在 X 归因时,该节点会如下面的示例响应所示被填充。如果声明了 TAP 归因,则会出现一个 tpn_attribution 节点并相应填充。有关更多信息,请参阅 TAP 概览
资源 URL
https://ads-api.x.com/12/conversion_attribution
参数
名称描述
app_id
必填
与相应应用商店关联的唯一标识符。

Type: int, string

示例: 333903271, com.vine.android
conversion_time
必填
转化事件的时间,采用 ISO‑8601 时间戳格式,并包含毫秒。

Type: string

示例: 2014-05-22T02:38:28.103Z
conversion_type
必填
转化事件的类型。

Type: enum

可能的取值: ACHIEVEMENT_UNLOCKED, ADDED_PAYMENT_INFO, ADD_TO_CART, ADD_TO_WISHLIST, CHECKOUT_INITIATED, CONTENT_VIEW, INSTALL, INVITE, LEVEL_ACHIEVED, LOGIN, PURCHASE, RATED, RESERVATION, RE_ENGAGE, SEARCH, SHARE, SIGN_UP, SPENT_CREDITS, TUTORIAL_COMPLETE, UPDATE
hashed_device_id
必填
采用 HMAC_SHA-256 计算的 IDFA 或 AdID 的哈希值。

Type: string

示例: ABCD1234XYZ
os_type
必填
该 App 的操作系统类型。

Type: enum

可能的取值: IOS, ANDROID
click_window
可选
此事件的点击回溯窗口(按天)。

Type: int

默认值: 14
可能的取值: 1, 7, 14, 30
extra_device_ids
可选
对传入 hashed_device_id 的设备 ID 先做 SHA1 再做 SHA256 的哈希值,以及任何其他已哈希的设备 ID。

Type: string

示例: ABCD1234XYZ, DCBA4321XYZ
non_twitter_engagement_time
可选
转化前最近一次非 Twitter 触达/互动的时间。

Type: string

示例: 2014-05-22T02:38:28.103Z
non_twitter_engagement_type
可选
转化事件前的非 Twitter 触达/互动类型。

Type: enum

可能的取值: CLICK, VIEW
view_through_window
可选
此事件的曝光回溯窗口(按天)。

Type: int

默认值: 1
可能的取值: 0, 1, 7, 14, 30
示例请求
GET https://ads-api.x.com/12/conversion_attribution?app_id=333903271&os_type=IOS&hashed_device_id=ABCD1234XYZ&conversion_type=INSTALL&conversion_time=2013-04-16T07:00:00.123Z&click_window=14&view_through_window=0
示例响应
    {
      data:{
        "app_id":"333903271",
        "os_type":"IOS",
        "hashed_device_id":"ABCD1234XYZ",
        "conversion_type":"安装",
        "partner_client_id":"123abc",
        "conversion_time":"2013-04-16T07:00:00.123Z",
        "click_window":14,
        "view_through_window":0,
        "extra_device_ids":null,
        "twitter_attribution":{
          "engagement_type":"曝光",
          "engagement_time":"2013-04-16T07:00:00.123Z",
          "country_code":"US",
          "tweet_id":"383034667764441088",
          "attribution_type":"推广",
          "promoted_properties":{
            "campaign_id”: “54a21",
            "campaign_name":"Vine_Contest",
            "line_item_id":"23ab2d4"
          }
        }
      },
      "data_type":"转化归因"
      "request":{
        "params":{
          "app_id":"333903271",
          "os_type":"IOS",
          "hashed_device_id":"ABCD1234XYZ",
          "conversion_time":"2013-04-16T07:00:00.123Z",
          "conversion_type":"INSTALL",
          "click_window":14,
          "view_through_window":0
        }
      }
    }
I