Web Event Tags
GET accounts/:account_id/web_event_tags¶
Retrieve details for some or all web event tags associated with the current account.
Resource URL¶
https://ads-api.x.com/11/accounts/:account_id/web_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. 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:
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:
|
sort_by optional |
Sorts by supported attribute in ascending or descending order. See Sorting for more information. Type: string Example:
|
web_event_tag_ids optional |
Scope the response to just the desired web event 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:
false Possible values: true ,
false |
with_total_count optional |
Include the Note: This parameter and
Note: Requests
which include Type: boolean Default:
false Possible values: true ,
false |
Example Request¶
GET https://ads-api.x.com/11/accounts/18ce54d4x5t/web_event_tags?web_event_tag_ids=o3bk1
Example Response¶
{
"request": {
"params": {
"web_event_tag_ids": [
"o3bk1"
],
"account_id": "18ce54d4x5t"
}
},
"next_cursor": null,
"data": [
{
"name": "web event tag",
"view_through_window": 7,
"click_window": 7,
"embed_code": "<script src="//platform.twitter.com/oct.js" type="text/javascript"></script><script type="text/javascript">twttr.conversion.trackPid('ny3od', { tw_sale_amount: 0, tw_order_quantity: 0 });</script><noscript><img height="1" width="1" style="display:none;" alt="" src="https://analytics.twitter.com/i/adsct?txn_id=ny3od&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" /><img height="1" width="1" style="display:none;" alt="" src="//t.co/i/adsct?txn_id=ny3od&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" /></noscript>",
"id": "o3bk1",
"retargeting_enabled": false,
"last_tracked_at": "2021-05-22T17:00:04Z",
"status": "TRACKING",
"type": "DOWNLOAD",
"website_tag_id": "ny3od",
"deleted": false
}
]
}
GET accounts/:account_id/web_event_tags/:web_event_tag_id¶
Retrieve a specific web event tag associated with the current account.
Resource URL¶
https://ads-api.x.com/11/accounts/:account_id/web_event_tags/:web_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. The specified account must be associated with the authenticated user. Type: string Example:
|
web_event_tag_id required |
A reference to the web event tag you are operating with in the request. Type: string Example: |
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/11/accounts/18ce54d4x5t/web_event_tags/o3bk1
Example Response¶
{
"request": {
"params": {
"web_event_tag_id": "o3bk1",
"account_id": "18ce54d4x5t"
}
},
"data": {
"name": "web event tag",
"view_through_window": 7,
"click_window": 7,
"embed_code": "<script src="//platform.twitter.com/oct.js" type="text/javascript"></script><script type="text/javascript">twttr.conversion.trackPid('ny3od', { tw_sale_amount: 0, tw_order_quantity: 0 });</script><noscript><img height="1" width="1" style="display:none;" alt="" src="https://analytics.twitter.com/i/adsct?txn_id=ny3od&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" /><img height="1" width="1" style="display:none;" alt="" src="//t.co/i/adsct?txn_id=ny3od&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" /></noscript>",
"id": "o3bk1",
"retargeting_enabled": false,
"last_tracked_at": "2021-05-22T17:00:04Z",
"status": "TRACKING",
"type": "DOWNLOAD",
"website_tag_id": "ny3od",
"deleted": false
}
}
POST accounts/:account_id/web_event_tags¶
Create a new web event tag associated with the current account.
Resource URL¶
https://ads-api.x.com/11/accounts/:account_id/web_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. The specified account must be associated with the authenticated user. Type: string Example:
|
click_window required |
The click window for this web tag. Note: Only the possible values listed below are accepted. Type: int Possible values: |
name required |
The name of the web tag. Type: string Example:
|
retargeting_enabled required |
Indicates if retargeting should be enabled for this web tag. Type: boolean Possible values: |
type required |
The type of web tag. Type: enum Possible values:
|
view_through_window required |
The view through window for this web tag. This value must always
be less than or equal to the Note: Only the possible values listed below are accepted. Type: int Possible values:
|
Example Request¶
POST https://ads-api.x.com/11/accounts/18ce54d4x5t/web_event_tags?click_window=7&name=web event tag&retargeting_enabled=false&type=SITE_VISIT&view_through_window=7
Example Response¶
{
"data": {
"name": "web event tag",
"view_through_window": 7,
"click_window": 7,
"embed_code": "<script src='"//platform.twitter.com/oct.js"' type='"text/javascript"'></script><script type='"text/javascript"'>twttr.conversion.trackPid('ny3od', { tw_sale_amount: 0, tw_order_quantity: 0 });</script><noscript><img alt='""' height='"1"' src='"https://analytics.twitter.com/i/adsct?txn_id=ny3od&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0"' style='"display:none;"' width='"1"'/><img alt='""' height='"1"' src='"//t.co/i/adsct?txn_id=ny3od&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0"' style='"display:none;"' width='"1"'/></noscript>",
"id": "o3bk1",
"retargeting_enabled": false,
"last_tracked_at": null,
"status": "UNVERIFIED",
"type": "SITE_VISIT",
"website_tag_id": "ny3od",
"deleted": false
},
"request": {
"params": {
"name": "web event tag",
"view_through_window": 7,
"click_window": 7,
"retargeting_enabled": false,
"account_id": "18ce54d4x5t",
"type": "SITE_VISIT"
}
}
}
PUT accounts/:account_id/web_event_tags/:web_event_tag_id¶
Update a web event tag associated with the current account.
Resource URL¶
https://ads-api.x.com/11/accounts/:account_id/web_event_tags/:web_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. The specified account must be associated with the authenticated user. Type: string Example:
|
web_event_tag_id required |
The identifier for a web tag on the current account. Type: string Example: |
click_window optional |
The click window for this web tag. Note: Only the possible values listed below are accepted. Type: int Possible values: |
name optional |
The name of the web tag. Type: string Example:
|
retargeting_enabled optional |
Indicates if retargeting should be enabled for this web tag. Type: boolean Possible values: |
type optional |
The type of web tag. Type: enum Possible values:
|
view_through_window optional |
The view through window for this web tag. This value must always
be less than or equal to the Note: Only the possible values listed below are accepted. Type: int Possible values:
|
Example Request¶
PUT https://ads-api.x.com/11/accounts/18ce54d4x5t/web_event_tags/o3bk1?type=DOWNLOAD
Example Response¶
{
"data": {
"name": "web event tag",
"view_through_window": 7,
"click_window": 7,
"embed_code": "<script src='"//platform.twitter.com/oct.js"' type='"text/javascript"'></script><script type='"text/javascript"'>twttr.conversion.trackPid('ny3od', { tw_sale_amount: 0, tw_order_quantity: 0 });</script><noscript><img alt='""' height='"1"' src='"https://analytics.twitter.com/i/adsct?txn_id=ny3od&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0"' style='"display:none;"' width='"1"'/><img alt='""' height='"1"' src='"//t.co/i/adsct?txn_id=ny3od&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0"' style='"display:none;"' width='"1"'/></noscript>",
"id": "o3bk1",
"retargeting_enabled": false,
"last_tracked_at": "2021-05-22T17:00:04Z",
"status": "UNVERIFIED",
"type": "DOWNLOAD",
"website_tag_id": "ny3od",
"deleted": false
},
"request": {
"params": {
"web_event_tag_id": "o3bk1",
"type": "DOWNLOAD",
"account_id": "18ce54d4x5t"
}
}
}
DELETE accounts/:account_id/web_event_tags/:web_event_tag_id¶
Delete a specific web event tag associated to the current account.
Resource URL¶
https://ads-api.x.com/11/accounts/:account_id/web_event_tags/:web_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. The specified account must be associated with the authenticated user. Type: string Example:
|
web_event_tag_id required |
The identifier for a web tag on the current account. Type: string Example: |
Example Request¶
DELETE https://ads-api.x.com/11/accounts/18ce54d4x5t/web_event_tags/o3bk1
Example Response¶
{
"data": {
"name": "web event tag",
"view_through_window": 7,
"click_window": 7,
"embed_code": "<script src='"//platform.twitter.com/oct.js"' type='"text/javascript"'></script><script type='"text/javascript"'>twttr.conversion.trackPid('ny3od', { tw_sale_amount: 0, tw_order_quantity: 0 });</script><noscript><img alt='""' height='"1"' src='"https://analytics.twitter.com/i/adsct?txn_id=ny3od&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0"' style='"display:none;"' width='"1"'/><img alt='""' height='"1"' src='"//t.co/i/adsct?txn_id=ny3od&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0"' style='"display:none;"' width='"1"'/></noscript>",
"id": "o3bk1",
"retargeting_enabled": false,
"last_tracked_at": "2021-05-22T17:00:04Z",
"status": "UNVERIFIED",
"type": "DOWNLOAD",
"website_tag_id": "ny3od",
"deleted": true
},
"request": {
"params": {
"web_event_tag_id": "o3bk1",
"account_id": "18ce54d4x5t"
}
}
}