Conversion Attribution
conversion-attribution

Conversion Attribution

GET conversion_attribution

Query Twitter to check on conversion attribution without writing a conversion event. Response will indicate Twitter attribution.

This relates to the POST conversion_event endpoint.

Either Twitter, 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 Twitter attribution and be populated as seen in 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 for more information.

Resource URL

https://ads-api.x.com/12/conversion_attribution

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

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

Default: 14
Possible values: 1, 7, 14, 30
extra_device_ids
optional

A SHA256 of the SHA1 of the device ID passed in hashed_device_id, plus any additional hashed device IDs.

Type: string

Example: ABCD1234XYZ, DCBA4321XYZ

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

view_through_window
optional

The view through window for this event in days.

Type: int

Default: 1
Possible values: 0, 1, 7, 14, 30

Example Request

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

Example Response

{
  data:{
    "app_id":"333903271",
    "os_type":"IOS",
    "hashed_device_id":"ABCD1234XYZ",
    "conversion_type":"INSTALL",
    "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":"VIEW",
      "engagement_time":"2013-04-16T07:00:00.123Z",
      "country_code":"US",
      "tweet_id":"383034667764441088",
      "attribution_type":"PROMOTED",
      "promoted_properties":{
        "campaign_id”: “54a21",
        "campaign_name":"Vine_Contest",
        "line_item_id":"23ab2d4"
      }
    }
  },
  "data_type":"conversion_attribution",
  "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
    }
  }
}