> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# モバイルコンバージョン

> X の mobile app promotion 計測により、広告主は install やその他のアプリ内アクションを促進する X 上の広告キャンペーンの成果を追跡できます。

export const Button = ({href, children}) => {
  return <div className="not-prose">
    <a href={href}>
      <button className="x-btn">
        <span>{children}</span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

## MACT の概要

X の [mobile app promotion](https://biz.x.com/mobile-app-promotion) 計測により、広告主は install やその他のアプリ内コンバージョンを促進する X 上の広告キャンペーンの成果を追跡できます。X の mobile measurement partner は、広告主が X 上でプロモートしているアプリからどのコンバージョンを追跡するかを管理できるようにします。追跡したいイベントのタイプと time window を設定すると、mobile measurement partner は X にすべてのイベントを送信し、コンバージョンを促進するためにユーザーがエンゲージしたキャンペーンとクリエイティブを示す attribution データを即座に受け取ります。

### Conversion Event

[conversion event](https://developer.x.com/en/docs/x-ads-api/measurement/api-reference/conversion-event) を X にレポートして attribution データを取得するために、パートナーは mobile app ID、コンバージョンのタイプとタイムスタンプ、および advertising/device ID のハッシュ値を送信する必要があります。このデータを提供することで、X プラットフォーム上に conversion event が記録され、必要に応じて attribution も返されます。さらに、広告主は、購入額、製品 ID、登録方法などの conversion event に関する追加メタデータを任意で提供できます。

## API リファレンス

### Conversion Event

<Button href="https://app.getpostman.com/run-collection/1d12b9fc623b8e149f87">
  Postman で実行
</Button>

#### POST conversion\_event

mobile measurement の conversion event を記録します。レスポンスには X または X Audience Platform (TAP) の attribution が示されます。

これは [GET conversion\_attribution](https://developer.x.com/en/docs/x-ads-api/measurement/api-reference/conversion-attribution#get-conversion-attribution) エンドポイントに関連します。

レスポンスでは、X、TAP、または no attribution のいずれかがクレームされます。`twitter_attribution` ノードは常に存在し、X の attribution がない場合は値が `null` になります(下のレスポンス例を参照)。TAP の attribution がクレームされる場合、`tpn_attribution` ノードが存在し、それに応じて値が設定されます。詳細は [TAP overview](https://developer.x.com/en/docs/x-ads-api/measurement/overview/twitter-audience-platform) を参照してください。

各 conversion event に関連するメタデータを設定するために、いくつかのオプションパラメーターが利用可能です。このメタデータは attribution の計算には影響しません。

##### リソース URL

`https://ads-api.x.com/12/conversion_event`

##### パラメーター

| Name                                             | Description                                                                                                                                                                                                                                                                                                                                                                         |
| :----------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| app\_id  <br />*required*                        | The unique identifier with the corresponding app store.<br /><br />Type: int, string<br /><br />Example: `333903271`, `com.vine.android`                                                                                                                                                                                                                                            |
| conversion\_time  <br />*required*               | The time of the conversion event in an ISO-8601 timestamp format, with milliseconds appended.<br /><br />Type: string<br /><br />Example: `2014-05-22T02:38:28.103Z`                                                                                                                                                                                                                |
| conversion\_type  <br />*required*               | The type of conversion event.<br /><br />Type: enum<br /><br />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  <br />*required*             | The HMAC\_SHA-256 hashed IDFA or AdID.<br /><br />Type: string<br /><br />Example: `ABCD1234XYZ`                                                                                                                                                                                                                                                                                    |
| os\_type  <br />*required*                       | The OS type for the app.<br /><br />Type: enum<br /><br />Possible values: `IOS`, `ANDROID`                                                                                                                                                                                                                                                                                         |
| click\_window  <br />*optional*                  | The click window for this event in days.<br /><br />Type: int<br /><br />**Note**: `click_window` must be greater than or equal to view\_through\_window<br /><br />Default: `14`  <br />Possible values: `1`, `7`, `14`, `30`                                                                                                                                                      |
| device\_ip\_address  <br />*optional*            | IPv4 or IPv6 address of the device when the conversion event happened.<br /><br />Type: string<br /><br />Example: `192.133.78.1`                                                                                                                                                                                                                                                   |
| level  <br />*optional*                          | A level associated with this event.<br /><br />Type: int<br /><br />Example: `2`                                                                                                                                                                                                                                                                                                    |
| non\_twitter\_engagement\_time  <br />*optional* | The time of the last non-twitter engagement prior to the conversion.<br /><br />Type: string<br /><br />Example: `2014-05-22T02:38:28.103Z`                                                                                                                                                                                                                                         |
| non\_twitter\_engagement\_type  <br />*optional* | The type of non-twitter engagement prior to the conversion event.<br /><br />Type: enum<br /><br />Possible values: `CLICK`, `VIEW`                                                                                                                                                                                                                                                 |
| number\_items  <br />*optional*                  | Number of items associated with this event.<br /><br />Type: int<br /><br />Example: `2`                                                                                                                                                                                                                                                                                            |
| price\_currency  <br />*optional*                | Expected to be an ISO 4217 code to indicate the currency associated with this event.<br /><br />Type: String<br /><br />Examples: `EUR`,`USD`,`JPY`                                                                                                                                                                                                                                 |
| price\_micro  <br />*optional*                   | A price amount associated to this event in micro.<br /><br />Type: int<br /><br />Example: `123450000`                                                                                                                                                                                                                                                                              |
| user\_payment\_info  <br />*optional*            | A boolean value to indicate if the user’s payment information is stored in the app associated with this event.<br /><br />Type: bool<br /><br />Possible values: `true` or `false`                                                                                                                                                                                                  |
| view\_through\_window  <br />*optional*          | The view through window for this event in days.<br /><br />**Note**:<br /><br />`click_window` must be greater than or equal to view\_through\_window.<br /><br />Type: int<br /><br />Default: `1`  <br />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`

##### レスポンス例

```json title="Example response" expandable lines wrap icon="https://mintcdn.com/x-preview/Vn2KEkZaPF9LiPi3/icons/xds/icon-brackets.svg?fit=max&auto=format&n=Vn2KEkZaPF9LiPi3&q=85&s=ed2428e77bab43e57800e1a590e982fa" theme={null}
    {
      "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 contact 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 Event Tag

<Button href="https://app.getpostman.com/run-collection/1d12b9fc623b8e149f87">
  Run in Postman
</Button>

#### GET accounts/:account\_id/app\_event\_tags

current account に関連付けられた app event tag の一部またはすべての詳細を取得します。

これらは、Mobile App Conversion Tracking の各 conversion type ごとに設定される conversion window を定義するものです。

##### Resource URL

`https://ads-api.x.com/12/accounts/:account_id/app_event_tags`

##### Parameters

| Name                                   | Description                                                                                                                                                                                                                                                                                                                                                     |
| :------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| account\_id  <br />*required*          | The identifier for the leveraged account. Appears within the resource's path and is generally a required parameter for all Advertiser API requests excluding [GET accounts](/x-ads-api/campaign-management/reference#accounts). The specified account must be associated with the authenticated user.<br /><br />Type: string<br /><br />Example: `18ce54d4x5t` |
| app\_event\_tag\_ids  <br />*optional* | Scope the response to just the desired app event tags by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.<br /><br />Type: string<br /><br />Example: `jhp`                                                                                                                                                                     |
| count  <br />*optional*                | Specifies the number of records to try and retrieve per distinct request.<br /><br />Type: int<br /><br />Default: `200`  <br />Min, Max: `1`, `1000`                                                                                                                                                                                                           |
| cursor  <br />*optional*               | Specifies a cursor to get the next page of results. See [Pagination](/x-ads-api/introduction) for more information.<br /><br />Type: string<br /><br />Example: `8x7v00oow`                                                                                                                                                                                     |
| sort\_by  <br />*optional*             | Sorts by supported attribute in ascending or descending order. See [Sorting](/x-ads-api/fundamentals/sorting) for more information.<br /><br />Type: string<br /><br />Example: `created_at-asc`                                                                                                                                                                |
| with\_deleted  <br />*optional*        | Include deleted results in your request.<br /><br />Type: boolean<br /><br />Default: `false`  <br />Possible values: `true`, `false`                                                                                                                                                                                                                           |
| with\_total\_count  <br />*optional*   | Include the `total_count` response attribute.<br /><br />**Note**: This parameter and `cursor` are exclusive.<br /><br />**Note**: Requests which include `total_count` will have lower rate limits, currently set at 200 per 15 minutes.<br /><br />Type: boolean<br /><br />Default: `false`  <br />Possible values: `true`, `false`                          |

##### リクエスト例

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

##### レスポンス例

```json title="Example response" expandable lines wrap icon="https://mintcdn.com/x-preview/Vn2KEkZaPF9LiPi3/icons/xds/icon-brackets.svg?fit=max&auto=format&n=Vn2KEkZaPF9LiPi3&q=85&s=ed2428e77bab43e57800e1a590e982fa" theme={null}
    {
      "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

current account に関連付けられた特定の app event tag を取得します。

These are what define the conversion windows set up per each conversion type for Mobile App Conversion Tracking.

##### Resource URL

`https://ads-api.x.com/12/accounts/:account_id/app_event_tags/:app_event_tag_id`

##### Parameters

| Name                                  | Description                                                                                                                                                                                                                                                                                                                                                     |
| :------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| account\_id  <br />*required*         | The identifier for the leveraged account. Appears within the resource's path and is generally a required parameter for all Advertiser API requests excluding [GET accounts](/x-ads-api/campaign-management/reference#accounts). The specified account must be associated with the authenticated user.<br /><br />Type: string<br /><br />Example: `18ce54d4x5t` |
| app\_event\_tag\_id  <br />*required* | A reference to the app event tag you are operating with in the request.<br /><br />Type: string<br /><br />Example: `jhp`                                                                                                                                                                                                                                       |
| with\_deleted  <br />*optional*       | Include deleted results in your request.<br /><br />Type: boolean<br /><br />Default: `false`  <br />Possible values: `true`, `false`                                                                                                                                                                                                                           |

#### Example Request

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

#### Example Response

```json theme={null}
    {
      "request": {
        "params": {
          "app_event_tag_id": "jhp",
  
```
