Many Klips that use Google Analytics data need a rolling date range that is dynamic (for example, past 30 days). In this section we're going to change a static query from a fixed date range to a dynamic one.
- Find
start-date=
in your Query URI. - Delete the date that appears right after it. Note: Only delete the data that appears in yyyy-mm-dd format.
- Replace it with the following:
{date.last30Days}
- Find
end-date=
and delete the date that follows it. - Replace it with the following:
{date.today}
- Click Get data.
- Save and name your data source.
If your query returned an error, make sure it looks like this:
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A{ProfileID}&metrics=ga%3Avisitors&start-date={date.last30Days}&end-date={date.today}
Common date range expressions:
{date.today}
{date.last30Days}
{date.startOfQuarter}
- And many more...