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.x.com/12/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:
  | 
count optional  | 
Specifies the number of records to try and retrieve per distinct request. Type: int Default:
 200Min, Max: 1,
1000 | 
cursor optional  | 
Specifies a cursor to get the next page of results. See Pagination for more information. Type: string Example:
  | 
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:
  | 
sort_by optional  | 
Sorts by supported attribute in ascending or descending order. See Sorting for more information. Type: string Example:
  | 
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:   | 
with_deleted optional  | 
Include deleted results in your request. Type: boolean Default:
 falsePossible values: true,
false | 
with_total_count optional  | 
Include the  Note: This parameter and
 Note: Requests
which include  Type: boolean Default:
 falsePossible values: true,
false | 
Example Request¶
GET https://ads-api.x.com/12/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.x.com/12/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:
  | 
tracking_tag_id required  | 
A reference to the tracking tag you are operating with in the request. Type: string Example:   | 
with_deleted optional  | 
Include deleted results in your request. Type: boolean Default:
 falsePossible values: true,
false | 
Example Request¶
GET https://ads-api.x.com/12/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/tracking_tags¶
Associate a tracking tag with the specified line item.
Resource URL¶
https://ads-api.x.com/12/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:
  | 
line_item_id required  | 
A reference to the line item you are operating with in the request. Type: string Example:   | 
tracking_tag_type required  | 
The type of tracking tag. Type: enum Possible value:
  | 
tracking_tag_url required  | 
The tracking tag url provided by the tracking partner. Type: string Example:
  | 
Example Request¶
POST https://ads-api.x.com/12/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
  }
}
PUT accounts/:account_id/tracking_tags/:tracking_tag_id¶
Associate a tracking tag with the specified line item.
Resource URL¶
https://ads-api.x.com/12/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:
  | 
tracking_tag_url required  | 
The tracking tag url provided by the tracking partner. Type: string Example:
  | 
Example Request¶
PUT https://ads-api.x.com/12/accounts/18ce54d4x5t/tracking_tags/3m82?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": {
      "tracking_tag_id": "3m82",
      "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": "2022-01-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.x.com/12/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:
  | 
tracking_tag_id required  | 
A reference to the tracking tag you are operating with in the request. Type: string Example:   | 
Example Request¶
DELETE https://ads-api.x.com/12/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
  }
}