We found today that the monthsToDate timeframe is throwing an error and we plan to roll out a hotfix tonight to address this but wanted to first get feedback from users. We believe that the correct behavior will be to make the following translations when the query is run in the first month of a year and has a ga:month dimension present.
- monthsToDate is replaced by lastCalendarYear
- lastCalendarYear is replaced by lastCalendarYear2
- lastCalendarYear2 is replaced by lastCalendarYear3
The rational is that if you requesting months at the end of a monthly reporting cycle and it is also the end of the yearly cycle, then what you presumably want is all months from the previous year.
We are assuming that this new logic would benefit everyone, but also wanted to give you an opportunity to let us know if it would cause any problems with your current queries.
A slightly different approach would be to to use a date window instead of using the presence of ga:month. So any query with monthsToDate, lastCalendarYear, or lastCalendarYear2 would see the previous translations applied if ran within, let's say, the first week of the new month.