Skip to main content

analyticsOverTime

Returns the top dimension count series and an others group for a preset or window within available history. Use analyticsDimension for ranked rows; sibling aggregate fields are null. Page and entry-page series always measure page views; optional goal conversions apply only to site sources. Requires web analytics view access.

analyticsOverTime(
dimension: AnalyticsDimension!
metric: AnalyticsMetric!
sourceId: Int!
sourceType: AnalyticsSource!
startAt: Int
endAt: Int
presetDate: String
numSegments: Int
granularity: TimeUnit
goalId: Int
): Analytics

Arguments​

analyticsOverTime.dimension ● AnalyticsDimension! non-null enum​

Breakdown to return; page and entry-page series always measure page views.

analyticsOverTime.metric ● AnalyticsMetric! non-null enum​

Count for non-page series; page and entry-page series always use PAGE_VIEWS.

analyticsOverTime.sourceId ● Int! non-null scalar​

Site ID from sites for SITE, or property ID from gaProperties for GA_PROPERTY.

analyticsOverTime.sourceType ● AnalyticsSource! non-null enum​

SITE selects Crazy Egg data; GA_PROPERTY selects imported Google Analytics data.

analyticsOverTime.startAt ● Int scalar​

Unix seconds for the window start. Supply with endAt when no preset is given; site dates use UTC and GA dates use the property's time zone.

analyticsOverTime.endAt ● Int scalar​

Unix seconds; dimension series include this calendar date in the source time zone. Optional conversions count events before this instant plus one day.

analyticsOverTime.presetDate ● String scalar​

Case-insensitive preset that overrides startAt/endAt: today, yesterday, recent (today plus six prior days), last 7 days, last 30 days (both end yesterday), this month, or last month; others error.

analyticsOverTime.numSegments ● Int scalar​

Top time-series count, default 5, with remaining values grouped as others. Used by analyticsOverTime; ranked-row queries do not use it.

analyticsOverTime.granularity ● TimeUnit enum​

Bucket size, default DAY. Site dates use UTC; GA dates use the property's time zone.

analyticsOverTime.goalId ● Int scalar​

Optional goal ID from goalRefList for this site's conversions; used only for SITE sources.

Type​

Analytics object​

Metrics and dimension payload returned by analytics and analyticsOverTime. Fields absent from the returned payload resolve to null.