> ## 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.

# Mobile Conversions

> X mobile app promotion measurement allows advertisers to track the success of advertising campaigns on X that are designed to drive installs or other in-app.

## MACT Overview

Advertisers can send app events directly, without a mobile measurement partner, with the [Conversion API for App Events](https://docs.x.com/x-ads-api/measurement/app-conversions.md). This page is for mobile measurement partners.

X [mobile app promotion](https://biz.x.com/mobile-app-promotion) measurement allows advertisers to track the success of advertising campaigns on X that are designed to drive installs or other in-app conversions. A X mobile measurement partner provides the ability for an advertiser to manage what conversions they want to track from the apps they are promoting on X. Once the advertiser has set up the type and time windows of the events they want to track the mobile measurement partner will send all of those events to X and immediately receive attribution data indicating the campaign and creative that the user engaged with to drive the conversion.

### Conversion Events

In order to report a [conversion event](https://developer.x.com/en/docs/x-ads-api/measurement/api-reference/conversion-event) to X and get attribution data the partner must send the mobile app ID, type and timestamp of the conversion, as well as a hashed value of the advertising/device ID. Providing this data will record the conversion event on X’s platform as well as return the attribution where appropriate. In addition, the advertiser may elect to provide extra metadata about the conversion event such as value of a purchase, the ID of a product, or a registration method.

## API reference

### Conversion Event

[Run in Postman](https://app.getpostman.com/run-collection/1d12b9fc623b8e149f87)

#### POST conversion\_event

Record a mobile measurement conversion event. The response will indicate X or X Audience Platform (TAP) attribution.

This relates to the [GET conversion\_attribution](https://developer.x.com/en/docs/x-ads-api/measurement/api-reference/conversion-attribution#get-conversion-attribution) endpoint.

Either X, TAP or no attribution will be claimed in the response. The `twitter_attribution` node will always be present and have a value of `null` when there is no X attribution (see the example response below). If TAP attribution is claimed a `tpn_attribution` node will be present and populated accordingly. Please refer to the [TAP overview](https://developer.x.com/en/docs/x-ads-api/measurement/overview/twitter-audience-platform) for more information.

There are several optional parameters available to set metadata associated with each conversion event. This metadata has no effect on attribution calculations.

##### Resource URL

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

##### Parameters

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

##### Example Request

`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`

##### Example Response

```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 Tags

[Run in Postman](https://app.getpostman.com/run-collection/1d12b9fc623b8e149f87)

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

Retrieve details for some or all app event tags associated with the current account.

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`

##### Parameters

| Name | Description |
| :- | :- |
| account\_id  *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](https://docs.x.com/x-ads-api/campaign-management/reference.md#accounts). The specified account must be associated with the authenticated user. Type: string Example: `18ce54d4x5t` |
| app\_event\_tag\_ids  *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. Type: string Example: `jhp` |
| count  *optional* | Specifies the number of records to try and retrieve per distinct request. Type: int Default: `200`  Min, Max: `1`, `1000` |
| cursor  *optional* | Specifies a cursor to get the next page of results. See [Pagination](https://docs.x.com/x-ads-api/introduction.md) for more information. Type: string Example: `8x7v00oow` |
| sort\_by  *optional* | Sorts by supported attribute in ascending or descending order. See [Sorting](https://docs.x.com/x-ads-api/fundamentals/sorting.md) for more information. Type: string Example: `created_at-asc` |
| with\_deleted  *optional* | Include deleted results in your request. Type: boolean Default: `false`  Possible values: `true`, `false` |
| with\_total\_count  *optional* | Include the `total_count` response attribute. **Note**: This parameter and `cursor` are exclusive. **Note**: Requests which include `total_count` will have lower rate limits, currently set at 200 per 15 minutes. Type: boolean Default: `false`  Possible values: `true`, `false` |

##### Example Request

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

##### Example Response

```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

Retrieve a specific app event tag associated with the current account.

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  *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](https://docs.x.com/x-ads-api/campaign-management/reference.md#accounts). The specified account must be associated with the authenticated user. Type: string Example: `18ce54d4x5t` |
| app\_event\_tag\_id  *required* | A reference to the app event tag you are operating with in the request. Type: string Example: `jhp` |
| with\_deleted  *optional* | Include deleted results in your request. Type: boolean Default: `false`  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",
  
```
