Reference documentation and code samples for the Google Analytics Data V1beta Client class MinuteRange.
A contiguous set of minutes: startMinutesAgo, startMinutesAgo + 1, ...,
endMinutesAgo. Requests are allowed up to 2 minute ranges.
Generated from protobuf message google.analytics.data.v1beta.MinuteRange
Namespace
Google \ Analytics \ Data \ V1beta
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ start_minutes_ago
int
The inclusive start minute for the query as a number of minutes before now. For example, "startMinutesAgo": 29 specifies the report should include event data from 29 minutes ago and after. Cannot be after endMinutesAgo. If unspecified, startMinutesAgo is defaulted to 29. Standard Analytics properties can request up to the last 30 minutes of event data (startMinutesAgo <= 29), and 360 Analytics properties can request up to the last 60 minutes of event data (startMinutesAgo <= 59).
↳ end_minutes_ago
int
The inclusive end minute for the query as a number of minutes before now. Cannot be before startMinutesAgo. For example, "endMinutesAgo": 15 specifies the report should include event data from prior to 15 minutes ago. If unspecified, endMinutesAgo is defaulted to 0. Standard Analytics properties can request any minute in the last 30 minutes of event data (endMinutesAgo <= 29), and 360 Analytics properties can request any minute in the last 60 minutes of event data (endMinutesAgo <= 59).
↳ name
string
Assigns a name to this minute range. The dimension dateRange is valued to this name in a report response. If set, cannot begin with date_range_ or RESERVED_. If not set, minute ranges are named by their zero based index in the request: date_range_0, date_range_1, etc.
getStartMinutesAgo
The inclusive start minute for the query as a number of minutes before now.
For example, "startMinutesAgo": 29 specifies the report should include
event data from 29 minutes ago and after. Cannot be after endMinutesAgo.
If unspecified, startMinutesAgo is defaulted to 29. Standard Analytics
properties can request up to the last 30 minutes of event data
(startMinutesAgo <= 29), and 360 Analytics properties can request up to
the last 60 minutes of event data (startMinutesAgo <= 59).
Returns
Type
Description
int
hasStartMinutesAgo
clearStartMinutesAgo
setStartMinutesAgo
The inclusive start minute for the query as a number of minutes before now.
For example, "startMinutesAgo": 29 specifies the report should include
event data from 29 minutes ago and after. Cannot be after endMinutesAgo.
If unspecified, startMinutesAgo is defaulted to 29. Standard Analytics
properties can request up to the last 30 minutes of event data
(startMinutesAgo <= 29), and 360 Analytics properties can request up to
the last 60 minutes of event data (startMinutesAgo <= 59).
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getEndMinutesAgo
The inclusive end minute for the query as a number of minutes before now.
Cannot be before startMinutesAgo. For example, "endMinutesAgo": 15
specifies the report should include event data from prior to 15 minutes
ago.
If unspecified, endMinutesAgo is defaulted to 0. Standard Analytics
properties can request any minute in the last 30 minutes of event data
(endMinutesAgo <= 29), and 360 Analytics properties can request any
minute in the last 60 minutes of event data (endMinutesAgo <= 59).
Returns
Type
Description
int
hasEndMinutesAgo
clearEndMinutesAgo
setEndMinutesAgo
The inclusive end minute for the query as a number of minutes before now.
Cannot be before startMinutesAgo. For example, "endMinutesAgo": 15
specifies the report should include event data from prior to 15 minutes
ago.
If unspecified, endMinutesAgo is defaulted to 0. Standard Analytics
properties can request any minute in the last 30 minutes of event data
(endMinutesAgo <= 29), and 360 Analytics properties can request any
minute in the last 60 minutes of event data (endMinutesAgo <= 59).
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getName
Assigns a name to this minute range. The dimension dateRange is valued to
this name in a report response. If set, cannot begin with date_range_ or
RESERVED_. If not set, minute ranges are named by their zero based index
in the request: date_range_0, date_range_1, etc.
Returns
Type
Description
string
setName
Assigns a name to this minute range. The dimension dateRange is valued to
this name in a report response. If set, cannot begin with date_range_ or
RESERVED_. If not set, minute ranges are named by their zero based index
in the request: date_range_0, date_range_1, etc.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Analytics Data V1beta Client - Class MinuteRange (0.22.3)\n\nVersion latestkeyboard_arrow_down\n\n- [0.22.3 (latest)](/php/docs/reference/analytics-data/latest/V1beta.MinuteRange)\n- [0.22.2](/php/docs/reference/analytics-data/0.22.2/V1beta.MinuteRange)\n- [0.21.1](/php/docs/reference/analytics-data/0.21.1/V1beta.MinuteRange)\n- [0.20.1](/php/docs/reference/analytics-data/0.20.1/V1beta.MinuteRange)\n- [0.19.0](/php/docs/reference/analytics-data/0.19.0/V1beta.MinuteRange)\n- [0.18.0](/php/docs/reference/analytics-data/0.18.0/V1beta.MinuteRange)\n- [0.17.1](/php/docs/reference/analytics-data/0.17.1/V1beta.MinuteRange)\n- [0.16.4](/php/docs/reference/analytics-data/0.16.4/V1beta.MinuteRange)\n- [0.14.0](/php/docs/reference/analytics-data/0.14.0/V1beta.MinuteRange)\n- [0.13.0](/php/docs/reference/analytics-data/0.13.0/V1beta.MinuteRange)\n- [0.12.0](/php/docs/reference/analytics-data/0.12.0/V1beta.MinuteRange)\n- [0.11.2](/php/docs/reference/analytics-data/0.11.2/V1beta.MinuteRange)\n- [0.10.1](/php/docs/reference/analytics-data/0.10.1/V1beta.MinuteRange)\n- [0.9.5](/php/docs/reference/analytics-data/0.9.5/V1beta.MinuteRange) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Google Analytics Data V1beta Client class MinuteRange.\n\nA contiguous set of minutes: `startMinutesAgo`, `startMinutesAgo + 1`, ...,\n`endMinutesAgo`. Requests are allowed up to 2 minute ranges.\n\nGenerated from protobuf message `google.analytics.data.v1beta.MinuteRange`\n\nNamespace\n---------\n\nGoogle \\\\ Analytics \\\\ Data \\\\ V1beta\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getStartMinutesAgo\n\nThe inclusive start minute for the query as a number of minutes before now.\n\nFor example, `\"startMinutesAgo\": 29` specifies the report should include\nevent data from 29 minutes ago and after. Cannot be after `endMinutesAgo`.\nIf unspecified, `startMinutesAgo` is defaulted to 29. Standard Analytics\nproperties can request up to the last 30 minutes of event data\n(`startMinutesAgo \u003c= 29`), and 360 Analytics properties can request up to\nthe last 60 minutes of event data (`startMinutesAgo \u003c= 59`).\n\n### hasStartMinutesAgo\n\n### clearStartMinutesAgo\n\n### setStartMinutesAgo\n\nThe inclusive start minute for the query as a number of minutes before now.\n\nFor example, `\"startMinutesAgo\": 29` specifies the report should include\nevent data from 29 minutes ago and after. Cannot be after `endMinutesAgo`.\nIf unspecified, `startMinutesAgo` is defaulted to 29. Standard Analytics\nproperties can request up to the last 30 minutes of event data\n(`startMinutesAgo \u003c= 29`), and 360 Analytics properties can request up to\nthe last 60 minutes of event data (`startMinutesAgo \u003c= 59`).\n\n### getEndMinutesAgo\n\nThe inclusive end minute for the query as a number of minutes before now.\n\nCannot be before `startMinutesAgo`. For example, `\"endMinutesAgo\": 15`\nspecifies the report should include event data from prior to 15 minutes\nago.\nIf unspecified, `endMinutesAgo` is defaulted to 0. Standard Analytics\nproperties can request any minute in the last 30 minutes of event data\n(`endMinutesAgo \u003c= 29`), and 360 Analytics properties can request any\nminute in the last 60 minutes of event data (`endMinutesAgo \u003c= 59`).\n\n### hasEndMinutesAgo\n\n### clearEndMinutesAgo\n\n### setEndMinutesAgo\n\nThe inclusive end minute for the query as a number of minutes before now.\n\nCannot be before `startMinutesAgo`. For example, `\"endMinutesAgo\": 15`\nspecifies the report should include event data from prior to 15 minutes\nago.\nIf unspecified, `endMinutesAgo` is defaulted to 0. Standard Analytics\nproperties can request any minute in the last 30 minutes of event data\n(`endMinutesAgo \u003c= 29`), and 360 Analytics properties can request any\nminute in the last 60 minutes of event data (`endMinutesAgo \u003c= 59`).\n\n### getName\n\nAssigns a name to this minute range. The dimension `dateRange` is valued to\nthis name in a report response. If set, cannot begin with `date_range_` or\n`RESERVED_`. If not set, minute ranges are named by their zero based index\nin the request: `date_range_0`, `date_range_1`, etc.\n\n### setName\n\nAssigns a name to this minute range. The dimension `dateRange` is valued to\nthis name in a report response. If set, cannot begin with `date_range_` or\n`RESERVED_`. If not set, minute ranges are named by their zero based index\nin the request: `date_range_0`, `date_range_1`, etc."]]