You’ve probably seen my previous post about a Google Ads script to fetch data from the MCC level. That script was a modification on this script originally made by Frederick Vallaeys of Optmyzr.com, which utilizes the AdWords Query Language (AWQL) to construct a query.
Here’s another variation on that script: a way to dynamically export Year To Date data from Google Ads to Google Sheets.
Why do we need this?
One AWQL limitation is that the available default date ranges only include the following:
Since the original script uses AWQL, if you’d want to get a year-to-date report, you’ll need to edit the DURING clause in line 27 to use a static date range in this format: YYYYMMDD
> DURING 20200101, 20200810
Obviously, this is not a good solution, since you’d need to edit the end date in the script every day to fetch updated data.
After adding this script in Google Ads, make sure that it’s scheduled to run daily, otherwise it won’t pull the data every day.
Here’s the updated script: