Asynchronous Analytics - what date range we need to get new report data each day (7 days ago til now or 30 days ago til now)?


#1
  • Currently, I use Asynchronous Analytics (GET stats/jobs/accounts/:account_id) to get the report data.
  • Everyday, I get data for 5 days ago to get new data. But after one month. I re-run get report data for last month, the report data was changed so much (ex: impressions, clicks, spend…)
  • I maybe must get more data for a longer date range every day. So, I want to ask you about the latest date that report data will never updated to set limit for date range I need to get new data.
  • I read document at best-practices but I still misunderstand two below sentences. What do they apply for?

Do not pull data for any entities older than 7 days.

Do not repeatedly query for data that is older than 30 days. This data will not change and should be stored locally.

Thank you very much.


#2

Sorry for the late reply here.

Let me answer those two sentences first:

Do not pull data for any entities older than 7 days.

This is worded poorly - it is implying that “For stuff that happened over 7 days ago, you should already have synced the same data to your DB”. When you onboard a new account, or want to invalidate and refresh data, it’s fine to go back and refresh data, but for example, what we want partners to avoid is going back all the way to beginning of 2017 even though it’s not necessary.

One optimization we encourage partners to look at is the serving flight time: the start time and end time of campaign. So if the line item stopped serving 7 days ago, the numbers in general should not change.

For data changing - generally billing metrics will lock down after 3 to 4 days and this is documented in several places. Some data like conversion data will change based upon the length of window of either app_event_tag or web_event_tag (for example, the ad is no longer serving, but if window is 30 days then 20 days later we may still count a conversion on the campaign data).

If you see data radically changing after 1 month, please post a thread with specific example of what changed and with the time stamp of when before and after was synced. It could be that when you synced the data it wasn’t in a ‘finalized’ state. I don’t expect the situation you said to happen often, maybe very rarely only.

Do not repeatedly query for data that is older than 30 days. This data will not change and should be stored locally

This is similar to what’s posted above. There shouldn’t be a reason to fetch data if you already have it and it’s > 30 days old. There have been cases of partners doing this and it should not be necessary.

Thanks,

John