facebook-ads-reporting-google-apps-script icon indicating copy to clipboard operation
facebook-ads-reporting-google-apps-script copied to clipboard

Just a question about caching and campaign report id

Open regpaq opened this issue 3 years ago • 0 comments

First, thanks a lot for your code! I've begun modifying it a bit and using it for work. It's been a great learning experience to try and understand how each line works. Had a couple questions:

  • What is the difference between report_run_id and campaign_report_id? Fetching the .csv using the report_run_id seems to work fine.
  • What is the purpose of caching the campaign_report_id? My guess is to be able to utilize it in the other file get-facebook-report.js?

Relevant code from request-facebook-report.js

  const reportId = results.report_run_id;
  const cache = CacheService.getScriptCache();
  const cached = cache.get('campaign-report-id');

Thank you!

regpaq avatar Jul 22 '22 02:07 regpaq