Hello,
We are using the Asynchronous analytics API to fetch the metrics for our Ads Account. We fetch data for a month in “DAY”'s granularity. When we get the data in gzip format, we noticed the below 2 problems.
-
The ads account id, for which the data is fetched, is not available in the gzip json response (But the same is available in the json response from synchronous call in the request params).
-
When fetching data for a month in “DAY”'s granularity, we receive 30 values (30 days) for each field. But there is no date column available (dates as an array of 30 values). Hence we are not able to identify to which date the metrics belong to.
Are there any solutions to the above questions?
@ram3330: For both of these issues, are you able to find the information you’re looking for in the request.params object?
- The ads account id is not available in the request.params also.
- In case of monthly data extraction with daily granularity, in the request.params - the start date is 01-Aug-2019 (for example) and the end date is 31-Aug-2019. But we get 31 values for each metric since the request is of Day’s granularity. Out of the 31 values for impressions, the data doesn’t say which is the impression value for 4th Aug 2019 (say). Meaning, if we have to get data for 31 days, we need to run 31 daily jobs. Running a monthly job with daily granularity doesn’t help me identify which data belongs to which date.
These issues are for asynchronous call. Please let us know if there are any way to get this data.
For #1, we will look into making sure the account ID is in request.params.
For #2, what are the exact timestamps you’re passing in? In any case, the array elements will correspond to the data you’re requesting. For example, if you’re fetching a single day and granularity=HOUR, then there should be 24 elements in the array (+/- 1 for daylight savings). The first element will correspond to the first hour, the second to the second, etc.
I hope this helps.
Thanks!
Thank you for the response.
-
I have attached the screenshot of asynchronous call json response for your reference.
-
Yes, we are getting 24 elements in the array if we fetch data for a single day and granularity=HOUR. And we assumed the same as what you say - "first element will correspond to the first hour, the second to the second, etc". However, we are not able to find that information in the documentation. If that is available in the documentation, can you provide the link to the same? If it is not available, I sincerely request you that you / your team provide that information in the documentation. Thanks in advance.