Pages

Tuesday, 1 September 2015

Google Analytics Date Selector

Documentation
Element for selecting the start and end date values for queries inside a <google-analytics-dashboard> element.
Example
<google-analytics-dashboard>

  <google-analytics-date-selector
    startDate="30daysAgo"
    endDate="today">
  </google-analytics-date-selector>

  <google-analytics-chart
    ids="ga:1174"
    metrics="ga:sessions"
    dimensions="ga:date">
  </google-analytics-chart>

</google-analytics-dashboard>
Properties
endDate
Stringdefault: 'yesterday' notify
    The endDate attribute is the end date for fetching Analytics data. Requests can specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or NdaysAgo where N is a positive integer).
    See the Core Reporting API parameter reference for more details.
    maxEndDate
    Stringdefault: 'today'
      The maxEndDate attribute is used as the max attribute on the end date<input>.
      minStartDate
      Stringdefault: '2005-01-01'
        The minStartDate attribute is used as the min attribute on the start date <input>.
        startDate
        Stringdefault: '7daysAgo' notify
          The startDate attribute is the start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or NdaysAgo where N is a positive integer).
          See the Core Reporting API parameter reference for more details.
          Methods
          endDateChanged(cur, old)
          default:''
            startDateChanged(cur, old)