facebook-ads-reporting-google-apps-script
facebook-ads-reporting-google-apps-script copied to clipboard
Just a question about caching and campaign report id
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_idandcampaign_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 fileget-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!