Lastly, how would we get a lookup for all the location values, and what does ID represent in the targeting_criteria API? $ twurl -H "/5/accounts/18ce54d4x5t/targeting_criteria?line_item_ids=cg75q" The targeting criteria response doesn’t return information about the location type. But there doesn’t seem to be a column that tells me which of the above segment types it is. I see within the targeting_criteria call we get “ID | Line Item ID | Operator | Type | Value” where Type just says LOCATION and Value is sometimes “96683cc9126741d1” (which is the US) or it could be “cc631a80adacd459” which is a City. Is there a column somewhere that states this line item is targeting a Country vs. In what API dataset would information about the type of targeting being used be returned? ie. This also works for metros (currently segmentation_type=CITIES). Twurl -X POST -H "/5/stats/jobs/accounts/18ce54d4x5t?entity=CAMPAIGN&entity_ids=bexi2&start_time=&end_time=&granularity=TOTAL&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT&segmentation_type=REGIONS&country=96683cc9126741d1" This is partial output from the asynchronous analytics job for the campaign that targets the United States, using the following job create request. It is possible to get both regions and metros. If a Twitter Ads campaign is targeting a whole Country, then there is no way to get back performance data broken out by Cities/Metro? ![]() Do you use the UI as the source of truth? In any case, when you’re looking at your audience view, you should see a “Postal codes” section (see screenshot below)."name": "United States Minor Outlying Islands", $ twurl -H "/5/targeting_criteria/locations?q=US&location_type=COUNTRIES" In your asynchronous analytics request, use: segmentation=POSTAL_CODES&country=96683cc9126741d1. For example, for the United States, the value is: 96683cc9126741d1 (see below for an example request). ![]() This is the targeting_value from the GET targeting_criteria/locations endpoint. The value should correspond to the location identifier. For postal codes, you’re correct that the country parameter is required ( source).Hello, Welcome and thanks for reaching out.
0 Comments
Leave a Reply. |