Ads on api graph: inconsistencies in ad group statistics

We’ve noticed that there appear to be some changes to the way Facebook returns ad group statistics on demand using:

https://graph.facebook.com/stats/startime/endtime?ids= {adgroup_id} & access_token = ...

I am wondering if a) someone else encounters similar behavior and b) if there is more documentation other than API documentation: http://developers.facebook.com/docs/reference/ads-api/ (I asked to include API marketing API group, but was not accepted).

1) Before the New Year, we determined that in order to comply with the statistics specified in the user interface, our API calls should have a start and end time compared to PST, i.e. 08:00:00. Now it turns out that Facebook uses time zone credential settings. For example, to match the data specified in the user interface for an account with an eastern time zone, we need to request a time starting and ending 05:00:00. Our archived data files suggest that this change occurred after 1/1/2012: the data transferred to 1/1/2012 from 2011-12-28 08:00:00 to 2011-12-29 08:00:00 are different from data pulled on 1/3/2012 using the same time interval.

2) Statistics data, apparently, are aggregated in one second: from midnight to one second after midnight in the account’s time zone:

... / stats / 2011-12-28 05: 00: 00 / 2011-12-28 05: 00: 01? ids = {adgroup_id} & access_token = ...

retrieves all data for 2011-12-28,

... / stats / 2011-12-28 05: 00: 01 / 2011-12-28 05: 00: 02? ids = {adgroup_id} & access_token = ...

almost no data (more on this later).

3) We can pull out unique_impressions and social_unique_impressions if we specify a start time equal to midnight in the account’s time zone, and an end time within one day of the start time. Otherwise, these fields are returned as zero. There is a similar answer with unique_clicks and social_unique_clicks, however the requirements are a bit more lenient (I haven't fully studied them). EDIT https://developers.facebook.com/docs/reference/ads-api/adstatistics/ answers this question for me (under the heading of unique statistics) - this is how the Facebook system is designed.

4) unique_clicks and social_unique_clicks do not seem to aggregate properly. A data request, for example, from 00:00:00 EST to 00:00:01 EST returns the same data as 00:00:02 EST, until 00:00:03 EST, and like 00:00:00 EST until 00:00: 03 EST. It can be expected that the data from 00:00:00 to 00:00:03 will be equal from 00:00:00 to 00:00:01 plus from 00:00:02 to 00:00:03. EDIT I will assume from https://developers.facebook.com/docs/reference/ads-api/adstatistics/ (under the heading of unique statistics) that these unique statistics are not intended to be aggregated.

I retrieve this data using firefox and get similar results regardless of whether I use unix time or string formatted time.

Any background information, explanation, confirmation of similar results, etc. Thanks!

+4
source share
1 answer

1) According to the documents, statistics do not officially support even hourly detail. They tell you that you need to make requests per hour for the current date and make a difference - at the moment this is not quite the way it works, and you can give the start and end time with a granularity of half an hour, half an hour, I assume that I support half time zones. This is obviously undocumented and not supported, so use at your own risk. I use era

2) Again, you cannot get more than half an hour of granularity. In addition, although the API supposedly supports current requests, they are not reliable - in five minutes you can make a request and 1000 less impressions than five minutes ago. Facebook probably has several cache servers that don't sync with each other in the short term, so trying to get to the second is a waste of time.

+1
source

Source: https://habr.com/ru/post/1389288/


All Articles