blob: d923b6ddbb044e63d0a31b348204cb7661045fd6 [file] [log] [blame]
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="analyticsdata_v1alpha.html">Google Analytics Data API</a> . <a href="analyticsdata_v1alpha.v1alpha.html">v1alpha</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#batchRunPivotReports">batchRunPivotReports(body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Returns multiple pivot reports in a batch. All reports must be for the same Entity.</p>
80<p class="toc_element">
81 <code><a href="#batchRunReports">batchRunReports(body=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Returns multiple reports in a batch. All reports must be for the same Entity.</p>
83<p class="toc_element">
84 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070087 <code><a href="#runPivotReport">runPivotReport(body=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.</p>
89<p class="toc_element">
90 <code><a href="#runReport">runReport(body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="batchRunPivotReports">batchRunPivotReports(body=None, x__xgafv=None)</code>
95 <pre>Returns multiple pivot reports in a batch. All reports must be for the same Entity.
96
97Args:
98 body: object, The request body.
99 The object takes the form of:
100
101{ # The batch request containing multiple pivot report requests.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700102 &quot;requests&quot;: [ # Individual requests. Each request has a separate pivot report response. Each batch request is allowed up to 5 requests.
103 { # The request to generate a pivot report.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800104 &quot;cohortSpec&quot;: { # Specification for a cohort report. # Cohort group associated with this request. If there is a cohort group in the request the &#x27;cohort&#x27; dimension must be present.
105 &quot;cohortsRange&quot;: { # Describes date range for a cohort report. # The data ranges of cohorts.
106 &quot;granularity&quot;: &quot;A String&quot;, # Reporting date range for each cohort is calculated based on these three fields.
107 &quot;startOffset&quot;: 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
108 &quot;endOffset&quot;: 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800109 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800110 &quot;cohortReportSettings&quot;: { # Settings of a cohort report. # Settings of a cohort report.
111 &quot;accumulate&quot;: True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`.
112 },
113 &quot;cohorts&quot;: [ # The definition for the cohorts.
114 { # 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.
115 &quot;dateRange&quot;: { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges. # The cohort selects users whose first visit date is between start date and end date defined in the `dateRange`. In a cohort request, this `dateRange` is required and the `dateRanges` in the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. The date range should be aligned with the cohort&#x27;s granularity. If CohortsRange uses daily granularity, the date range can be aligned to any day. If CohortsRange uses weekly granularity, the date range should be aligned to the week boundary, starting at Sunday and ending Saturday. If CohortsRange uses monthly granularity, the date range should be aligned to the month, starting at the first and ending on the last day of the month.
116 &quot;name&quot;: &quot;A String&quot;, # Assigns a name to this date 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, date ranges are named by their zero based index in the request: `date_range_0`, `date_range_1`, etc.
117 &quot;endDate&quot;: &quot;A String&quot;, # The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
118 &quot;startDate&quot;: &quot;A String&quot;, # The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
119 },
120 &quot;name&quot;: &quot;A String&quot;, # Assigns a name to this cohort. The dimension `cohort` is valued to this name in a report response. If set, cannot begin with `cohort_` or `RESERVED_`. If not set, cohorts are named by their zero based index `cohort_0`, `cohort_1`, etc.
121 &quot;dimension&quot;: &quot;A String&quot;, # The dimension used by cohort. Only supports `firstTouchDate` for retention report.
122 },
123 ],
124 },
125 &quot;metricFilter&quot;: { # To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics. # The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800126 &quot;filter&quot;: { # An expression to filter dimension or metric values. # A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800127 &quot;nullFilter&quot;: True or False, # A filter for null values. If True, a null dimension value is matched by this filter. Null filter is commonly used inside a NOT filter expression. For example, a NOT expression of a null filter removes rows when a dimension is null.
128 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
129 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
130 &quot;doubleValue&quot;: 3.14, # Double value
131 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
132 },
133 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
134 &quot;doubleValue&quot;: 3.14, # Double value
135 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
136 },
137 },
138 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
139 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
140 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
141 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
142 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800143 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
144 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
145 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800146 &quot;doubleValue&quot;: 3.14, # Double value
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800147 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800148 },
149 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800150 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800151 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
152 &quot;values&quot;: [ # The list of string values. Must be non-empty.
153 &quot;A String&quot;,
154 ],
155 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
156 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700157 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800158 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
159 &quot;expressions&quot;: [ # A list of filter expressions.
160 # Object with schema name: FilterExpression
161 ],
162 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800163 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
164 &quot;expressions&quot;: [ # A list of filter expressions.
165 # Object with schema name: FilterExpression
166 ],
167 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800168 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800169 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800170 &quot;dateRanges&quot;: [ # The date range to retrieve event data for the report. If multiple date ranges are specified, event data from each date range is used in the report. A special dimension with field name &quot;dateRange&quot; can be included in a Pivot&#x27;s field names; if included, the report compares between date ranges. In a cohort request, this `dateRanges` must be unspecified.
171 { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
172 &quot;name&quot;: &quot;A String&quot;, # Assigns a name to this date 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, date ranges are named by their zero based index in the request: `date_range_0`, `date_range_1`, etc.
173 &quot;endDate&quot;: &quot;A String&quot;, # The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
174 &quot;startDate&quot;: &quot;A String&quot;, # The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
175 },
176 ],
177 &quot;dimensionFilter&quot;: { # To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics. # The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter.
178 &quot;filter&quot;: { # An expression to filter dimension or metric values. # A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.
179 &quot;nullFilter&quot;: True or False, # A filter for null values. If True, a null dimension value is matched by this filter. Null filter is commonly used inside a NOT filter expression. For example, a NOT expression of a null filter removes rows when a dimension is null.
180 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
181 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
182 &quot;doubleValue&quot;: 3.14, # Double value
183 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
184 },
185 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
186 &quot;doubleValue&quot;: 3.14, # Double value
187 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
188 },
189 },
190 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
191 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
192 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
193 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
194 },
195 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
196 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
197 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
198 &quot;doubleValue&quot;: 3.14, # Double value
199 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
200 },
201 },
202 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
203 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
204 &quot;values&quot;: [ # The list of string values. Must be non-empty.
205 &quot;A String&quot;,
206 ],
207 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
208 },
209 },
210 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
211 &quot;expressions&quot;: [ # A list of filter expressions.
212 # Object with schema name: FilterExpression
213 ],
214 },
215 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
216 &quot;expressions&quot;: [ # A list of filter expressions.
217 # Object with schema name: FilterExpression
218 ],
219 },
220 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800221 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800222 &quot;metrics&quot;: [ # The metrics requested, at least one metric needs to be specified. All defined metrics must be used by one of the following: metric_expression, metric_filter, order_bys.
223 { # The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.
224 &quot;name&quot;: &quot;A String&quot;, # The name of the metric. See the [API Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) for the list of metric names. If `expression` is specified, `name` can be any string that you would like. For example if `expression` is `screenPageViews/sessions`, you could call that metric&#x27;s name = `viewsPerSession`. Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric `expression`.
225 &quot;invisible&quot;: True or False, # Indicates if a metric is invisible in the report response. If a metric is invisible, the metric will not produce a column in the response, but can be used in `metricFilter`, `orderBys`, or a metric `expression`.
226 &quot;expression&quot;: &quot;A String&quot;, # A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.
227 },
228 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800229 &quot;dimensions&quot;: [ # The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys.
230 { # Dimensions are attributes of your data. For example, the dimension city indicates the city from which an event originates. Dimension values in report responses are strings; for example, city could be &quot;Paris&quot; or &quot;New York&quot;. Requests are allowed up to 8 dimensions.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800231 &quot;name&quot;: &quot;A String&quot;, # The name of the dimension. See the [API Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names. If `dimensionExpression` is specified, `name` can be any string that you would like. For example if a `dimensionExpression` concatenates `country` and `city`, you could call that dimension `countryAndCity`. Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, `dimensionExpression`, and `pivots`.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800232 &quot;dimensionExpression&quot;: { # Used to express a dimension which is the result of a formula of multiple dimensions. Example usages: 1) lower_case(dimension) 2) concatenate(dimension1, symbol, dimension2). # One dimension can be the result of an expression of multiple dimensions. For example, dimension &quot;country, city&quot;: concatenate(country, &quot;, &quot;, city).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800233 &quot;upperCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case.
234 &quot;dimensionName&quot;: &quot;A String&quot;, # Name of a dimension. The name must refer back to a name in dimensions field of the request.
235 },
236 &quot;lowerCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case.
237 &quot;dimensionName&quot;: &quot;A String&quot;, # Name of a dimension. The name must refer back to a name in dimensions field of the request.
238 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800239 &quot;concatenate&quot;: { # Used to combine dimension values to a single dimension. # Used to combine dimension values to a single dimension. For example, dimension &quot;country, city&quot;: concatenate(country, &quot;, &quot;, city).
240 &quot;dimensionNames&quot;: [ # Names of dimensions. The names must refer back to names in the dimensions field of the request.
241 &quot;A String&quot;,
242 ],
243 &quot;delimiter&quot;: &quot;A String&quot;, # The delimiter placed between dimension names. Delimiters are often single characters such as &quot;|&quot; or &quot;,&quot; but can be longer strings. If a dimension value contains the delimiter, both will be present in response with no distinction. For example if dimension 1 value = &quot;US,FR&quot;, dimension 2 value = &quot;JP&quot;, and delimiter = &quot;,&quot;, then the response will contain &quot;US,FR,JP&quot;.
244 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800245 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800246 },
247 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800248 &quot;keepEmptyRows&quot;: True or False, # If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800249 &quot;entity&quot;: { # The unique identifier of the property whose events are tracked. # A property whose events are tracked. Within a batch request, this entity should either be unspecified or consistent with the batch-level entity.
250 &quot;propertyId&quot;: &quot;A String&quot;, # A Google Analytics GA4 property id. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800251 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800252 &quot;pivots&quot;: [ # Describes the visual format of the report&#x27;s dimensions in columns or rows. The union of the fieldNames (dimension names) in all pivots must be a subset of dimension names defined in Dimensions. No two pivots can share a dimension. A dimension is only visible if it appears in a pivot.
253 { # Describes the visible dimension columns and rows in the report response.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800254 &quot;limit&quot;: &quot;A String&quot;, # The number of rows to return in this pivot. If unspecified, 10 rows are returned. If -1, all rows are returned.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800255 &quot;offset&quot;: &quot;A String&quot;, # The row count of the start row. The first row is counted as row 0.
256 &quot;metricAggregations&quot;: [ # Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800257 &quot;A String&quot;,
258 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800259 &quot;orderBys&quot;: [ # Specifies how dimensions are ordered in the pivot. In the first Pivot, the OrderBys determine Row and PivotDimensionHeader ordering; in subsequent Pivots, the OrderBys determine only PivotDimensionHeader ordering. Dimensions specified in these OrderBys must be a subset of Pivot.field_names.
260 { # The sort options.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800261 &quot;metric&quot;: { # Sorts by metric values. # Sorts results by a metric&#x27;s values.
262 &quot;metricName&quot;: &quot;A String&quot;, # A metric name in the request to order by.
263 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800264 &quot;desc&quot;: True or False, # If true, sorts by descending order.
265 &quot;pivot&quot;: { # Sorts by a pivot column group. # Sorts results by a metric&#x27;s values within a pivot column group.
266 &quot;pivotSelections&quot;: [ # Used to select a dimension name and value pivot. If multiple pivot selections are given, the sort occurs on rows where all pivot selection dimension name and value pairs match the row&#x27;s dimension name and value pair.
267 { # A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric&#x27;s value. For example if pivots = {{&quot;browser&quot;, &quot;Chrome&quot;}} and metric_name = &quot;Sessions&quot;, then the rows will be sorted based on Sessions in Chrome. ---------|----------|----------------|----------|---------------- | Chrome | Chrome | Safari | Safari ---------|----------|----------------|----------|---------------- Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions ---------|----------|----------------|----------|---------------- US | 2 | 2 | 3 | 1 ---------|----------|----------------|----------|---------------- Canada | 3 | 1 | 4 | 1 ---------|----------|----------------|----------|----------------
268 &quot;dimensionName&quot;: &quot;A String&quot;, # Must be a dimension name from the request.
269 &quot;dimensionValue&quot;: &quot;A String&quot;, # Order by only when the named dimension is this value.
270 },
271 ],
272 &quot;metricName&quot;: &quot;A String&quot;, # In the response to order by, order rows by this column. Must be a metric name from the request.
273 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800274 &quot;dimension&quot;: { # Sorts by dimension values. # Sorts results by a dimension&#x27;s values.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800275 &quot;dimensionName&quot;: &quot;A String&quot;, # A dimension name in the request to order by.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800276 &quot;orderType&quot;: &quot;A String&quot;, # Controls the rule for dimension value ordering.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800277 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800278 },
279 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800280 &quot;fieldNames&quot;: [ # Dimension names for visible columns in the report response. Including &quot;dateRange&quot; produces a date range column; for each row in the response, dimension values in the date range column will indicate the corresponding date range from the request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800281 &quot;A String&quot;,
282 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800283 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800284 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800285 &quot;returnPropertyQuota&quot;: True or False, # Toggles whether to return the current state of this Analytics Property&#x27;s quota. Quota is returned in [PropertyQuota](#PropertyQuota).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800286 &quot;currencyCode&quot;: &quot;A String&quot;, # A currency code in ISO4217 format, such as &quot;AED&quot;, &quot;USD&quot;, &quot;JPY&quot;. If the field is empty, the report uses the entity&#x27;s default currency.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800287 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700288 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800289 &quot;entity&quot;: { # The unique identifier of the property whose events are tracked. # A property whose events are tracked. This entity must be specified for the batch. The entity within RunPivotReportRequest may either be unspecified or consistent with this entity.
290 &quot;propertyId&quot;: &quot;A String&quot;, # A Google Analytics GA4 property id. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
291 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700292 }
293
294 x__xgafv: string, V1 error format.
295 Allowed values
296 1 - v1 error format
297 2 - v2 error format
298
299Returns:
300 An object of the form:
301
302 { # The batch response containing multiple pivot reports.
303 &quot;pivotReports&quot;: [ # Individual responses. Each response has a separate pivot report request.
304 { # The response pivot report table corresponding to a pivot request.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800305 &quot;rows&quot;: [ # Rows of dimension value combinations and metric values in the report.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800306 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
307 &quot;metricValues&quot;: [ # List of requested visible metric values.
308 { # The value of a metric.
309 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
310 },
311 ],
312 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
313 { # The value of a dimension.
314 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
315 },
316 ],
317 },
318 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800319 &quot;metricHeaders&quot;: [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
320 { # Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800321 &quot;name&quot;: &quot;A String&quot;, # The metric&#x27;s name.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800322 &quot;type&quot;: &quot;A String&quot;, # The metric&#x27;s data type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700323 },
324 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800325 &quot;aggregates&quot;: [ # Aggregation of metric values. Can be totals, minimums, or maximums. The returned aggregations are controlled by the metric_aggregations in the pivot. The type of aggregation returned in each row is shown by the dimension_values which are set to &quot;RESERVED_&quot;.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800326 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
327 &quot;metricValues&quot;: [ # List of requested visible metric values.
328 { # The value of a metric.
329 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
330 },
331 ],
332 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
333 { # The value of a dimension.
334 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
335 },
336 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700337 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800338 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800339 &quot;metadata&quot;: { # Response&#x27;s metadata carrying additional information about the report content. # Metadata for the report.
340 &quot;dataLossFromOtherRow&quot;: True or False, # If true, indicates some buckets of dimension combinations are rolled into &quot;(other)&quot; row. This can happen for high cardinality reports.
341 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700342 &quot;pivotHeaders&quot;: [ # Summarizes the columns and rows created by a pivot. Each pivot in the request produces one header in the response. If we have a request like this: &quot;pivots&quot;: [{ &quot;fieldNames&quot;: [&quot;country&quot;, &quot;city&quot;] }, { &quot;fieldNames&quot;: &quot;eventName&quot; }] We will have the following `pivotHeaders` in the response: &quot;pivotHeaders&quot; : [{ &quot;dimensionHeaders&quot;: [{ &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;United Kingdom&quot; }, { &quot;value&quot;: &quot;London&quot; } ] }, { &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;Japan&quot; }, { &quot;value&quot;: &quot;Osaka&quot; } ] }] }, { &quot;dimensionHeaders&quot;: [{ &quot;dimensionValues&quot;: [{ &quot;value&quot;: &quot;session_start&quot; }] }, { &quot;dimensionValues&quot;: [{ &quot;value&quot;: &quot;scroll&quot; }] }] }]
343 { # Dimensions&#x27; values in a single pivot.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800344 &quot;rowCount&quot;: 42, # The cardinality of the pivot as if offset = 0 and limit = -1. The total number of rows for this pivot&#x27;s fields regardless of how the parameters offset and limit are specified in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700345 &quot;pivotDimensionHeaders&quot;: [ # The size is the same as the cardinality of the corresponding dimension combinations.
346 { # Summarizes dimension values from a row for this pivot.
347 &quot;dimensionValues&quot;: [ # Values of multiple dimensions in a pivot.
348 { # The value of a dimension.
349 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
350 },
351 ],
352 },
353 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700354 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700355 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800356 &quot;dimensionHeaders&quot;: [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
357 { # Describes a dimension column in the report. Dimensions requested in a report produce column entries within rows and DimensionHeaders. However, dimensions used exclusively within filters or expressions do not produce columns in a report; correspondingly, those dimensions do not produce headers.
358 &quot;name&quot;: &quot;A String&quot;, # The dimension&#x27;s name.
359 },
360 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800361 &quot;propertyQuota&quot;: { # Current state of all quotas for this Analytics Property. If any quota for a property is exhausted, all requests to that property will return Resource Exhausted errors. # This Analytics Property&#x27;s quota state including this request.
362 &quot;concurrentRequests&quot;: { # Current state for a particular quota group. # Standard Analytics Properties can send up to 10 concurrent requests; Analytics 360 Properties can use up to 50 concurrent requests.
363 &quot;consumed&quot;: 42, # Quota consumed by this request.
364 &quot;remaining&quot;: 42, # Quota remaining after this request.
365 },
366 &quot;tokensPerHour&quot;: { # Current state for a particular quota group. # Standard Analytics Properties can use up to 5,000 tokens per day; Analytics 360 Properties can use 50,000 tokens per day. An API request consumes a single number of tokens, and that number is deducted from both the hourly and daily quotas.
367 &quot;consumed&quot;: 42, # Quota consumed by this request.
368 &quot;remaining&quot;: 42, # Quota remaining after this request.
369 },
370 &quot;serverErrorsPerProjectPerHour&quot;: { # Current state for a particular quota group. # Standard Analytics Properties and cloud project pairs can have up to 10 server errors per hour; Analytics 360 Properties and cloud project pairs can have up to 50 server errors per hour.
371 &quot;consumed&quot;: 42, # Quota consumed by this request.
372 &quot;remaining&quot;: 42, # Quota remaining after this request.
373 },
374 &quot;tokensPerDay&quot;: { # Current state for a particular quota group. # Standard Analytics Properties can use up to 25,000 tokens per day; Analytics 360 Properties can use 250,000 tokens per day. Most requests consume fewer than 10 tokens.
375 &quot;consumed&quot;: 42, # Quota consumed by this request.
376 &quot;remaining&quot;: 42, # Quota remaining after this request.
377 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800378 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700379 },
380 ],
381 }</pre>
382</div>
383
384<div class="method">
385 <code class="details" id="batchRunReports">batchRunReports(body=None, x__xgafv=None)</code>
386 <pre>Returns multiple reports in a batch. All reports must be for the same Entity.
387
388Args:
389 body: object, The request body.
390 The object takes the form of:
391
392{ # The batch request containing multiple report requests.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800393 &quot;entity&quot;: { # The unique identifier of the property whose events are tracked. # A property whose events are tracked. This entity must be specified for the batch. The entity within RunReportRequest may either be unspecified or consistent with this entity.
394 &quot;propertyId&quot;: &quot;A String&quot;, # A Google Analytics GA4 property id. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
395 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700396 &quot;requests&quot;: [ # Individual requests. Each request has a separate report response. Each batch request is allowed up to 5 requests.
397 { # The request to generate a report.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800398 &quot;cohortSpec&quot;: { # Specification for a cohort report. # Cohort group associated with this request. If there is a cohort group in the request the &#x27;cohort&#x27; dimension must be present.
399 &quot;cohortsRange&quot;: { # Describes date range for a cohort report. # The data ranges of cohorts.
400 &quot;granularity&quot;: &quot;A String&quot;, # Reporting date range for each cohort is calculated based on these three fields.
401 &quot;startOffset&quot;: 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
402 &quot;endOffset&quot;: 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
403 },
404 &quot;cohortReportSettings&quot;: { # Settings of a cohort report. # Settings of a cohort report.
405 &quot;accumulate&quot;: True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`.
406 },
407 &quot;cohorts&quot;: [ # The definition for the cohorts.
408 { # 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.
409 &quot;dateRange&quot;: { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges. # The cohort selects users whose first visit date is between start date and end date defined in the `dateRange`. In a cohort request, this `dateRange` is required and the `dateRanges` in the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. The date range should be aligned with the cohort&#x27;s granularity. If CohortsRange uses daily granularity, the date range can be aligned to any day. If CohortsRange uses weekly granularity, the date range should be aligned to the week boundary, starting at Sunday and ending Saturday. If CohortsRange uses monthly granularity, the date range should be aligned to the month, starting at the first and ending on the last day of the month.
410 &quot;name&quot;: &quot;A String&quot;, # Assigns a name to this date 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, date ranges are named by their zero based index in the request: `date_range_0`, `date_range_1`, etc.
411 &quot;endDate&quot;: &quot;A String&quot;, # The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
412 &quot;startDate&quot;: &quot;A String&quot;, # The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
413 },
414 &quot;name&quot;: &quot;A String&quot;, # Assigns a name to this cohort. The dimension `cohort` is valued to this name in a report response. If set, cannot begin with `cohort_` or `RESERVED_`. If not set, cohorts are named by their zero based index `cohort_0`, `cohort_1`, etc.
415 &quot;dimension&quot;: &quot;A String&quot;, # The dimension used by cohort. Only supports `firstTouchDate` for retention report.
416 },
417 ],
418 },
419 &quot;dateRanges&quot;: [ # Date ranges of data to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the event data for the overlapping days is included in the response rows for both date ranges. In a cohort request, this `dateRanges` must be unspecified.
420 { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
421 &quot;name&quot;: &quot;A String&quot;, # Assigns a name to this date 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, date ranges are named by their zero based index in the request: `date_range_0`, `date_range_1`, etc.
422 &quot;endDate&quot;: &quot;A String&quot;, # The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
423 &quot;startDate&quot;: &quot;A String&quot;, # The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
424 },
425 ],
426 &quot;limit&quot;: &quot;A String&quot;, # The number of rows to return. If unspecified, 10 rows are returned. If -1, all rows are returned. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
427 &quot;keepEmptyRows&quot;: True or False, # If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800428 &quot;metricFilter&quot;: { # To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics. # The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter.
429 &quot;filter&quot;: { # An expression to filter dimension or metric values. # A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800430 &quot;nullFilter&quot;: True or False, # A filter for null values. If True, a null dimension value is matched by this filter. Null filter is commonly used inside a NOT filter expression. For example, a NOT expression of a null filter removes rows when a dimension is null.
431 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
432 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
433 &quot;doubleValue&quot;: 3.14, # Double value
434 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
435 },
436 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
437 &quot;doubleValue&quot;: 3.14, # Double value
438 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
439 },
440 },
441 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
442 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
443 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
444 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
445 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800446 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
447 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
448 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800449 &quot;doubleValue&quot;: 3.14, # Double value
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800450 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800451 },
452 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800453 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800454 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
455 &quot;values&quot;: [ # The list of string values. Must be non-empty.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800456 &quot;A String&quot;,
457 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800458 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800459 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800460 },
461 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
462 &quot;expressions&quot;: [ # A list of filter expressions.
463 # Object with schema name: FilterExpression
464 ],
465 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800466 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
467 &quot;expressions&quot;: [ # A list of filter expressions.
468 # Object with schema name: FilterExpression
469 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800470 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800471 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800472 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800473 &quot;currencyCode&quot;: &quot;A String&quot;, # A currency code in ISO4217 format, such as &quot;AED&quot;, &quot;USD&quot;, &quot;JPY&quot;. If the field is empty, the report uses the entity&#x27;s default currency.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800474 &quot;returnPropertyQuota&quot;: True or False, # Toggles whether to return the current state of this Analytics Property&#x27;s quota. Quota is returned in [PropertyQuota](#PropertyQuota).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800475 &quot;metrics&quot;: [ # The metrics requested and displayed.
476 { # The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.
477 &quot;name&quot;: &quot;A String&quot;, # The name of the metric. See the [API Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) for the list of metric names. If `expression` is specified, `name` can be any string that you would like. For example if `expression` is `screenPageViews/sessions`, you could call that metric&#x27;s name = `viewsPerSession`. Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric `expression`.
478 &quot;invisible&quot;: True or False, # Indicates if a metric is invisible in the report response. If a metric is invisible, the metric will not produce a column in the response, but can be used in `metricFilter`, `orderBys`, or a metric `expression`.
479 &quot;expression&quot;: &quot;A String&quot;, # A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.
480 },
481 ],
482 &quot;offset&quot;: &quot;A String&quot;, # The row count of the start row. The first row is counted as row 0. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
483 &quot;metricAggregations&quot;: [ # Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to &quot;RESERVED_(MetricAggregation)&quot;.
484 &quot;A String&quot;,
485 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800486 &quot;orderBys&quot;: [ # Specifies how rows are ordered in the response.
487 { # The sort options.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800488 &quot;metric&quot;: { # Sorts by metric values. # Sorts results by a metric&#x27;s values.
489 &quot;metricName&quot;: &quot;A String&quot;, # A metric name in the request to order by.
490 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800491 &quot;desc&quot;: True or False, # If true, sorts by descending order.
492 &quot;pivot&quot;: { # Sorts by a pivot column group. # Sorts results by a metric&#x27;s values within a pivot column group.
493 &quot;pivotSelections&quot;: [ # Used to select a dimension name and value pivot. If multiple pivot selections are given, the sort occurs on rows where all pivot selection dimension name and value pairs match the row&#x27;s dimension name and value pair.
494 { # A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric&#x27;s value. For example if pivots = {{&quot;browser&quot;, &quot;Chrome&quot;}} and metric_name = &quot;Sessions&quot;, then the rows will be sorted based on Sessions in Chrome. ---------|----------|----------------|----------|---------------- | Chrome | Chrome | Safari | Safari ---------|----------|----------------|----------|---------------- Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions ---------|----------|----------------|----------|---------------- US | 2 | 2 | 3 | 1 ---------|----------|----------------|----------|---------------- Canada | 3 | 1 | 4 | 1 ---------|----------|----------------|----------|----------------
495 &quot;dimensionName&quot;: &quot;A String&quot;, # Must be a dimension name from the request.
496 &quot;dimensionValue&quot;: &quot;A String&quot;, # Order by only when the named dimension is this value.
497 },
498 ],
499 &quot;metricName&quot;: &quot;A String&quot;, # In the response to order by, order rows by this column. Must be a metric name from the request.
500 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800501 &quot;dimension&quot;: { # Sorts by dimension values. # Sorts results by a dimension&#x27;s values.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800502 &quot;dimensionName&quot;: &quot;A String&quot;, # A dimension name in the request to order by.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800503 &quot;orderType&quot;: &quot;A String&quot;, # Controls the rule for dimension value ordering.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800504 },
505 },
506 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800507 &quot;entity&quot;: { # The unique identifier of the property whose events are tracked. # A property whose events are tracked. Within a batch request, this entity should either be unspecified or consistent with the batch-level entity.
508 &quot;propertyId&quot;: &quot;A String&quot;, # A Google Analytics GA4 property id. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
509 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800510 &quot;dimensionFilter&quot;: { # To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics. # The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter.
511 &quot;filter&quot;: { # An expression to filter dimension or metric values. # A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800512 &quot;nullFilter&quot;: True or False, # A filter for null values. If True, a null dimension value is matched by this filter. Null filter is commonly used inside a NOT filter expression. For example, a NOT expression of a null filter removes rows when a dimension is null.
513 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
514 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
515 &quot;doubleValue&quot;: 3.14, # Double value
516 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
517 },
518 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
519 &quot;doubleValue&quot;: 3.14, # Double value
520 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
521 },
522 },
523 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
524 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
525 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
526 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
527 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800528 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
529 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
530 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800531 &quot;doubleValue&quot;: 3.14, # Double value
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800532 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800533 },
534 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800535 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800536 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
537 &quot;values&quot;: [ # The list of string values. Must be non-empty.
538 &quot;A String&quot;,
539 ],
540 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
541 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800542 },
543 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
544 &quot;expressions&quot;: [ # A list of filter expressions.
545 # Object with schema name: FilterExpression
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800546 ],
547 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800548 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
549 &quot;expressions&quot;: [ # A list of filter expressions.
550 # Object with schema name: FilterExpression
551 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800552 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800553 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800554 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800555 &quot;dimensions&quot;: [ # The dimensions requested and displayed.
556 { # Dimensions are attributes of your data. For example, the dimension city indicates the city from which an event originates. Dimension values in report responses are strings; for example, city could be &quot;Paris&quot; or &quot;New York&quot;. Requests are allowed up to 8 dimensions.
557 &quot;name&quot;: &quot;A String&quot;, # The name of the dimension. See the [API Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names. If `dimensionExpression` is specified, `name` can be any string that you would like. For example if a `dimensionExpression` concatenates `country` and `city`, you could call that dimension `countryAndCity`. Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, `dimensionExpression`, and `pivots`.
558 &quot;dimensionExpression&quot;: { # Used to express a dimension which is the result of a formula of multiple dimensions. Example usages: 1) lower_case(dimension) 2) concatenate(dimension1, symbol, dimension2). # One dimension can be the result of an expression of multiple dimensions. For example, dimension &quot;country, city&quot;: concatenate(country, &quot;, &quot;, city).
559 &quot;upperCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case.
560 &quot;dimensionName&quot;: &quot;A String&quot;, # Name of a dimension. The name must refer back to a name in dimensions field of the request.
561 },
562 &quot;lowerCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case.
563 &quot;dimensionName&quot;: &quot;A String&quot;, # Name of a dimension. The name must refer back to a name in dimensions field of the request.
564 },
565 &quot;concatenate&quot;: { # Used to combine dimension values to a single dimension. # Used to combine dimension values to a single dimension. For example, dimension &quot;country, city&quot;: concatenate(country, &quot;, &quot;, city).
566 &quot;dimensionNames&quot;: [ # Names of dimensions. The names must refer back to names in the dimensions field of the request.
567 &quot;A String&quot;,
568 ],
569 &quot;delimiter&quot;: &quot;A String&quot;, # The delimiter placed between dimension names. Delimiters are often single characters such as &quot;|&quot; or &quot;,&quot; but can be longer strings. If a dimension value contains the delimiter, both will be present in response with no distinction. For example if dimension 1 value = &quot;US,FR&quot;, dimension 2 value = &quot;JP&quot;, and delimiter = &quot;,&quot;, then the response will contain &quot;US,FR,JP&quot;.
570 },
571 },
572 },
573 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800574 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700575 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700576 }
577
578 x__xgafv: string, V1 error format.
579 Allowed values
580 1 - v1 error format
581 2 - v2 error format
582
583Returns:
584 An object of the form:
585
586 { # The batch response containing multiple reports.
587 &quot;reports&quot;: [ # Individual responses. Each response has a separate report request.
588 { # The response report table corresponding to a request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800589 &quot;metricHeaders&quot;: [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
590 { # Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800591 &quot;name&quot;: &quot;A String&quot;, # The metric&#x27;s name.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800592 &quot;type&quot;: &quot;A String&quot;, # The metric&#x27;s data type.
593 },
594 ],
595 &quot;metadata&quot;: { # Response&#x27;s metadata carrying additional information about the report content. # Metadata for the report.
596 &quot;dataLossFromOtherRow&quot;: True or False, # If true, indicates some buckets of dimension combinations are rolled into &quot;(other)&quot; row. This can happen for high cardinality reports.
597 },
598 &quot;maximums&quot;: [ # If requested, the maximum values of metrics.
599 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
600 &quot;metricValues&quot;: [ # List of requested visible metric values.
601 { # The value of a metric.
602 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
603 },
604 ],
605 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
606 { # The value of a dimension.
607 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
608 },
609 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800610 },
611 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800612 &quot;rowCount&quot;: 42, # The total number of rows in the query result, regardless of the number of rows returned in the response. For example if a query returns 175 rows and includes limit = 50 in the API request, the response will contain row_count = 175 but only 50 rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800613 &quot;totals&quot;: [ # If requested, the totaled values of metrics.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800614 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
615 &quot;metricValues&quot;: [ # List of requested visible metric values.
616 { # The value of a metric.
617 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
618 },
619 ],
620 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
621 { # The value of a dimension.
622 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
623 },
624 ],
625 },
626 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800627 &quot;rows&quot;: [ # Rows of dimension value combinations and metric values in the report.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700628 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700629 &quot;metricValues&quot;: [ # List of requested visible metric values.
630 { # The value of a metric.
631 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
632 },
633 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700634 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
635 { # The value of a dimension.
636 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
637 },
638 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700639 },
640 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800641 &quot;minimums&quot;: [ # If requested, the minimum values of metrics.
642 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
643 &quot;metricValues&quot;: [ # List of requested visible metric values.
644 { # The value of a metric.
645 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
646 },
647 ],
648 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
649 { # The value of a dimension.
650 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
651 },
652 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700653 },
654 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800655 &quot;dimensionHeaders&quot;: [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
656 { # Describes a dimension column in the report. Dimensions requested in a report produce column entries within rows and DimensionHeaders. However, dimensions used exclusively within filters or expressions do not produce columns in a report; correspondingly, those dimensions do not produce headers.
657 &quot;name&quot;: &quot;A String&quot;, # The dimension&#x27;s name.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800658 },
659 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800660 &quot;propertyQuota&quot;: { # Current state of all quotas for this Analytics Property. If any quota for a property is exhausted, all requests to that property will return Resource Exhausted errors. # This Analytics Property&#x27;s quota state including this request.
661 &quot;concurrentRequests&quot;: { # Current state for a particular quota group. # Standard Analytics Properties can send up to 10 concurrent requests; Analytics 360 Properties can use up to 50 concurrent requests.
662 &quot;consumed&quot;: 42, # Quota consumed by this request.
663 &quot;remaining&quot;: 42, # Quota remaining after this request.
664 },
665 &quot;tokensPerHour&quot;: { # Current state for a particular quota group. # Standard Analytics Properties can use up to 5,000 tokens per day; Analytics 360 Properties can use 50,000 tokens per day. An API request consumes a single number of tokens, and that number is deducted from both the hourly and daily quotas.
666 &quot;consumed&quot;: 42, # Quota consumed by this request.
667 &quot;remaining&quot;: 42, # Quota remaining after this request.
668 },
669 &quot;serverErrorsPerProjectPerHour&quot;: { # Current state for a particular quota group. # Standard Analytics Properties and cloud project pairs can have up to 10 server errors per hour; Analytics 360 Properties and cloud project pairs can have up to 50 server errors per hour.
670 &quot;consumed&quot;: 42, # Quota consumed by this request.
671 &quot;remaining&quot;: 42, # Quota remaining after this request.
672 },
673 &quot;tokensPerDay&quot;: { # Current state for a particular quota group. # Standard Analytics Properties can use up to 25,000 tokens per day; Analytics 360 Properties can use 250,000 tokens per day. Most requests consume fewer than 10 tokens.
674 &quot;consumed&quot;: 42, # Quota consumed by this request.
675 &quot;remaining&quot;: 42, # Quota remaining after this request.
676 },
677 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700678 },
679 ],
680 }</pre>
681</div>
682
683<div class="method">
684 <code class="details" id="close">close()</code>
685 <pre>Close httplib2 connections.</pre>
686</div>
687
688<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700689 <code class="details" id="runPivotReport">runPivotReport(body=None, x__xgafv=None)</code>
690 <pre>Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.
691
692Args:
693 body: object, The request body.
694 The object takes the form of:
695
696{ # The request to generate a pivot report.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800697 &quot;cohortSpec&quot;: { # Specification for a cohort report. # Cohort group associated with this request. If there is a cohort group in the request the &#x27;cohort&#x27; dimension must be present.
698 &quot;cohortsRange&quot;: { # Describes date range for a cohort report. # The data ranges of cohorts.
699 &quot;granularity&quot;: &quot;A String&quot;, # Reporting date range for each cohort is calculated based on these three fields.
700 &quot;startOffset&quot;: 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
701 &quot;endOffset&quot;: 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800702 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800703 &quot;cohortReportSettings&quot;: { # Settings of a cohort report. # Settings of a cohort report.
704 &quot;accumulate&quot;: True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`.
705 },
706 &quot;cohorts&quot;: [ # The definition for the cohorts.
707 { # 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.
708 &quot;dateRange&quot;: { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges. # The cohort selects users whose first visit date is between start date and end date defined in the `dateRange`. In a cohort request, this `dateRange` is required and the `dateRanges` in the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. The date range should be aligned with the cohort&#x27;s granularity. If CohortsRange uses daily granularity, the date range can be aligned to any day. If CohortsRange uses weekly granularity, the date range should be aligned to the week boundary, starting at Sunday and ending Saturday. If CohortsRange uses monthly granularity, the date range should be aligned to the month, starting at the first and ending on the last day of the month.
709 &quot;name&quot;: &quot;A String&quot;, # Assigns a name to this date 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, date ranges are named by their zero based index in the request: `date_range_0`, `date_range_1`, etc.
710 &quot;endDate&quot;: &quot;A String&quot;, # The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
711 &quot;startDate&quot;: &quot;A String&quot;, # The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
712 },
713 &quot;name&quot;: &quot;A String&quot;, # Assigns a name to this cohort. The dimension `cohort` is valued to this name in a report response. If set, cannot begin with `cohort_` or `RESERVED_`. If not set, cohorts are named by their zero based index `cohort_0`, `cohort_1`, etc.
714 &quot;dimension&quot;: &quot;A String&quot;, # The dimension used by cohort. Only supports `firstTouchDate` for retention report.
715 },
716 ],
717 },
718 &quot;metricFilter&quot;: { # To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics. # The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800719 &quot;filter&quot;: { # An expression to filter dimension or metric values. # A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800720 &quot;nullFilter&quot;: True or False, # A filter for null values. If True, a null dimension value is matched by this filter. Null filter is commonly used inside a NOT filter expression. For example, a NOT expression of a null filter removes rows when a dimension is null.
721 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
722 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
723 &quot;doubleValue&quot;: 3.14, # Double value
724 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
725 },
726 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
727 &quot;doubleValue&quot;: 3.14, # Double value
728 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
729 },
730 },
731 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
732 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
733 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
734 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
735 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800736 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
737 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
738 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800739 &quot;doubleValue&quot;: 3.14, # Double value
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800740 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800741 },
742 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800743 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800744 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
745 &quot;values&quot;: [ # The list of string values. Must be non-empty.
746 &quot;A String&quot;,
747 ],
748 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
749 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700750 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800751 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
752 &quot;expressions&quot;: [ # A list of filter expressions.
753 # Object with schema name: FilterExpression
754 ],
755 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800756 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
757 &quot;expressions&quot;: [ # A list of filter expressions.
758 # Object with schema name: FilterExpression
759 ],
760 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800761 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800762 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800763 &quot;dateRanges&quot;: [ # The date range to retrieve event data for the report. If multiple date ranges are specified, event data from each date range is used in the report. A special dimension with field name &quot;dateRange&quot; can be included in a Pivot&#x27;s field names; if included, the report compares between date ranges. In a cohort request, this `dateRanges` must be unspecified.
764 { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
765 &quot;name&quot;: &quot;A String&quot;, # Assigns a name to this date 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, date ranges are named by their zero based index in the request: `date_range_0`, `date_range_1`, etc.
766 &quot;endDate&quot;: &quot;A String&quot;, # The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
767 &quot;startDate&quot;: &quot;A String&quot;, # The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
768 },
769 ],
770 &quot;dimensionFilter&quot;: { # To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics. # The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter.
771 &quot;filter&quot;: { # An expression to filter dimension or metric values. # A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.
772 &quot;nullFilter&quot;: True or False, # A filter for null values. If True, a null dimension value is matched by this filter. Null filter is commonly used inside a NOT filter expression. For example, a NOT expression of a null filter removes rows when a dimension is null.
773 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
774 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
775 &quot;doubleValue&quot;: 3.14, # Double value
776 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
777 },
778 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
779 &quot;doubleValue&quot;: 3.14, # Double value
780 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
781 },
782 },
783 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
784 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
785 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
786 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
787 },
788 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
789 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
790 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
791 &quot;doubleValue&quot;: 3.14, # Double value
792 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
793 },
794 },
795 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
796 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
797 &quot;values&quot;: [ # The list of string values. Must be non-empty.
798 &quot;A String&quot;,
799 ],
800 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
801 },
802 },
803 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
804 &quot;expressions&quot;: [ # A list of filter expressions.
805 # Object with schema name: FilterExpression
806 ],
807 },
808 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
809 &quot;expressions&quot;: [ # A list of filter expressions.
810 # Object with schema name: FilterExpression
811 ],
812 },
813 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800814 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800815 &quot;metrics&quot;: [ # The metrics requested, at least one metric needs to be specified. All defined metrics must be used by one of the following: metric_expression, metric_filter, order_bys.
816 { # The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.
817 &quot;name&quot;: &quot;A String&quot;, # The name of the metric. See the [API Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) for the list of metric names. If `expression` is specified, `name` can be any string that you would like. For example if `expression` is `screenPageViews/sessions`, you could call that metric&#x27;s name = `viewsPerSession`. Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric `expression`.
818 &quot;invisible&quot;: True or False, # Indicates if a metric is invisible in the report response. If a metric is invisible, the metric will not produce a column in the response, but can be used in `metricFilter`, `orderBys`, or a metric `expression`.
819 &quot;expression&quot;: &quot;A String&quot;, # A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.
820 },
821 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800822 &quot;dimensions&quot;: [ # The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys.
823 { # Dimensions are attributes of your data. For example, the dimension city indicates the city from which an event originates. Dimension values in report responses are strings; for example, city could be &quot;Paris&quot; or &quot;New York&quot;. Requests are allowed up to 8 dimensions.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800824 &quot;name&quot;: &quot;A String&quot;, # The name of the dimension. See the [API Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names. If `dimensionExpression` is specified, `name` can be any string that you would like. For example if a `dimensionExpression` concatenates `country` and `city`, you could call that dimension `countryAndCity`. Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, `dimensionExpression`, and `pivots`.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800825 &quot;dimensionExpression&quot;: { # Used to express a dimension which is the result of a formula of multiple dimensions. Example usages: 1) lower_case(dimension) 2) concatenate(dimension1, symbol, dimension2). # One dimension can be the result of an expression of multiple dimensions. For example, dimension &quot;country, city&quot;: concatenate(country, &quot;, &quot;, city).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800826 &quot;upperCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case.
827 &quot;dimensionName&quot;: &quot;A String&quot;, # Name of a dimension. The name must refer back to a name in dimensions field of the request.
828 },
829 &quot;lowerCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case.
830 &quot;dimensionName&quot;: &quot;A String&quot;, # Name of a dimension. The name must refer back to a name in dimensions field of the request.
831 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800832 &quot;concatenate&quot;: { # Used to combine dimension values to a single dimension. # Used to combine dimension values to a single dimension. For example, dimension &quot;country, city&quot;: concatenate(country, &quot;, &quot;, city).
833 &quot;dimensionNames&quot;: [ # Names of dimensions. The names must refer back to names in the dimensions field of the request.
834 &quot;A String&quot;,
835 ],
836 &quot;delimiter&quot;: &quot;A String&quot;, # The delimiter placed between dimension names. Delimiters are often single characters such as &quot;|&quot; or &quot;,&quot; but can be longer strings. If a dimension value contains the delimiter, both will be present in response with no distinction. For example if dimension 1 value = &quot;US,FR&quot;, dimension 2 value = &quot;JP&quot;, and delimiter = &quot;,&quot;, then the response will contain &quot;US,FR,JP&quot;.
837 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800838 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800839 },
840 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800841 &quot;keepEmptyRows&quot;: True or False, # If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800842 &quot;entity&quot;: { # The unique identifier of the property whose events are tracked. # A property whose events are tracked. Within a batch request, this entity should either be unspecified or consistent with the batch-level entity.
843 &quot;propertyId&quot;: &quot;A String&quot;, # A Google Analytics GA4 property id. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800844 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800845 &quot;pivots&quot;: [ # Describes the visual format of the report&#x27;s dimensions in columns or rows. The union of the fieldNames (dimension names) in all pivots must be a subset of dimension names defined in Dimensions. No two pivots can share a dimension. A dimension is only visible if it appears in a pivot.
846 { # Describes the visible dimension columns and rows in the report response.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800847 &quot;limit&quot;: &quot;A String&quot;, # The number of rows to return in this pivot. If unspecified, 10 rows are returned. If -1, all rows are returned.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800848 &quot;offset&quot;: &quot;A String&quot;, # The row count of the start row. The first row is counted as row 0.
849 &quot;metricAggregations&quot;: [ # Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800850 &quot;A String&quot;,
851 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800852 &quot;orderBys&quot;: [ # Specifies how dimensions are ordered in the pivot. In the first Pivot, the OrderBys determine Row and PivotDimensionHeader ordering; in subsequent Pivots, the OrderBys determine only PivotDimensionHeader ordering. Dimensions specified in these OrderBys must be a subset of Pivot.field_names.
853 { # The sort options.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800854 &quot;metric&quot;: { # Sorts by metric values. # Sorts results by a metric&#x27;s values.
855 &quot;metricName&quot;: &quot;A String&quot;, # A metric name in the request to order by.
856 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800857 &quot;desc&quot;: True or False, # If true, sorts by descending order.
858 &quot;pivot&quot;: { # Sorts by a pivot column group. # Sorts results by a metric&#x27;s values within a pivot column group.
859 &quot;pivotSelections&quot;: [ # Used to select a dimension name and value pivot. If multiple pivot selections are given, the sort occurs on rows where all pivot selection dimension name and value pairs match the row&#x27;s dimension name and value pair.
860 { # A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric&#x27;s value. For example if pivots = {{&quot;browser&quot;, &quot;Chrome&quot;}} and metric_name = &quot;Sessions&quot;, then the rows will be sorted based on Sessions in Chrome. ---------|----------|----------------|----------|---------------- | Chrome | Chrome | Safari | Safari ---------|----------|----------------|----------|---------------- Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions ---------|----------|----------------|----------|---------------- US | 2 | 2 | 3 | 1 ---------|----------|----------------|----------|---------------- Canada | 3 | 1 | 4 | 1 ---------|----------|----------------|----------|----------------
861 &quot;dimensionName&quot;: &quot;A String&quot;, # Must be a dimension name from the request.
862 &quot;dimensionValue&quot;: &quot;A String&quot;, # Order by only when the named dimension is this value.
863 },
864 ],
865 &quot;metricName&quot;: &quot;A String&quot;, # In the response to order by, order rows by this column. Must be a metric name from the request.
866 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800867 &quot;dimension&quot;: { # Sorts by dimension values. # Sorts results by a dimension&#x27;s values.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800868 &quot;dimensionName&quot;: &quot;A String&quot;, # A dimension name in the request to order by.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800869 &quot;orderType&quot;: &quot;A String&quot;, # Controls the rule for dimension value ordering.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800870 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800871 },
872 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800873 &quot;fieldNames&quot;: [ # Dimension names for visible columns in the report response. Including &quot;dateRange&quot; produces a date range column; for each row in the response, dimension values in the date range column will indicate the corresponding date range from the request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800874 &quot;A String&quot;,
875 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700876 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800877 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800878 &quot;returnPropertyQuota&quot;: True or False, # Toggles whether to return the current state of this Analytics Property&#x27;s quota. Quota is returned in [PropertyQuota](#PropertyQuota).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800879 &quot;currencyCode&quot;: &quot;A String&quot;, # A currency code in ISO4217 format, such as &quot;AED&quot;, &quot;USD&quot;, &quot;JPY&quot;. If the field is empty, the report uses the entity&#x27;s default currency.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800880}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700881
882 x__xgafv: string, V1 error format.
883 Allowed values
884 1 - v1 error format
885 2 - v2 error format
886
887Returns:
888 An object of the form:
889
890 { # The response pivot report table corresponding to a pivot request.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800891 &quot;rows&quot;: [ # Rows of dimension value combinations and metric values in the report.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800892 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
893 &quot;metricValues&quot;: [ # List of requested visible metric values.
894 { # The value of a metric.
895 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
896 },
897 ],
898 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
899 { # The value of a dimension.
900 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
901 },
902 ],
903 },
904 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800905 &quot;metricHeaders&quot;: [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
906 { # Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800907 &quot;name&quot;: &quot;A String&quot;, # The metric&#x27;s name.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800908 &quot;type&quot;: &quot;A String&quot;, # The metric&#x27;s data type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700909 },
910 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800911 &quot;aggregates&quot;: [ # Aggregation of metric values. Can be totals, minimums, or maximums. The returned aggregations are controlled by the metric_aggregations in the pivot. The type of aggregation returned in each row is shown by the dimension_values which are set to &quot;RESERVED_&quot;.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800912 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
913 &quot;metricValues&quot;: [ # List of requested visible metric values.
914 { # The value of a metric.
915 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
916 },
917 ],
918 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
919 { # The value of a dimension.
920 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
921 },
922 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700923 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800924 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800925 &quot;metadata&quot;: { # Response&#x27;s metadata carrying additional information about the report content. # Metadata for the report.
926 &quot;dataLossFromOtherRow&quot;: True or False, # If true, indicates some buckets of dimension combinations are rolled into &quot;(other)&quot; row. This can happen for high cardinality reports.
927 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700928 &quot;pivotHeaders&quot;: [ # Summarizes the columns and rows created by a pivot. Each pivot in the request produces one header in the response. If we have a request like this: &quot;pivots&quot;: [{ &quot;fieldNames&quot;: [&quot;country&quot;, &quot;city&quot;] }, { &quot;fieldNames&quot;: &quot;eventName&quot; }] We will have the following `pivotHeaders` in the response: &quot;pivotHeaders&quot; : [{ &quot;dimensionHeaders&quot;: [{ &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;United Kingdom&quot; }, { &quot;value&quot;: &quot;London&quot; } ] }, { &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;Japan&quot; }, { &quot;value&quot;: &quot;Osaka&quot; } ] }] }, { &quot;dimensionHeaders&quot;: [{ &quot;dimensionValues&quot;: [{ &quot;value&quot;: &quot;session_start&quot; }] }, { &quot;dimensionValues&quot;: [{ &quot;value&quot;: &quot;scroll&quot; }] }] }]
929 { # Dimensions&#x27; values in a single pivot.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800930 &quot;rowCount&quot;: 42, # The cardinality of the pivot as if offset = 0 and limit = -1. The total number of rows for this pivot&#x27;s fields regardless of how the parameters offset and limit are specified in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700931 &quot;pivotDimensionHeaders&quot;: [ # The size is the same as the cardinality of the corresponding dimension combinations.
932 { # Summarizes dimension values from a row for this pivot.
933 &quot;dimensionValues&quot;: [ # Values of multiple dimensions in a pivot.
934 { # The value of a dimension.
935 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
936 },
937 ],
938 },
939 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700940 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700941 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800942 &quot;dimensionHeaders&quot;: [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
943 { # Describes a dimension column in the report. Dimensions requested in a report produce column entries within rows and DimensionHeaders. However, dimensions used exclusively within filters or expressions do not produce columns in a report; correspondingly, those dimensions do not produce headers.
944 &quot;name&quot;: &quot;A String&quot;, # The dimension&#x27;s name.
945 },
946 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800947 &quot;propertyQuota&quot;: { # Current state of all quotas for this Analytics Property. If any quota for a property is exhausted, all requests to that property will return Resource Exhausted errors. # This Analytics Property&#x27;s quota state including this request.
948 &quot;concurrentRequests&quot;: { # Current state for a particular quota group. # Standard Analytics Properties can send up to 10 concurrent requests; Analytics 360 Properties can use up to 50 concurrent requests.
949 &quot;consumed&quot;: 42, # Quota consumed by this request.
950 &quot;remaining&quot;: 42, # Quota remaining after this request.
951 },
952 &quot;tokensPerHour&quot;: { # Current state for a particular quota group. # Standard Analytics Properties can use up to 5,000 tokens per day; Analytics 360 Properties can use 50,000 tokens per day. An API request consumes a single number of tokens, and that number is deducted from both the hourly and daily quotas.
953 &quot;consumed&quot;: 42, # Quota consumed by this request.
954 &quot;remaining&quot;: 42, # Quota remaining after this request.
955 },
956 &quot;serverErrorsPerProjectPerHour&quot;: { # Current state for a particular quota group. # Standard Analytics Properties and cloud project pairs can have up to 10 server errors per hour; Analytics 360 Properties and cloud project pairs can have up to 50 server errors per hour.
957 &quot;consumed&quot;: 42, # Quota consumed by this request.
958 &quot;remaining&quot;: 42, # Quota remaining after this request.
959 },
960 &quot;tokensPerDay&quot;: { # Current state for a particular quota group. # Standard Analytics Properties can use up to 25,000 tokens per day; Analytics 360 Properties can use 250,000 tokens per day. Most requests consume fewer than 10 tokens.
961 &quot;consumed&quot;: 42, # Quota consumed by this request.
962 &quot;remaining&quot;: 42, # Quota remaining after this request.
963 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800964 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700965 }</pre>
966</div>
967
968<div class="method">
969 <code class="details" id="runReport">runReport(body=None, x__xgafv=None)</code>
970 <pre>Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name.
971
972Args:
973 body: object, The request body.
974 The object takes the form of:
975
976{ # The request to generate a report.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800977 &quot;cohortSpec&quot;: { # Specification for a cohort report. # Cohort group associated with this request. If there is a cohort group in the request the &#x27;cohort&#x27; dimension must be present.
978 &quot;cohortsRange&quot;: { # Describes date range for a cohort report. # The data ranges of cohorts.
979 &quot;granularity&quot;: &quot;A String&quot;, # Reporting date range for each cohort is calculated based on these three fields.
980 &quot;startOffset&quot;: 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
981 &quot;endOffset&quot;: 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
982 },
983 &quot;cohortReportSettings&quot;: { # Settings of a cohort report. # Settings of a cohort report.
984 &quot;accumulate&quot;: True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`.
985 },
986 &quot;cohorts&quot;: [ # The definition for the cohorts.
987 { # 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.
988 &quot;dateRange&quot;: { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges. # The cohort selects users whose first visit date is between start date and end date defined in the `dateRange`. In a cohort request, this `dateRange` is required and the `dateRanges` in the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. The date range should be aligned with the cohort&#x27;s granularity. If CohortsRange uses daily granularity, the date range can be aligned to any day. If CohortsRange uses weekly granularity, the date range should be aligned to the week boundary, starting at Sunday and ending Saturday. If CohortsRange uses monthly granularity, the date range should be aligned to the month, starting at the first and ending on the last day of the month.
989 &quot;name&quot;: &quot;A String&quot;, # Assigns a name to this date 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, date ranges are named by their zero based index in the request: `date_range_0`, `date_range_1`, etc.
990 &quot;endDate&quot;: &quot;A String&quot;, # The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
991 &quot;startDate&quot;: &quot;A String&quot;, # The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
992 },
993 &quot;name&quot;: &quot;A String&quot;, # Assigns a name to this cohort. The dimension `cohort` is valued to this name in a report response. If set, cannot begin with `cohort_` or `RESERVED_`. If not set, cohorts are named by their zero based index `cohort_0`, `cohort_1`, etc.
994 &quot;dimension&quot;: &quot;A String&quot;, # The dimension used by cohort. Only supports `firstTouchDate` for retention report.
995 },
996 ],
997 },
998 &quot;dateRanges&quot;: [ # Date ranges of data to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the event data for the overlapping days is included in the response rows for both date ranges. In a cohort request, this `dateRanges` must be unspecified.
999 { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
1000 &quot;name&quot;: &quot;A String&quot;, # Assigns a name to this date 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, date ranges are named by their zero based index in the request: `date_range_0`, `date_range_1`, etc.
1001 &quot;endDate&quot;: &quot;A String&quot;, # The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
1002 &quot;startDate&quot;: &quot;A String&quot;, # The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property&#x27;s reporting time zone.
1003 },
1004 ],
1005 &quot;limit&quot;: &quot;A String&quot;, # The number of rows to return. If unspecified, 10 rows are returned. If -1, all rows are returned. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
1006 &quot;keepEmptyRows&quot;: True or False, # If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001007 &quot;metricFilter&quot;: { # To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics. # The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter.
1008 &quot;filter&quot;: { # An expression to filter dimension or metric values. # A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001009 &quot;nullFilter&quot;: True or False, # A filter for null values. If True, a null dimension value is matched by this filter. Null filter is commonly used inside a NOT filter expression. For example, a NOT expression of a null filter removes rows when a dimension is null.
1010 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
1011 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
1012 &quot;doubleValue&quot;: 3.14, # Double value
1013 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
1014 },
1015 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
1016 &quot;doubleValue&quot;: 3.14, # Double value
1017 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
1018 },
1019 },
1020 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
1021 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
1022 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
1023 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
1024 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001025 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
1026 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
1027 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001028 &quot;doubleValue&quot;: 3.14, # Double value
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001029 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001030 },
1031 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001032 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001033 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
1034 &quot;values&quot;: [ # The list of string values. Must be non-empty.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001035 &quot;A String&quot;,
1036 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001037 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001038 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001039 },
1040 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
1041 &quot;expressions&quot;: [ # A list of filter expressions.
1042 # Object with schema name: FilterExpression
1043 ],
1044 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001045 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
1046 &quot;expressions&quot;: [ # A list of filter expressions.
1047 # Object with schema name: FilterExpression
1048 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001049 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001050 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001051 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001052 &quot;currencyCode&quot;: &quot;A String&quot;, # A currency code in ISO4217 format, such as &quot;AED&quot;, &quot;USD&quot;, &quot;JPY&quot;. If the field is empty, the report uses the entity&#x27;s default currency.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001053 &quot;returnPropertyQuota&quot;: True or False, # Toggles whether to return the current state of this Analytics Property&#x27;s quota. Quota is returned in [PropertyQuota](#PropertyQuota).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001054 &quot;metrics&quot;: [ # The metrics requested and displayed.
1055 { # The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.
1056 &quot;name&quot;: &quot;A String&quot;, # The name of the metric. See the [API Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) for the list of metric names. If `expression` is specified, `name` can be any string that you would like. For example if `expression` is `screenPageViews/sessions`, you could call that metric&#x27;s name = `viewsPerSession`. Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric `expression`.
1057 &quot;invisible&quot;: True or False, # Indicates if a metric is invisible in the report response. If a metric is invisible, the metric will not produce a column in the response, but can be used in `metricFilter`, `orderBys`, or a metric `expression`.
1058 &quot;expression&quot;: &quot;A String&quot;, # A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.
1059 },
1060 ],
1061 &quot;offset&quot;: &quot;A String&quot;, # The row count of the start row. The first row is counted as row 0. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
1062 &quot;metricAggregations&quot;: [ # Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to &quot;RESERVED_(MetricAggregation)&quot;.
1063 &quot;A String&quot;,
1064 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001065 &quot;orderBys&quot;: [ # Specifies how rows are ordered in the response.
1066 { # The sort options.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001067 &quot;metric&quot;: { # Sorts by metric values. # Sorts results by a metric&#x27;s values.
1068 &quot;metricName&quot;: &quot;A String&quot;, # A metric name in the request to order by.
1069 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001070 &quot;desc&quot;: True or False, # If true, sorts by descending order.
1071 &quot;pivot&quot;: { # Sorts by a pivot column group. # Sorts results by a metric&#x27;s values within a pivot column group.
1072 &quot;pivotSelections&quot;: [ # Used to select a dimension name and value pivot. If multiple pivot selections are given, the sort occurs on rows where all pivot selection dimension name and value pairs match the row&#x27;s dimension name and value pair.
1073 { # A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric&#x27;s value. For example if pivots = {{&quot;browser&quot;, &quot;Chrome&quot;}} and metric_name = &quot;Sessions&quot;, then the rows will be sorted based on Sessions in Chrome. ---------|----------|----------------|----------|---------------- | Chrome | Chrome | Safari | Safari ---------|----------|----------------|----------|---------------- Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions ---------|----------|----------------|----------|---------------- US | 2 | 2 | 3 | 1 ---------|----------|----------------|----------|---------------- Canada | 3 | 1 | 4 | 1 ---------|----------|----------------|----------|----------------
1074 &quot;dimensionName&quot;: &quot;A String&quot;, # Must be a dimension name from the request.
1075 &quot;dimensionValue&quot;: &quot;A String&quot;, # Order by only when the named dimension is this value.
1076 },
1077 ],
1078 &quot;metricName&quot;: &quot;A String&quot;, # In the response to order by, order rows by this column. Must be a metric name from the request.
1079 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001080 &quot;dimension&quot;: { # Sorts by dimension values. # Sorts results by a dimension&#x27;s values.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001081 &quot;dimensionName&quot;: &quot;A String&quot;, # A dimension name in the request to order by.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001082 &quot;orderType&quot;: &quot;A String&quot;, # Controls the rule for dimension value ordering.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001083 },
1084 },
1085 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001086 &quot;entity&quot;: { # The unique identifier of the property whose events are tracked. # A property whose events are tracked. Within a batch request, this entity should either be unspecified or consistent with the batch-level entity.
1087 &quot;propertyId&quot;: &quot;A String&quot;, # A Google Analytics GA4 property id. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
1088 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001089 &quot;dimensionFilter&quot;: { # To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics. # The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter.
1090 &quot;filter&quot;: { # An expression to filter dimension or metric values. # A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001091 &quot;nullFilter&quot;: True or False, # A filter for null values. If True, a null dimension value is matched by this filter. Null filter is commonly used inside a NOT filter expression. For example, a NOT expression of a null filter removes rows when a dimension is null.
1092 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
1093 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
1094 &quot;doubleValue&quot;: 3.14, # Double value
1095 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
1096 },
1097 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
1098 &quot;doubleValue&quot;: 3.14, # Double value
1099 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
1100 },
1101 },
1102 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
1103 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
1104 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
1105 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
1106 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001107 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
1108 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
1109 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001110 &quot;doubleValue&quot;: 3.14, # Double value
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001111 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001112 },
1113 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001114 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001115 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
1116 &quot;values&quot;: [ # The list of string values. Must be non-empty.
1117 &quot;A String&quot;,
1118 ],
1119 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
1120 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001121 },
1122 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
1123 &quot;expressions&quot;: [ # A list of filter expressions.
1124 # Object with schema name: FilterExpression
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001125 ],
1126 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001127 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
1128 &quot;expressions&quot;: [ # A list of filter expressions.
1129 # Object with schema name: FilterExpression
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001130 ],
1131 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001132 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001133 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001134 &quot;dimensions&quot;: [ # The dimensions requested and displayed.
1135 { # Dimensions are attributes of your data. For example, the dimension city indicates the city from which an event originates. Dimension values in report responses are strings; for example, city could be &quot;Paris&quot; or &quot;New York&quot;. Requests are allowed up to 8 dimensions.
1136 &quot;name&quot;: &quot;A String&quot;, # The name of the dimension. See the [API Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names. If `dimensionExpression` is specified, `name` can be any string that you would like. For example if a `dimensionExpression` concatenates `country` and `city`, you could call that dimension `countryAndCity`. Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, `dimensionExpression`, and `pivots`.
1137 &quot;dimensionExpression&quot;: { # Used to express a dimension which is the result of a formula of multiple dimensions. Example usages: 1) lower_case(dimension) 2) concatenate(dimension1, symbol, dimension2). # One dimension can be the result of an expression of multiple dimensions. For example, dimension &quot;country, city&quot;: concatenate(country, &quot;, &quot;, city).
1138 &quot;upperCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case.
1139 &quot;dimensionName&quot;: &quot;A String&quot;, # Name of a dimension. The name must refer back to a name in dimensions field of the request.
1140 },
1141 &quot;lowerCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case.
1142 &quot;dimensionName&quot;: &quot;A String&quot;, # Name of a dimension. The name must refer back to a name in dimensions field of the request.
1143 },
1144 &quot;concatenate&quot;: { # Used to combine dimension values to a single dimension. # Used to combine dimension values to a single dimension. For example, dimension &quot;country, city&quot;: concatenate(country, &quot;, &quot;, city).
1145 &quot;dimensionNames&quot;: [ # Names of dimensions. The names must refer back to names in the dimensions field of the request.
1146 &quot;A String&quot;,
1147 ],
1148 &quot;delimiter&quot;: &quot;A String&quot;, # The delimiter placed between dimension names. Delimiters are often single characters such as &quot;|&quot; or &quot;,&quot; but can be longer strings. If a dimension value contains the delimiter, both will be present in response with no distinction. For example if dimension 1 value = &quot;US,FR&quot;, dimension 2 value = &quot;JP&quot;, and delimiter = &quot;,&quot;, then the response will contain &quot;US,FR,JP&quot;.
1149 },
1150 },
1151 },
1152 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001153 }
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001154
1155 x__xgafv: string, V1 error format.
1156 Allowed values
1157 1 - v1 error format
1158 2 - v2 error format
1159
1160Returns:
1161 An object of the form:
1162
1163 { # The response report table corresponding to a request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001164 &quot;metricHeaders&quot;: [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
1165 { # Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001166 &quot;name&quot;: &quot;A String&quot;, # The metric&#x27;s name.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001167 &quot;type&quot;: &quot;A String&quot;, # The metric&#x27;s data type.
1168 },
1169 ],
1170 &quot;metadata&quot;: { # Response&#x27;s metadata carrying additional information about the report content. # Metadata for the report.
1171 &quot;dataLossFromOtherRow&quot;: True or False, # If true, indicates some buckets of dimension combinations are rolled into &quot;(other)&quot; row. This can happen for high cardinality reports.
1172 },
1173 &quot;maximums&quot;: [ # If requested, the maximum values of metrics.
1174 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
1175 &quot;metricValues&quot;: [ # List of requested visible metric values.
1176 { # The value of a metric.
1177 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
1178 },
1179 ],
1180 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
1181 { # The value of a dimension.
1182 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
1183 },
1184 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001185 },
1186 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001187 &quot;rowCount&quot;: 42, # The total number of rows in the query result, regardless of the number of rows returned in the response. For example if a query returns 175 rows and includes limit = 50 in the API request, the response will contain row_count = 175 but only 50 rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001188 &quot;totals&quot;: [ # If requested, the totaled values of metrics.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001189 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
1190 &quot;metricValues&quot;: [ # List of requested visible metric values.
1191 { # The value of a metric.
1192 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
1193 },
1194 ],
1195 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
1196 { # The value of a dimension.
1197 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
1198 },
1199 ],
1200 },
1201 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001202 &quot;rows&quot;: [ # Rows of dimension value combinations and metric values in the report.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001203 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001204 &quot;metricValues&quot;: [ # List of requested visible metric values.
1205 { # The value of a metric.
1206 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
1207 },
1208 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001209 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
1210 { # The value of a dimension.
1211 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
1212 },
1213 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001214 },
1215 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001216 &quot;minimums&quot;: [ # If requested, the minimum values of metrics.
1217 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
1218 &quot;metricValues&quot;: [ # List of requested visible metric values.
1219 { # The value of a metric.
1220 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
1221 },
1222 ],
1223 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
1224 { # The value of a dimension.
1225 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
1226 },
1227 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001228 },
1229 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001230 &quot;dimensionHeaders&quot;: [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
1231 { # Describes a dimension column in the report. Dimensions requested in a report produce column entries within rows and DimensionHeaders. However, dimensions used exclusively within filters or expressions do not produce columns in a report; correspondingly, those dimensions do not produce headers.
1232 &quot;name&quot;: &quot;A String&quot;, # The dimension&#x27;s name.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001233 },
1234 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001235 &quot;propertyQuota&quot;: { # Current state of all quotas for this Analytics Property. If any quota for a property is exhausted, all requests to that property will return Resource Exhausted errors. # This Analytics Property&#x27;s quota state including this request.
1236 &quot;concurrentRequests&quot;: { # Current state for a particular quota group. # Standard Analytics Properties can send up to 10 concurrent requests; Analytics 360 Properties can use up to 50 concurrent requests.
1237 &quot;consumed&quot;: 42, # Quota consumed by this request.
1238 &quot;remaining&quot;: 42, # Quota remaining after this request.
1239 },
1240 &quot;tokensPerHour&quot;: { # Current state for a particular quota group. # Standard Analytics Properties can use up to 5,000 tokens per day; Analytics 360 Properties can use 50,000 tokens per day. An API request consumes a single number of tokens, and that number is deducted from both the hourly and daily quotas.
1241 &quot;consumed&quot;: 42, # Quota consumed by this request.
1242 &quot;remaining&quot;: 42, # Quota remaining after this request.
1243 },
1244 &quot;serverErrorsPerProjectPerHour&quot;: { # Current state for a particular quota group. # Standard Analytics Properties and cloud project pairs can have up to 10 server errors per hour; Analytics 360 Properties and cloud project pairs can have up to 50 server errors per hour.
1245 &quot;consumed&quot;: 42, # Quota consumed by this request.
1246 &quot;remaining&quot;: 42, # Quota remaining after this request.
1247 },
1248 &quot;tokensPerDay&quot;: { # Current state for a particular quota group. # Standard Analytics Properties can use up to 25,000 tokens per day; Analytics 360 Properties can use 250,000 tokens per day. Most requests consume fewer than 10 tokens.
1249 &quot;consumed&quot;: 42, # Quota consumed by this request.
1250 &quot;remaining&quot;: 42, # Quota remaining after this request.
1251 },
1252 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001253 }</pre>
1254</div>
1255
1256</body></html>