I want to enrich my performace data by adding the campaign_id, campaign_name, adgroup_id, adgroup_name and tweet_id. So far I’ve been trying to do this by creating 2 datasets. One for the performance metrics on Promoted Tweets active entities and a second one for all account.campaigns(), account.line_items() and account.promoted_tweets() then joining on the entity_id field.

The problem with this is that the account.promoted_tweets() endpoint constantly misses tweets for which I do get performance metrics, causing my join to find no match on these. What is the reason for this?

Is there a better way to achieve this? If there isn’t is there a way to make sure the account.promoted_tweets() call won’t miss a thing?

I would expect any entity returned by the active entities endpoint to exist within the ads account. Is your application fetching deleted Promoted Tweets?

If you can’t find that the Promoted Tweet was deleted, could you provide the active entities API request (not SDK) and Promoted Tweet API request?

1 Like

your push to turn to the api instead of the sdk resulted in me noticing that the entities that I miss in my sdk call have been deleted. If I call the https://ads-api.twitter.com/{{version}}/accounts/{{account_id}}/promoted_tweets endpoint with param with_deleted set to true I get all the PROMOTED_TWEET entities I am missing on the sdk call and those missing have the property “deleted” set to true.

I believe that account.promoted_tweets() is equivalent to this endpoint because reponses on the SDK are same as the enpoint except SDK is a language specific object, I guess the question now is:

How I include the with_deleted param to the sdk call? this is the python SDK

thanks for the insight

1 Like

I would expect the SDKs to support or accept the with_deleted parameter. Can you search the examples provided within the SDK?

Definitely not in the examples provided. However it is documented that account.promoted_tweets() takes **kwargs as an argument. I passed with_deleted = True and now I’m able to get the missing tweets using the sdk. Thanks :slight_smile:

1 Like