How do I convert my Google Analytics static date ranges to dynamic date ranges?

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.

  1. Find start-date= in your Query URI.
  2. Delete the date that appears right after it. Note: Only delete the data that appears in yyyy-mm-dd format.
  3. Replace it with the following: {date.last30Days}
  4. Find end-date=and delete the date that follows it.
  5. Replace it with the following: {}
  6. Click the Get Data button.
  7. Save and name your data source.

If your query returned an error, make sure it looks like this:{ProfileID}&metrics=ga%3Avisitors&start-date={date.last30Days}&end-date={}

Common date range expressions: