MACT の概要
Conversion Events
APIリファレンス
コンバージョンイベント
POST conversion_event
twitter_attribution ノードは常に存在し、X のアトリビューションがない場合は値が null になります (以下のレスポンス例を参照してください) 。TAP のアトリビューションが付与される場合は、tpn_attribution ノードが存在し、適切な値が設定されます。詳細については TAP overview を参照してください。
各コンバージョンイベントに関連付けるメタデータを設定するために使用できるオプションパラメータがいくつかあります。これらのメタデータは、アトリビューション計算には影響しません。
リソースURL
https://ads-api.x.com/12/conversion_event
パラメーター
| Name | Description |
|---|---|
| app_id required | 対応するアプリストアにおける一意の識別子。 Type: int, string Example: 333903271, com.vine.android |
| conversion_time required | コンバージョンイベントの発生時刻。ミリ秒付きの ISO-8601 タイムスタンプ形式。 Type: string Example: 2014-05-22T02:38:28.103Z |
| conversion_type required | コンバージョンイベントの種別。 Type: enum Possible values: PURCHASE, SIGN_UP, INSTALL, RE_ENGAGE, UPDATE, TUTORIAL_COMPLETE, RESERVATION, ADD_TO_CART, ADD_TO_WISHLIST, LOGIN, CHECKOUT_INITIATED, SEARCH, LEVEL_ACHIEVED, ACHIEVEMENT_UNLOCKED, CONTENT_VIEW, SHARE, INVITE, ADDED_PAYMENT_INFO, SPENT_CREDITS, RATED |
| hashed_device_id required | HMAC_SHA-256 でハッシュ化された IDFA または AdID。 Type: string Example: ABCD1234XYZ |
| os_type required | App の OS の種別。 Type: enum Possible values: IOS, ANDROID |
| click_window optional | このイベントに対するクリック計測期間 (日数) 。 Type: int Note: click_window は view_through_window 以上である必要があります。Default: 14 Possible values: 1, 7, 14, 30 |
| device_ip_address optional | コンバージョンイベント発生時のデバイスの IPv4 または IPv6 アドレス。 Type: string Example: 192.133.78.1 |
| level optional | このイベントに関連付けられたレベル。 Type: int Example: 2 |
| non_twitter_engagement_time optional | コンバージョン前の、直近の X 以外でのエンゲージメントの時刻。 Type: string Example: 2014-05-22T02:38:28.103Z |
| non_twitter_engagement_type optional | コンバージョンイベント前の、X 以外でのエンゲージメントの種別。 Type: enum Possible values: CLICK, VIEW |
| number_items optional | このイベントに関連付けられたアイテム数。 Type: int Example: 2 |
| price_currency optional | このイベントに紐づく通貨を示す ISO 4217 コード。 Type: String Examples: EUR,USD,JPY |
| price_micro optional | このイベントに関連付けられた価格 (マイクロ単位) 。 Type: int Example: 123450000 |
| user_payment_info optional | このイベントに関連付けられた App にユーザーの支払い情報が保存されているかどうかを示す boolean 値。 Type: bool Possible values: true or false |
| view_through_window optional | このイベントのビュー計測期間 (日数) 。 Note: click_window は view_through_window 以上である必要があります。Type: int Default: 1 Possible values: 0, 1, 7, 14, 30 |
リクエスト例
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
レスポンス例
リソース URL
https://ads-api.x.com/12/accounts/:account_id/app_event_tags
Parameters
| Name | Description |
|---|---|
| account_id required | 対象となるアカウントの識別子です。リソースのパス内に含まれ、GET accounts を除くすべての Advertiser API リクエストで一般的に必須のパラメータです。指定されたアカウントは認証済みユーザーに関連付けられている必要があります。 Type: string Example: 18ce54d4x5t |
| app_event_tag_ids optional | コンマ区切りの識別子のリストを指定することで、レスポンスを希望する App イベントタグのみに絞り込みます。最大 200 個の ID を指定できます。 Type: string Example: jhp |
| count optional | 各リクエストごとに取得を試みるレコード数を指定します。 Type: int Default: 200 Min, Max: 1, 1000 |
| cursor optional | 次のページの結果を取得するためのカーソルを指定します。詳細は Pagination を参照してください。 Type: string Example: 8x7v00oow |
| sort_by optional | サポートされている属性で、昇順または降順にソートします。詳細は Sorting を参照してください。 Type: string Example: created_at-asc |
| with_deleted optional | リクエストに削除済みの結果を含めます。 Type: boolean Default: false Possible values: true, false |
| with_total_count optional | total_count レスポンス属性を含めます。Note: このパラメータと cursor は排他的です。Note: 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
レスポンス例
リソース URL
https://ads-api.x.com/12/accounts/:account_id/app_event_tags/:app_event_tag_id
パラメーター
| Name | Description |
|---|---|
| account_id required | レバレッジド・アカウントの識別子です。リソースのパス内に含まれ、GET accounts を除くすべての Advertiser API リクエストで通常必須のパラメーターです。指定されたアカウントは、認証済みユーザーに関連付けられている必要があります。 Type: string Example: 18ce54d4x5t |
| app_event_tag_id required | リクエスト内で操作対象となる app event tag への参照です。 Type: string Example: jhp |
| with_deleted optional | リクエストに削除済みの結果を含めます。 Type: boolean Default: false Possible values: true, false |
リクエスト例
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/app_event_tags/jhp
レスポンス例
リソース URL
https://ads-api.x.com/12/accounts/:account_id/app_event_tags
パラメーター
| Name | Description |
|---|---|
| account_id required | 対象アカウントの識別子。リソースのパス内に含まれ、GET accounts を除くすべての Advertiser API リクエストで一般的に必須パラメーターです。指定されたアカウントは、認証済みユーザーに関連付けられている必要があります。 Type: string Example: 18ce54d4x5t |
| app_store_identifier required | アプリストアの識別子。 Type: string Example: com.twitter.android |
| conversion_type required | コンバージョンイベントの種別。 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 required | App の OS 種別。 Type: enum Possible values: IOS, ANDROID |
| provider_app_event_id required | プロバイダーのサイト上のコンバージョンタグの ID。 Type: string Example: provider_tag_j5394 |
| provider_app_event_name required | プロバイダーのサイト上のコンバージョンタグの名前。 Type: string Example: provider_name_a4382 |
| deep_link_scheme optional | このタグに関連付けられた App のディープリンク URI を指定します。 Type: string Example: twitter:// |
| post_engagement_attribution_window optional | これらのイベントのポストエンゲージメント用アトリビューションウィンドウを指定します。 Type: int Default: 30 Possible values: 1, 7, 14, 30 |
| post_view_attribution_window optional | これらのイベントのポストビュー用アトリビューションウィンドウを指定します。 Type: int Default: 1 Possible values: 0, 1, 7, 14, 30 |
| retargeting_enabled optional | この App イベントタグに対してリターゲティングを有効にするかどうかを指定します。 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
レスポンス例
リソースURL
https://ads-api.x.com/12/accounts/:account_id/app_event_tags/:id
Parameters
| Name | Description |
|---|---|
| account_id required | レバレッジド・アカウントの識別子です。リソースのパス内に含まれ、GET accounts を除くすべての Advertiser API リクエストで原則として必須のパラメータです。指定されたアカウントは認証済みユーザーに関連付けられている必要があります。 Type: string Example: 18ce54d4x5t |
| id required | リクエストで操作対象となる App Event Tag への参照です。 Type: string Example: jhp |
リクエスト例
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/app_event_tags/jhp
レスポンスの例
App リスト
GET accounts/:account_id/app_lists
リソース URL
https://ads-api.x.com/12/accounts/:account_id/app_lists
Parameters
| Name | Description |
|---|---|
| account_id required | 利用するアカウントの識別子です。リソースのパス内に含まれ、GET accounts を除くすべての Advertiser API リクエストで通常、必須パラメータとなります。指定されたアカウントは、認証済みユーザーに関連付けられている必要があります。 Type: string Example: 18ce54d4x5t |
| app_list_ids optional | カンマ区切りの識別子のリストを指定することで、レスポンスを指定した App リストのみに絞り込みます。最大で 200 個の ID を指定できます。 Type: string Example: wm7x |
| count optional | 各リクエストごとに取得を試みるレコード数を指定します。 Type: int Default: 200 Min, Max: 1, 1000 |
| cursor optional | 結果の次のページを取得するためのカーソルを指定します。詳細は Pagination を参照してください。 Type: string Example: 8x7v00oow |
| sort_by optional | サポートされている属性を指定し、昇順または降順でソートします。詳細は Sorting を参照してください。 Type: string Example: created_at-asc |
| with_deleted optional | リクエストに削除済みの結果を含めます。 Type: boolean Default: false Possible values: true, false |
| with_total_count optional | レスポンスに total_count 属性を含めます。Note: このパラメータと cursor は同時には使用できません。Note: 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
レスポンス例
GET accounts/:account_id/app_lists/:app_list_id
リソース URL
https://ads-api.x.com/12/accounts/:account_id/app_lists/:app_list_id
パラメーター
| Name | Description |
|---|---|
| account_id required | 対象アカウントを識別する ID です。リソースのパス内に含まれ、GET accounts を除くすべての Advertiser API リクエストで通常必須となるパラメーターです。指定されたアカウントは、認証済みユーザーに関連付けられている必要があります。 Type: string Example: 18ce54d4x5t |
| app_list_id required | リクエストで操作する App リストへの参照です。 Type: string Example: 28ukf |
| with_deleted optional | 削除済みの結果を含めるかどうかを指定します。 Type: boolean Default: false Possible values: true, false |
リクエスト例
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/app_lists/28ukf
レスポンス例
POST accounts/:account_id/app_lists
app_list を作成します。
account_id ごとに app_list オブジェクトは最大 100 個まで、また app_list ごとに App は最大 500 個まで作成できます。
リソース URL
https://ads-api.x.com/12/accounts/:account_id/app_lists
Parameters
| Name | Description |
|---|---|
| account_id required | 利用するアカウントを識別する ID です。リソースのパス内に含まれ、GET accounts を除くすべての Advertiser API リクエストで通常必須のパラメータです。指定したアカウントは認証済みユーザーに関連付けられている必要があります。 Type: string Example: 18ce54d4x5t |
| app_store_identifiers required | app_list に含めるアプリストアの識別子です。Type: string Example: com.twitter.android |
| name required | 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
レスポンス例
DELETE accounts/:account_id/app_lists/:app_list_id
リソースURL
https://ads-api.x.com/12/accounts/:account_id/app_lists/:app_list_id
パラメータ
| Name | Description |
|---|---|
| account_id required | 対象アカウントの識別子です。リソースのパスに含まれ、GET accounts を除くすべての Advertiser API リクエストで、一般に必須パラメータとなります。指定したアカウントは、認証済みユーザーに紐づいている必要があります。 Type: string Example: 18ce54d4x5t |
| app_list_id required | このリクエストで操作する App リストを示します。 Type: string Example: 28ukf |
リクエスト例
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/app_lists/28ukf
レスポンスの例
App イベントプロバイダー構成
リソース URL
https://ads-api.x.com/11/accounts/:account_id/app_event_provider_configurations
Parameters
| Name | Description |
|---|---|
| account_id required | 対象となるアカウントの識別子です。リソースのパス内に含まれ、GET accounts を除くすべての Advertiser API リクエストで通常必須のパラメータです。指定されたアカウントは、認証済みユーザーに関連付けられている必要があります。 Type: string Example: 18ce54d4x5t |
| count optional | 1 回のリクエストごとに取得を試みるレコード数を指定します。 Type: int Default: 200 Min, Max: 1, 1000 |
| cursor optional | 次のページの結果を取得するためのカーソルを指定します。詳細は Pagination を参照してください。 Type: string Example: 8x7v00oow |
| ids optional | 識別子のカンマ区切りリストを指定して、レスポンスを指定した設定のみに絞り込みます。最大 200 個の ID を指定できます。 Type: string Example: 25n |
| sort_by optional | サポートされている属性を基準に、昇順または降順でソートします。詳細は Sorting を参照してください。 Type: string Example: created_at-asc |
| with_deleted optional | リクエストに削除済みの結果を含めます。 Type: boolean Default: false Possible values: true, false |
| with_total_count optional | レスポンスに 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
レスポンス例
GET accounts/:account_id/app_event_provider_configurations/:id
リソース URL
https://ads-api.x.com/11/accounts/:account_id/app_event_provider_configurations/:id
パラメーター
| Name | Description |
|---|---|
| account_id required | 対象となるアカウントを識別するための識別子です。リソースのパス内に含まれ、GET accounts を除くすべての Advertiser API リクエストで必須となるパラメーターです。指定したアカウントは認証済みユーザーに関連付けられている必要があります。 Type: string Example: 18ce54d4x5t |
| id required | リクエスト内で操作対象とする app event provider configuration を参照するものです。 Type: string Example: 25n |
| with_deleted optional | 削除済みの結果をリクエストに含めます。 Type: boolean Default: false Possible values: true, false |
リクエスト例
GET https://ads-api.x.com/11/accounts/18ce54d4x5t/app_event_provider_configurations/25n
レスポンス例
POST accounts/:account_id/app_event_provider_configurations
リソース URL
https://ads-api.x.com/11/accounts/:account_id/app_event_provider_configurations
Parameters
| Name | Description |
|---|---|
| account_id required | レバレッジドアカウントの識別子です。リソースのパス内に含まれ、GET accounts を除くすべての Advertiser API リクエストで通常必須のパラメータです。指定されたアカウントは、認証済みユーザーに関連付けられている必要があります。 Type: string Example: 18ce54d4x5t |
| provider_advertiser_id required | プロバイダーのサイト上での広告主の識別子です。 Type: string Example: client1 |
リクエスト例
POST https://ads-api.x.com/11/accounts/18ce54d4x5t/app_event_provider_configurations?provider_advertiser_id=client1
レスポンス例
DELETE accounts/:account_id/app_event_provider_configurations/:id[¶]
リソース URL
https://ads-api.x.com/11/accounts/:account_id/app_event_provider_configurations/:id
Parameters
| Name | Description |
|---|---|
| account_id required | 利用するアカウントの識別子です。リソースのパス内に含まれ、GET accounts を除くすべての Advertiser API リクエストで通常必須となるパラメーターです。指定されたアカウントは、認証済みユーザーに関連付けられている必要があります。 Type: string Example: 18ce54d4x5t |
| id required | このリクエストで操作対象としている app event provider 構成を参照する id です。 Type: string Example: e5g |
リクエスト例
DELETE https://ads-api.x.com/11/accounts/18ce54d4x5t/app_event_provider_configurations/e5g
レスポンス例
コンバージョンアトリビューション
GET conversion_attribution
twitter_attribution ノードは常に存在し、X アトリビューションがない場合は null が設定され、下記の例のレスポンスのように値が設定されます。TAP アトリビューションが付与される場合は、tpn_attribution ノードが存在し、適切な値が設定されます。詳細については TAP overview を参照してください。
リソース URL
https://ads-api.x.com/12/conversion_attribution
Parameters
| Name | Description |
|---|---|
| app_id required | 対応するアプリストアにおける一意の識別子。 Type: int, string Example: 333903271, com.vine.android |
| conversion_time required | ISO-8601 タイムスタンプ形式 (ミリ秒付き) でのコンバージョンイベントの発生時刻。 Type: string Example: 2014-05-22T02:38:28.103Z |
| conversion_type required | コンバージョンイベントの種別。 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 |
| hashed_device_id required | HMAC_SHA-256 でハッシュ化された IDFA または AdID。 Type: string Example: ABCD1234XYZ |
| os_type required | App の OS の種別。 Type: enum Possible values: IOS, ANDROID |
| click_window optional | このイベントのクリック計測ウィンドウ (日数) 。 Type: int Default: 14 Possible values: 1, 7, 14, 30 |
| extra_device_ids optional | hashed_device_id で渡された device ID に対しまず SHA1 を適用し、その結果をさらに SHA256 でハッシュ化した値と、追加のハッシュ化済み device ID。Type: string Example: ABCD1234XYZ, DCBA4321XYZ |
| non_twitter_engagement_time optional | コンバージョン前の直近の Twitter 以外のエンゲージメントの時刻。 Type: string Example: 2014-05-22T02:38:28.103Z |
| non_twitter_engagement_type optional | コンバージョンイベント前の Twitter 以外のエンゲージメントの種別。 Type: enum Possible values: CLICK, VIEW |
| view_through_window optional | このイベントのビュースルー計測ウィンドウ (日数) 。 Type: int Default: 1 Possible values: 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