Batch Get
|
|||||
|
|
Returns the Analytics data
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- View and manage your Google Analytics data
- View your Google Analytics data
Input
This building block consumes 37 input parameters
Name | Format | Description |
---|---|---|
useResourceQuotas |
BOOLEAN |
Enables
resource based quotas,
(defaults to |
reportRequests[] |
OBJECT |
The main request class which specifies the Reporting API request |
reportRequests[].samplingLevel |
ENUMERATION |
The desired report
sample size.
If the the |
reportRequests[].dimensions[] |
OBJECT |
Dimensions
are attributes of your data. For example, the dimension |
reportRequests[].dimensions[].histogramBuckets[] |
INTEGER |
|
reportRequests[].dimensions[].name |
STRING |
Name of the dimension to fetch, for example |
reportRequests[].dateRanges[] |
OBJECT |
A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
The start and end dates are specified in
ISO8601 date format |
reportRequests[].dateRanges[].endDate |
STRING |
The end date for the query in the format |
reportRequests[].dateRanges[].startDate |
STRING |
The start date for the query in the format |
reportRequests[].pageToken |
STRING |
A continuation token to get the next page of the results. Adding this to the request will return the rows after the pageToken. The pageToken should be the value returned in the nextPageToken parameter in the response to the GetReports request |
reportRequests[].pivots[] |
OBJECT |
The Pivot describes the pivot section in the request. The Pivot helps rearrange the information in the table for certain reports by pivoting your data on a second dimension |
reportRequests[].pivots[].maxGroupCount |
INTEGER |
Specifies the maximum number of groups to return. The default value is 10, also the maximum value is 1,000 |
reportRequests[].pivots[].startGroup |
INTEGER |
If k metrics were requested, then the response will contain some
data-dependent multiple of k columns in the report. E.g., if you pivoted
on the dimension The following let you choose which of the groups of k columns are included in the response |
reportRequests[].includeEmptyRows |
BOOLEAN |
If set to false, the response does not include rows if all the retrieved metrics are equal to zero. The default is false which will exclude these rows |
reportRequests[].metricFilterClauses[] |
OBJECT |
Represents a group of metric filters. Set the operator value to specify how the filters are logically combined |
reportRequests[].metricFilterClauses[].operator |
ENUMERATION |
The operator for combining multiple metric filters. If unspecified, it is
treated as an |
reportRequests[].pageSize |
INTEGER |
Page size is for paging and specifies the maximum number of returned rows.
Page size should be >= 0. A query returns the default of 1,000 rows.
The Analytics Core Reporting API returns a maximum of 100,000 rows per
request, no matter how many you ask for. It can also return fewer rows
than requested, if there aren't as many dimension segments as you expect.
For instance, there are fewer than 300 possible values for |
reportRequests[].hideTotals |
BOOLEAN |
If set to true, hides the total of all metrics for all the matching rows, for every date range. The default false and will return the totals |
reportRequests[].hideValueRanges |
BOOLEAN |
If set to true, hides the minimum and maximum across all matching rows. The default is false and the value ranges are returned |
reportRequests[].cohortGroup |
OBJECT |
Defines a cohort group. For example:
|
reportRequests[].cohortGroup.cohorts[] |
OBJECT |
Defines a cohort. A cohort is a group of users who share a common characteristic. For example, all users with the same acquisition date belong to the same cohort |
reportRequests[].cohortGroup.lifetimeValue |
BOOLEAN |
Enable Life Time Value (LTV). LTV measures lifetime value for users acquired through different channels. Please see: Cohort Analysis and Lifetime Value If the value of lifetimeValue is false:
When the lifetimeValue is true:
|
reportRequests[].filtersExpression |
STRING |
Dimension or metric filters that restrict the data returned for your
request. To use the |
reportRequests[].viewId |
STRING |
The Analytics
view ID
from which to retrieve data. Every ReportRequest
within a |
reportRequests[].metrics[] |
OBJECT |
Metrics
are the quantitative measurements. For example, the metric |
reportRequests[].metrics[].expression |
STRING |
A metric expression in the request. An expression is constructed from one
or more metrics and numbers. Accepted operators include: Plus (+), Minus
(-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,
Positive cardinal numbers (0-9), can include decimals and is limited to
1024 characters. Example |
reportRequests[].metrics[].formattingType |
ENUMERATION |
Specifies how the metric expression should be formatted, for example
|
reportRequests[].metrics[].alias |
STRING |
An alias for the metric expression is an alternate name for the expression. The alias can be used for filtering and sorting. This field is optional and is useful if the expression is not a single metric but a complex expression which cannot be used in filtering and sorting. The alias is also used in the response column header |
reportRequests[].dimensionFilterClauses[] |
OBJECT |
A group of dimension filters. Set the operator value to specify how the filters are logically combined |
reportRequests[].dimensionFilterClauses[].operator |
ENUMERATION |
The operator for combining multiple dimension filters. If unspecified, it
is treated as an |
reportRequests[].orderBys[] |
OBJECT |
Specifies the sorting options |
reportRequests[].orderBys[].sortOrder |
ENUMERATION |
The sorting order for the field |
reportRequests[].orderBys[].fieldName |
STRING |
The field which to sort by. The default sort order is ascending. Example:
|
reportRequests[].orderBys[].orderType |
ENUMERATION |
The order type. The default orderType is |
reportRequests[].segments[] |
OBJECT |
The segment definition, if the report needs to be segmented. A Segment is a subset of the Analytics data. For example, of the entire set of users, one Segment might be users from a particular country or city |
reportRequests[].segments[].dynamicSegment |
OBJECT |
Dynamic segment definition for defining the segment within the request. A segment can select users, sessions or both |
reportRequests[].segments[].segmentId |
STRING |
The segment ID of a built-in or custom segment, for example |
= Parameter name
= Format
useResourceQuotas BOOLEAN Enables
resource based quotas,
(defaults to |
reportRequests[] OBJECT The main request class which specifies the Reporting API request |
reportRequests[].samplingLevel ENUMERATION The desired report
sample size.
If the the |
reportRequests[].dimensions[] OBJECT Dimensions
are attributes of your data. For example, the dimension |
reportRequests[].dimensions[].histogramBuckets[] INTEGER |
reportRequests[].dimensions[].name STRING Name of the dimension to fetch, for example |
reportRequests[].dateRanges[] OBJECT A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
The start and end dates are specified in
ISO8601 date format |
reportRequests[].dateRanges[].endDate STRING The end date for the query in the format |
reportRequests[].dateRanges[].startDate STRING The start date for the query in the format |
reportRequests[].pageToken STRING A continuation token to get the next page of the results. Adding this to the request will return the rows after the pageToken. The pageToken should be the value returned in the nextPageToken parameter in the response to the GetReports request |
reportRequests[].pivots[] OBJECT The Pivot describes the pivot section in the request. The Pivot helps rearrange the information in the table for certain reports by pivoting your data on a second dimension |
reportRequests[].pivots[].maxGroupCount INTEGER Specifies the maximum number of groups to return. The default value is 10, also the maximum value is 1,000 |
reportRequests[].pivots[].startGroup INTEGER If k metrics were requested, then the response will contain some
data-dependent multiple of k columns in the report. E.g., if you pivoted
on the dimension The following let you choose which of the groups of k columns are included in the response |
reportRequests[].includeEmptyRows BOOLEAN If set to false, the response does not include rows if all the retrieved metrics are equal to zero. The default is false which will exclude these rows |
reportRequests[].metricFilterClauses[] OBJECT Represents a group of metric filters. Set the operator value to specify how the filters are logically combined |
reportRequests[].metricFilterClauses[].operator ENUMERATION The operator for combining multiple metric filters. If unspecified, it is
treated as an |
reportRequests[].pageSize INTEGER Page size is for paging and specifies the maximum number of returned rows.
Page size should be >= 0. A query returns the default of 1,000 rows.
The Analytics Core Reporting API returns a maximum of 100,000 rows per
request, no matter how many you ask for. It can also return fewer rows
than requested, if there aren't as many dimension segments as you expect.
For instance, there are fewer than 300 possible values for |
reportRequests[].hideTotals BOOLEAN If set to true, hides the total of all metrics for all the matching rows, for every date range. The default false and will return the totals |
reportRequests[].hideValueRanges BOOLEAN If set to true, hides the minimum and maximum across all matching rows. The default is false and the value ranges are returned |
reportRequests[].cohortGroup OBJECT Defines a cohort group. For example:
|
reportRequests[].cohortGroup.cohorts[] OBJECT Defines a cohort. A cohort is a group of users who share a common characteristic. For example, all users with the same acquisition date belong to the same cohort |
reportRequests[].cohortGroup.lifetimeValue BOOLEAN Enable Life Time Value (LTV). LTV measures lifetime value for users acquired through different channels. Please see: Cohort Analysis and Lifetime Value If the value of lifetimeValue is false:
When the lifetimeValue is true:
|
reportRequests[].filtersExpression STRING Dimension or metric filters that restrict the data returned for your
request. To use the |
reportRequests[].viewId STRING The Analytics
view ID
from which to retrieve data. Every ReportRequest
within a |
reportRequests[].metrics[] OBJECT Metrics
are the quantitative measurements. For example, the metric |
reportRequests[].metrics[].expression STRING A metric expression in the request. An expression is constructed from one
or more metrics and numbers. Accepted operators include: Plus (+), Minus
(-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,
Positive cardinal numbers (0-9), can include decimals and is limited to
1024 characters. Example |
reportRequests[].metrics[].formattingType ENUMERATION Specifies how the metric expression should be formatted, for example
|
reportRequests[].metrics[].alias STRING An alias for the metric expression is an alternate name for the expression. The alias can be used for filtering and sorting. This field is optional and is useful if the expression is not a single metric but a complex expression which cannot be used in filtering and sorting. The alias is also used in the response column header |
reportRequests[].dimensionFilterClauses[] OBJECT A group of dimension filters. Set the operator value to specify how the filters are logically combined |
reportRequests[].dimensionFilterClauses[].operator ENUMERATION The operator for combining multiple dimension filters. If unspecified, it
is treated as an |
reportRequests[].orderBys[] OBJECT Specifies the sorting options |
reportRequests[].orderBys[].sortOrder ENUMERATION The sorting order for the field |
reportRequests[].orderBys[].fieldName STRING The field which to sort by. The default sort order is ascending. Example:
|
reportRequests[].orderBys[].orderType ENUMERATION The order type. The default orderType is |
reportRequests[].segments[] OBJECT The segment definition, if the report needs to be segmented. A Segment is a subset of the Analytics data. For example, of the entire set of users, one Segment might be users from a particular country or city |
reportRequests[].segments[].dynamicSegment OBJECT Dynamic segment definition for defining the segment within the request. A segment can select users, sessions or both |
reportRequests[].segments[].segmentId STRING The segment ID of a built-in or custom segment, for example |
Output
This building block provides 19 output parameters
Name | Format | Description |
---|---|---|
reports[] |
OBJECT |
The data response corresponding to the request |
reports[].columnHeader |
OBJECT |
Column headers |
reports[].columnHeader.dimensions[] |
STRING |
|
reports[].columnHeader.metricHeader |
OBJECT |
The headers for the metrics |
reports[].data |
OBJECT |
The data part of the report |
reports[].data.dataLastRefreshed |
ANY |
The last time the data in the report was refreshed. All the hits received before this timestamp are included in the calculation of the report |
reports[].data.maximums[] |
OBJECT |
Used to return a list of metrics for a single DateRange / dimension combination |
reports[].data.minimums[] |
OBJECT |
Used to return a list of metrics for a single DateRange / dimension combination |
reports[].data.samplingSpaceSizes[] |
INTEGER |
|
reports[].data.totals[] |
OBJECT |
Used to return a list of metrics for a single DateRange / dimension combination |
reports[].data.samplesReadCounts[] |
INTEGER |
|
reports[].data.isDataGolden |
BOOLEAN |
Indicates if response to this request is golden or not. Data is golden when the exact same request will not produce any new results if asked at a later point in time |
reports[].data.rows[] |
OBJECT |
A row in the report |
reports[].data.rowCount |
INTEGER |
Total number of matching rows for this query |
reports[].nextPageToken |
STRING |
Page token to retrieve the next page of results in the list |
queryCost |
INTEGER |
The amount of resource quota tokens deducted to execute the query. Includes all responses |
resourceQuotasRemaining |
OBJECT |
The resource quota tokens remaining for the property after the request is completed |
resourceQuotasRemaining.hourlyQuotaTokensRemaining |
INTEGER |
Hourly resource quota tokens remaining |
resourceQuotasRemaining.dailyQuotaTokensRemaining |
INTEGER |
Daily resource quota remaining remaining |
= Parameter name
= Format
reports[] OBJECT The data response corresponding to the request |
reports[].columnHeader OBJECT Column headers |
reports[].columnHeader.dimensions[] STRING |
reports[].columnHeader.metricHeader OBJECT The headers for the metrics |
reports[].data OBJECT The data part of the report |
reports[].data.dataLastRefreshed ANY The last time the data in the report was refreshed. All the hits received before this timestamp are included in the calculation of the report |
reports[].data.maximums[] OBJECT Used to return a list of metrics for a single DateRange / dimension combination |
reports[].data.minimums[] OBJECT Used to return a list of metrics for a single DateRange / dimension combination |
reports[].data.samplingSpaceSizes[] INTEGER |
reports[].data.totals[] OBJECT Used to return a list of metrics for a single DateRange / dimension combination |
reports[].data.samplesReadCounts[] INTEGER |
reports[].data.isDataGolden BOOLEAN Indicates if response to this request is golden or not. Data is golden when the exact same request will not produce any new results if asked at a later point in time |
reports[].data.rows[] OBJECT A row in the report |
reports[].data.rowCount INTEGER Total number of matching rows for this query |
reports[].nextPageToken STRING Page token to retrieve the next page of results in the list |
queryCost INTEGER The amount of resource quota tokens deducted to execute the query. Includes all responses |
resourceQuotasRemaining OBJECT The resource quota tokens remaining for the property after the request is completed |
resourceQuotasRemaining.hourlyQuotaTokensRemaining INTEGER Hourly resource quota tokens remaining |
resourceQuotasRemaining.dailyQuotaTokensRemaining INTEGER Daily resource quota remaining remaining |