Tracking Tags

GET accounts/:account_id/tracking_tags

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

Resource URL

https://ads-api.twitter.com/10/accounts/:account_id/tracking_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. The specified account must be associated with the authenticated user.

Type: string

Example: 18ce54d4x5t

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 for more information.

Type: string

Example: 8x7v00oow

line_item_ids
optional

Scope the response to just the tracking tags associated with specific line items by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.

Type: string

Example: 96uzp

sort_by
optional

Sorts by supported attribute in ascending or descending order. See Sorting for more information.

Type: string

Example: created_at-asc

tracking_tag_ids
optional

Scope the response to just the desired tracking tags by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.

Type: string

Example: 3m82

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.twitter.com/10/accounts/18ce54d4x5t/tracking_tags?tracking_tag_ids=3m82

Example Response

{
  "request": {
    "params": {
      "tracking_tag_ids": [
        "3m82"
      ],
      "account_id": "18ce54d4x5t"
    }
  },
  "next_cursor": null,
  "data": [
    {
      "line_item_id": "fdwcl",
      "tracking_tag_url": "https://ad.doubleclick.net/ddm/trackimp/N1234.2061500TWITTER-OFFICIAL/B9156151.125630439;dc_trk_aid=1355;dc_trk_cid=8675309",
      "tracking_tag_type": "IMPRESSION_TAG",
      "id": "3m82",
      "created_at": "2019-06-26T17:04:26Z",
      "updated_at": "2019-06-26T17:04:26Z",
      "deleted": false
    }
  ]
}

GET accounts/:account_id/tracking_tags/:tracking_tag_id

Retrieve a specific tracking tag associated with the current account.

Resource URL

https://ads-api.twitter.com/10/accounts/:account_id/tracking_tags/:tracking_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. The specified account must be associated with the authenticated user.

Type: string

Example: 18ce54d4x5t

tracking_tag_id
required

A reference to the tracking tag you are operating with in the request.

Type: string

Example: 555j

with_deleted
optional

Include deleted results in your request.

Type: boolean

Default: false
Possible values: true, false

Example Request

GET https://ads-api.twitter.com/10/accounts/18ce54d4x5t/tracking_tags/555j

Example Response

{
  "request": {
    "params": {
      "with_deleted": true,
      "tracking_tag_id": "555j",
      "account_id": "18ce54d4x5t"
    }
  },
  "data": {
    "line_item_id": "72v2x",
    "tracking_tag_url": "https://ad.doubleclick.net/ddm/trackimp/N6344.2061500TWITTER-OFFICIAL/B23028778.279118262;dc_trk_aid=473354132;dc_trk_cid=119658253",
    "tracking_tag_type": "IMPRESSION_TAG",
    "id": "555j",
    "created_at": "2020-08-13T23:02:03Z",
    "updated_at": "2020-08-13T23:02:03Z",
    "deleted": false
  }
}

POST accounts/:account_id/promoted_tweets

Associate a tracking tag with the specified line item.

Resource URL

https://ads-api.twitter.com/10/accounts/:account_id/tracking_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. The specified account must be associated with the authenticated user.

Type: string

Example: 18ce54d4x5t

line_item_id
required

A reference to the line item you are operating with in the request.

Type: string

Example: 8v7jo

tracking_tag_type
required

The type of tracking tag.

Type: enum

Possible value: IMPRESSION_TAG

tracking_tag_url
required

The tracking tag url provided by the tracking partner.

Type: string

Example: https://ad.doubleclick.net/ddm/trackimp/N1234.2061500TWITTER-OFFICIAL/B9156151.125630439;dc_trk_aid=1355;dc_trk_cid=8675309

Example Request

POST https://ads-api.twitter.com/10/accounts/18ce54d4x5t/tracking_tags?line_item_id=fdwcl&tracking_tag_type=IMPRESSION_TAG&tracking_tag_url=https://ad.doubleclick.net/ddm/trackimp/N1234.2061500TWITTER-OFFICIAL/B9156151.125630439;dc_trk_aid=1355;dc_trk_cid=8675309

Example Response

{
  "request": {
    "params": {
      "line_item_id": "fdwcl",
      "tracking_tag_type": "IMPRESSION_TAG",
      "tracking_tag_url": "https://ad.doubleclick.net/ddm/trackimp/N1234.2061500TWITTER-OFFICIAL/B9156151.125630439;dc_trk_aid=1355;dc_trk_cid=8675309",
      "account_id": "18ce54d4x5t"
    }
  },
  "data": {
    "line_item_id": "fdwcl",
    "tracking_tag_url": "https://ad.doubleclick.net/ddm/trackimp/N1234.2061500TWITTER-OFFICIAL/B9156151.125630439;dc_trk_aid=1355;dc_trk_cid=8675309",
    "tracking_tag_type": "IMPRESSION_TAG",
    "id": "3m82",
    "created_at": "2019-06-26T17:04:26Z",
    "updated_at": "2019-06-26T17:04:26Z",
    "deleted": false
  }
}

DELETE accounts/:account_id/tracking_tags/:tracking_tag_id

Disassociate a tracking tag from the specified line item.

Resource URL

https://ads-api.twitter.com/10/accounts/:account_id/tracking_tags/:tracking_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. The specified account must be associated with the authenticated user.

Type: string

Example: 18ce54d4x5t

tracking_tag_id
required

A reference to the tracking tag you are operating with in the request.

Type: string

Example: 555j

Example Request

DELETE https://ads-api.twitter.com/10/accounts/18ce54d4x5t/tracking_tags/555j

Example Response

{
  "request": {
    "params": {
      "tracking_tag_id": "555j",
      "account_id": "18ce54d4x5t"
    }
  },
  "data": {
    "line_item_id": "72v2x",
    "tracking_tag_url": "https://ad.doubleclick.net/ddm/trackimp/N6344.2061500TWITTER-OFFICIAL/B23028778.279118262;dc_trk_aid=473354132;dc_trk_cid=119658253",
    "tracking_tag_type": "IMPRESSION_TAG",
    "id": "555j",
    "created_at": "2020-08-13T23:02:03Z",
    "updated_at": "2021-08-29T17:12:58Z",
    "deleted": true
  }
}
Was this document helpful?
Thank you

Thank you for the feedback. We’re really glad we could help!

Thank you for the feedback. How could we improve this document?
Thank you for the feedback. Your comments will help us improve our documents in the future.