Skip to content

Commit 41b50a3

Browse files
Google APIscopybara-github
authored andcommitted
feat: add minute_ranges field to RunRealtimeReportRequest object which can be used to specify the time range (in minutes) for realtime report queries
docs: document the increase from 8 to 9 of the number of allowed dimensions in a report query PiperOrigin-RevId: 383930639
1 parent dd1ef28 commit 41b50a3

2 files changed

Lines changed: 39 additions & 1 deletion

File tree

google/analytics/data/v1beta/analytics_data_api.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,13 @@ message RunRealtimeReportRequest {
506506
// Toggles whether to return the current state of this Analytics Property's
507507
// Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
508508
bool return_property_quota = 9;
509+
510+
// The minute ranges of event data to read. If unspecified, one minute range
511+
// for the last 30 minutes will be used. If multiple minute ranges are
512+
// requested, each response row will contain a zero based minute range index.
513+
// If two minute ranges overlap, the event data for the overlapping minutes is
514+
// included in the response rows for both minute ranges.
515+
repeated MinuteRange minute_ranges = 10;
509516
}
510517

511518
// The response realtime report table corresponding to a request.

google/analytics/data/v1beta/data.proto

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,41 @@ message DateRange {
4343
string name = 3;
4444
}
4545

46+
// A contiguous set of minutes: startMinutesAgo, startMinutesAgo + 1, ...,
47+
// endMinutesAgo. Requests are allowed up to 2 minute ranges.
48+
message MinuteRange {
49+
// The inclusive start minute for the query as a number of minutes before now.
50+
// For example, `"startMinutesAgo": 29` specifies the report should include
51+
// event data from 29 minutes ago and after. Cannot be after `endMinutesAgo`.
52+
//
53+
// If unspecified, `startMinutesAgo` is defaulted to 29. Standard Analytics
54+
// properties can request up to the last 30 minutes of event data
55+
// (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to
56+
// the last 60 minutes of event data (`startMinutesAgo <= 59`).
57+
optional int32 start_minutes_ago = 1;
58+
59+
// The inclusive end minute for the query as a number of minutes before now.
60+
// Cannot be before `startMinutesAgo`. For example, `"endMinutesAgo": 15`
61+
// specifies the report should include event data from prior to 15 minutes
62+
// ago.
63+
//
64+
// If unspecified, `endMinutesAgo` is defaulted to 0. Standard Analytics
65+
// properties can request any minute in the last 30 minutes of event data
66+
// (`endMinutesAgo <= 29`), and 360 Analytics properties can request any
67+
// minute in the last 60 minutes of event data (`endMinutesAgo <= 59`).
68+
optional int32 end_minutes_ago = 2;
69+
70+
// Assigns a name to this minute range. The dimension `dateRange` is valued to
71+
// this name in a report response. If set, cannot begin with `date_range_` or
72+
// `RESERVED_`. If not set, minute ranges are named by their zero based index
73+
// in the request: `date_range_0`, `date_range_1`, etc.
74+
string name = 3;
75+
}
76+
4677
// Dimensions are attributes of your data. For example, the dimension city
4778
// indicates the city from which an event originates. Dimension values in report
4879
// responses are strings; for example, city could be "Paris" or "New York".
49-
// Requests are allowed up to 8 dimensions.
80+
// Requests are allowed up to 9 dimensions.
5081
message Dimension {
5182
// The name of the dimension. See the [API
5283
// Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)

0 commit comments

Comments
 (0)