I have a question about using date filters with Google Analytics. I searched through the forums and found some somewhat related topics but no answer to my question.
I want to use a FROM and TO date filter on our dashboards to also filter Google Analytics questions. I built them with the visual editor and the resulting query looks like this:
{
"ids": "ga:ABC",
"start-date": "30daysAgo",
"end-date": "today",
"metrics": "ga:users",
"dimensions": "",
"segment": "gaid::-2",
"include-empty-rows": false,
"max-results": 10000
}
Manually entering dates into the "start-date" and "end-date" does the trick, yet using the curly brackets to created a variable such as {{CALENDAR_START}} (like I do in SQL queries) doesn't seem to work when a Google Analytics source is selected. Is there any way to work around that?
Stretch goal: Ideally, I'd like to use the coalesce function described in Github to also set a relative default value for the date values: coalesce([[{{CALENDAR_START}},]] date_add(CURRENT_DATE, INTERVAL -1 month)) With MySQL this works like a charm and it would be great to also get this to work with Google Analytics queries.
Thanks in advance for any pointers and suggestions you might be able to give me.