how to get stats for twitter ad campaign

598 views Asked by At

I'm new here and looking for some help. I am using twitter in the company I work for(we run Facebook ad campaigns) and we are shortly moving to twitter as well. I am trying to access ad stats for a specific ad using the ad id, such as impressions or clicks.

[https://ads-api.twitter.com/0/stats/accounts/4cury/campaigns/e25e?granularity=DAY&start_time=2013-04-13T07:00:00Z&end_time=2013-04-16T07:00:00Z][1]

This is the example query from the documentation, but I cannot edit this without getting an error. I am able to run queries for campaigns, but the /stats/ endpoint will not work for me.

In the above query I insert the campaign id and ad id, which is ok, but any changes to the time result in an error of INVALID_TIME_WINDOW.

I also change the colons to a character code %3A. I am now stuck on this and cant go any further. I am using postman for chrome to test these queries.

thanks in advance

1

There are 1 answers

1
Deepak On

You can use only date in start_date and end_date params.

https://ads-api.twitter.com/0/stats/accounts/4cury/campaigns/e25e?granularity=DAY&start_time=2013-04-13&end_time=2013-04-16

If you want to use the time also, than start_time must be midnight in the timezone of the account, relative to UTC.