Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
131 lines (98 sloc) 2.32 KB

Common queries

Total pageviews, uniques, users, etc.

- name: Totals
  metrics:
      - "ga:pageviews"
      - "ga:uniquePageviews"
      - "ga:users"
      - "ga:sessions"

Device share

Get totals broken down by desktop, tablet and mobile.

- name: Totals by device type
  metrics:
      - "ga:pageviews"
      - "ga:uniquePageviews"
      - "ga:users"
      - "ga:sessions"
  dimensions:
      - "ga:deviceCategory"
  sort:
      - "-ga:pageviews"

Browser share

- name: Totals by browser
   metrics:
       - "ga:pageviews"
   dimensions:
       - "ga:browser"
   sort:
       - "-ga:pageviews"

Most viewed pages

- name: Top pages
  metrics:
      - "ga:pageviews"
  dimensions:
      - "ga:pagePath"
  sort:
      - "-ga:pageviews"
  max-results: 20

Top sources (referrers)

- name: Totals by source
  metrics:
      - "ga:pageviews"
  dimensions:
      - "ga:source"
  sort:
      - "-ga:pageviews"

Top social sources

- name: Totals by social network
  metrics:
      - "ga:pageviews"
  dimensions:
      - "ga:socialNetwork"
  sort:
      - "-ga:pageviews"

Page load and render times

- name: Performance
  metrics:
      - "ga:avgPageLoadTime"
      - "ga:avgPageDownloadTime"
      - "ga:avgDomInteractiveTime"
      - "ga:avgDomContentLoadedTime"

Time on site

- name: Time on site
  metrics:
      - "ga:avgSessionDuration"

Custom event count

- name: "Event: tweet"
  metrics:
      - "ga:totalEvents"
      - "ga:uniqueEvents"
  filter: "ga:eventAction==tweet"

Custom event value

- name: "Event: time-on-slide"
  metrics:
      - "ga:eventValue"
      - "ga:avgEventValue"
  filter: "ga:eventAction==time-on-slide"