blob: d158925eac2c5fe022948916f240e76a37cad2e2 [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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800102 &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.
103 &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).
104 },
105 &quot;requests&quot;: [ # Individual requests. Each request has a separate pivot report response. Each batch request is allowed up to 5 requests.
106 { # The request to generate a pivot report.
107 &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.
108 &quot;cohortReportSettings&quot;: { # Settings of a cohort report. # Settings of a cohort report.
109 &quot;accumulate&quot;: True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`.
110 },
111 &quot;cohorts&quot;: [ # The definition for the cohorts.
112 { # 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.
113 &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.
114 &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.
115 &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.
116 &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.
117 },
118 &quot;dimension&quot;: &quot;A String&quot;, # The dimension used by cohort. Only supports `firstTouchDate` for retention report.
119 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800120 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800121 ],
122 &quot;cohortsRange&quot;: { # Describes date range for a cohort report. # The data ranges of cohorts.
123 &quot;endOffset&quot;: 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
124 &quot;granularity&quot;: &quot;A String&quot;, # Reporting date range for each cohort is calculated based on these three fields.
125 &quot;startOffset&quot;: 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
126 },
127 },
128 &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.
129 &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.
130 { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
131 &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.
132 &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.
133 &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.
134 },
135 ],
136 &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.
137 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
138 &quot;expressions&quot;: [ # A list of filter expressions.
139 # Object with schema name: FilterExpression
140 ],
141 },
142 &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.
143 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
144 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
145 &quot;doubleValue&quot;: 3.14, # Double value
146 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
147 },
148 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
149 &quot;doubleValue&quot;: 3.14, # Double value
150 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
151 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800152 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800153 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
154 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
155 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
156 &quot;values&quot;: [ # The list of string values. Must be non-empty.
157 &quot;A String&quot;,
158 ],
159 },
160 &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.
161 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
162 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
163 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
164 &quot;doubleValue&quot;: 3.14, # Double value
165 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
166 },
167 },
168 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
169 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
170 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
171 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
172 },
173 },
174 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
175 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
176 &quot;expressions&quot;: [ # A list of filter expressions.
177 # Object with schema name: FilterExpression
178 ],
179 },
180 },
181 &quot;dimensions&quot;: [ # The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys.
182 { # 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.
183 &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).
184 &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).
185 &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;.
186 &quot;dimensionNames&quot;: [ # Names of dimensions. The names must refer back to names in the dimensions field of the request.
187 &quot;A String&quot;,
188 ],
189 },
190 &quot;lowerCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case.
191 &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.
192 },
193 &quot;upperCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case.
194 &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.
195 },
196 },
197 &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`.
198 },
199 ],
200 &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.
201 &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).
202 },
203 &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.
204 &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.
205 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
206 &quot;expressions&quot;: [ # A list of filter expressions.
207 # Object with schema name: FilterExpression
208 ],
209 },
210 &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.
211 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
212 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
213 &quot;doubleValue&quot;: 3.14, # Double value
214 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
215 },
216 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
217 &quot;doubleValue&quot;: 3.14, # Double value
218 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
219 },
220 },
221 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
222 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
223 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
224 &quot;values&quot;: [ # The list of string values. Must be non-empty.
225 &quot;A String&quot;,
226 ],
227 },
228 &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.
229 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
230 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
231 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
232 &quot;doubleValue&quot;: 3.14, # Double value
233 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
234 },
235 },
236 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
237 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
238 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
239 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
240 },
241 },
242 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
243 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
244 &quot;expressions&quot;: [ # A list of filter expressions.
245 # Object with schema name: FilterExpression
246 ],
247 },
248 },
249 &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.
250 { # The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.
251 &quot;expression&quot;: &quot;A String&quot;, # A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.
252 &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`.
253 &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`.
254 },
255 ],
256 &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.
257 { # Describes the visible dimension columns and rows in the report response.
258 &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.
259 &quot;A String&quot;,
260 ],
261 &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.
262 &quot;metricAggregations&quot;: [ # Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations.
263 &quot;A String&quot;,
264 ],
265 &quot;offset&quot;: &quot;A String&quot;, # The row count of the start row. The first row is counted as row 0.
266 &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.
267 { # The sort options.
268 &quot;desc&quot;: True or False, # If true, sorts by descending order.
269 &quot;dimension&quot;: { # Sorts by dimension values. # Sorts results by a dimension&#x27;s values.
270 &quot;dimensionName&quot;: &quot;A String&quot;, # A dimension name in the request to order by.
271 &quot;orderType&quot;: &quot;A String&quot;, # Controls the rule for dimension value ordering.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800272 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800273 &quot;metric&quot;: { # Sorts by metric values. # Sorts results by a metric&#x27;s values.
274 &quot;metricName&quot;: &quot;A String&quot;, # A metric name in the request to order by.
275 },
276 &quot;pivot&quot;: { # Sorts by a pivot column group. # Sorts results by a metric&#x27;s values within a pivot column group.
277 &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.
278 &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.
279 { # 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 ---------|----------|----------------|----------|----------------
280 &quot;dimensionName&quot;: &quot;A String&quot;, # Must be a dimension name from the request.
281 &quot;dimensionValue&quot;: &quot;A String&quot;, # Order by only when the named dimension is this value.
282 },
283 ],
284 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800285 },
286 ],
287 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800288 ],
289 &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 Botb6971b02020-11-26 17:16:03 -0800290 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800291 ],
292}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700293
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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800303 &quot;pivotReports&quot;: [ # Individual responses. Each response has a separate pivot report request.
304 { # The response pivot report table corresponding to a pivot request.
305 &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;.
306 { # 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;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
308 { # The value of a dimension.
309 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
310 },
311 ],
312 &quot;metricValues&quot;: [ # List of requested visible metric values.
313 { # The value of a metric.
314 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
315 },
316 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800317 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800318 ],
319 &quot;dimensionHeaders&quot;: [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
320 { # 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.
321 &quot;name&quot;: &quot;A String&quot;, # The dimension&#x27;s name.
322 },
323 ],
324 &quot;metadata&quot;: { # Response&#x27;s metadata carrying additional information about the report content. # Metadata for the report.
325 &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.
326 },
327 &quot;metricHeaders&quot;: [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
328 { # 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.
329 &quot;name&quot;: &quot;A String&quot;, # The metric&#x27;s name.
330 &quot;type&quot;: &quot;A String&quot;, # The metric&#x27;s data type.
331 },
332 ],
333 &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; }] }] }]
334 { # Dimensions&#x27; values in a single pivot.
335 &quot;pivotDimensionHeaders&quot;: [ # The size is the same as the cardinality of the corresponding dimension combinations.
336 { # Summarizes dimension values from a row for this pivot.
337 &quot;dimensionValues&quot;: [ # Values of multiple dimensions in a pivot.
338 { # The value of a dimension.
339 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
340 },
341 ],
342 },
343 ],
344 &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.
345 },
346 ],
347 &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.
348 &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.
349 &quot;consumed&quot;: 42, # Quota consumed by this request.
350 &quot;remaining&quot;: 42, # Quota remaining after this request.
351 },
352 &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.
353 &quot;consumed&quot;: 42, # Quota consumed by this request.
354 &quot;remaining&quot;: 42, # Quota remaining after this request.
355 },
356 &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.
357 &quot;consumed&quot;: 42, # Quota consumed by this request.
358 &quot;remaining&quot;: 42, # Quota remaining after this request.
359 },
360 &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.
361 &quot;consumed&quot;: 42, # Quota consumed by this request.
362 &quot;remaining&quot;: 42, # Quota remaining after this request.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800363 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700364 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800365 &quot;rows&quot;: [ # Rows of dimension value combinations and metric values in the report.
366 { # 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; } ] ```
367 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
368 { # The value of a dimension.
369 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
370 },
371 ],
372 &quot;metricValues&quot;: [ # List of requested visible metric values.
373 { # The value of a metric.
374 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
375 },
376 ],
377 },
378 ],
379 },
380 ],
381}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700382</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 Botcc94ec82021-01-15 07:10:04 -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 },
396 &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.
398 &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;cohortReportSettings&quot;: { # Settings of a cohort report. # Settings of a cohort report.
400 &quot;accumulate&quot;: True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`.
401 },
402 &quot;cohorts&quot;: [ # The definition for the cohorts.
403 { # 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.
404 &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.
405 &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.
406 &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.
407 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800408 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800409 &quot;dimension&quot;: &quot;A String&quot;, # The dimension used by cohort. Only supports `firstTouchDate` for retention report.
410 &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.
411 },
412 ],
413 &quot;cohortsRange&quot;: { # Describes date range for a cohort report. # The data ranges of cohorts.
414 &quot;endOffset&quot;: 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
415 &quot;granularity&quot;: &quot;A String&quot;, # Reporting date range for each cohort is calculated based on these three fields.
416 &quot;startOffset&quot;: 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
417 },
418 },
419 &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.
420 &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.
421 { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
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;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.
424 &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.
425 },
426 ],
427 &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.
428 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
429 &quot;expressions&quot;: [ # A list of filter expressions.
430 # Object with schema name: FilterExpression
431 ],
432 },
433 &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.
434 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
435 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
436 &quot;doubleValue&quot;: 3.14, # Double value
437 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800438 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800439 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
440 &quot;doubleValue&quot;: 3.14, # Double value
441 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
442 },
443 },
444 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
445 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
446 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
447 &quot;values&quot;: [ # The list of string values. Must be non-empty.
448 &quot;A String&quot;,
449 ],
450 },
451 &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.
452 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
453 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
454 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
455 &quot;doubleValue&quot;: 3.14, # Double value
456 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
457 },
458 },
459 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
460 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
461 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
462 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
463 },
464 },
465 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
466 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
467 &quot;expressions&quot;: [ # A list of filter expressions.
468 # Object with schema name: FilterExpression
469 ],
470 },
471 },
472 &quot;dimensions&quot;: [ # The dimensions requested and displayed.
473 { # 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.
474 &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).
475 &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).
476 &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;.
477 &quot;dimensionNames&quot;: [ # Names of dimensions. The names must refer back to names in the dimensions field of the request.
478 &quot;A String&quot;,
479 ],
480 },
481 &quot;lowerCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case.
482 &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.
483 },
484 &quot;upperCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case.
485 &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.
486 },
487 },
488 &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`.
489 },
490 ],
491 &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.
492 &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).
493 },
494 &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.
495 &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).
496 &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;.
497 &quot;A String&quot;,
498 ],
499 &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.
500 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
501 &quot;expressions&quot;: [ # A list of filter expressions.
502 # Object with schema name: FilterExpression
503 ],
504 },
505 &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.
506 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
507 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
508 &quot;doubleValue&quot;: 3.14, # Double value
509 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
510 },
511 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
512 &quot;doubleValue&quot;: 3.14, # Double value
513 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
514 },
515 },
516 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
517 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
518 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
519 &quot;values&quot;: [ # The list of string values. Must be non-empty.
520 &quot;A String&quot;,
521 ],
522 },
523 &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.
524 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
525 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
526 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
527 &quot;doubleValue&quot;: 3.14, # Double value
528 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
529 },
530 },
531 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
532 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
533 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
534 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
535 },
536 },
537 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
538 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
539 &quot;expressions&quot;: [ # A list of filter expressions.
540 # Object with schema name: FilterExpression
541 ],
542 },
543 },
544 &quot;metrics&quot;: [ # The metrics requested and displayed.
545 { # The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.
546 &quot;expression&quot;: &quot;A String&quot;, # A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.
547 &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`.
548 &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`.
549 },
550 ],
551 &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).
552 &quot;orderBys&quot;: [ # Specifies how rows are ordered in the response.
553 { # The sort options.
554 &quot;desc&quot;: True or False, # If true, sorts by descending order.
555 &quot;dimension&quot;: { # Sorts by dimension values. # Sorts results by a dimension&#x27;s values.
556 &quot;dimensionName&quot;: &quot;A String&quot;, # A dimension name in the request to order by.
557 &quot;orderType&quot;: &quot;A String&quot;, # Controls the rule for dimension value ordering.
558 },
559 &quot;metric&quot;: { # Sorts by metric values. # Sorts results by a metric&#x27;s values.
560 &quot;metricName&quot;: &quot;A String&quot;, # A metric name in the request to order by.
561 },
562 &quot;pivot&quot;: { # Sorts by a pivot column group. # Sorts results by a metric&#x27;s values within a pivot column group.
563 &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.
564 &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.
565 { # 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 ---------|----------|----------------|----------|----------------
566 &quot;dimensionName&quot;: &quot;A String&quot;, # Must be a dimension name from the request.
567 &quot;dimensionValue&quot;: &quot;A String&quot;, # Order by only when the named dimension is this value.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800568 },
569 ],
570 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800571 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800572 ],
573 &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).
574 },
575 ],
576}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700577
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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800587 &quot;reports&quot;: [ # Individual responses. Each response has a separate report request.
588 { # The response report table corresponding to a request.
589 &quot;dimensionHeaders&quot;: [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
590 { # 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.
591 &quot;name&quot;: &quot;A String&quot;, # The dimension&#x27;s name.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800592 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800593 ],
594 &quot;maximums&quot;: [ # If requested, the maximum values of metrics.
595 { # 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; } ] ```
596 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
597 { # The value of a dimension.
598 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
599 },
600 ],
601 &quot;metricValues&quot;: [ # List of requested visible metric values.
602 { # The value of a metric.
603 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
604 },
605 ],
606 },
607 ],
608 &quot;metadata&quot;: { # Response&#x27;s metadata carrying additional information about the report content. # Metadata for the report.
609 &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.
610 },
611 &quot;metricHeaders&quot;: [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
612 { # 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.
613 &quot;name&quot;: &quot;A String&quot;, # The metric&#x27;s name.
614 &quot;type&quot;: &quot;A String&quot;, # The metric&#x27;s data type.
615 },
616 ],
617 &quot;minimums&quot;: [ # If requested, the minimum values of metrics.
618 { # 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; } ] ```
619 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
620 { # The value of a dimension.
621 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
622 },
623 ],
624 &quot;metricValues&quot;: [ # List of requested visible metric values.
625 { # The value of a metric.
626 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
627 },
628 ],
629 },
630 ],
631 &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.
632 &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.
633 &quot;consumed&quot;: 42, # Quota consumed by this request.
634 &quot;remaining&quot;: 42, # Quota remaining after this request.
635 },
636 &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.
637 &quot;consumed&quot;: 42, # Quota consumed by this request.
638 &quot;remaining&quot;: 42, # Quota remaining after this request.
639 },
640 &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.
641 &quot;consumed&quot;: 42, # Quota consumed by this request.
642 &quot;remaining&quot;: 42, # Quota remaining after this request.
643 },
644 &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.
645 &quot;consumed&quot;: 42, # Quota consumed by this request.
646 &quot;remaining&quot;: 42, # Quota remaining after this request.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800647 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700648 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800649 &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).
650 &quot;rows&quot;: [ # Rows of dimension value combinations and metric values in the report.
651 { # 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; } ] ```
652 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
653 { # The value of a dimension.
654 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
655 },
656 ],
657 &quot;metricValues&quot;: [ # List of requested visible metric values.
658 { # The value of a metric.
659 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
660 },
661 ],
662 },
663 ],
664 &quot;totals&quot;: [ # If requested, the totaled values of metrics.
665 { # 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; } ] ```
666 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
667 { # The value of a dimension.
668 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
669 },
670 ],
671 &quot;metricValues&quot;: [ # List of requested visible metric values.
672 { # The value of a metric.
673 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
674 },
675 ],
676 },
677 ],
678 },
679 ],
680}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700681</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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800698 &quot;cohortReportSettings&quot;: { # Settings of a cohort report. # Settings of a cohort report.
699 &quot;accumulate&quot;: True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`.
700 },
701 &quot;cohorts&quot;: [ # The definition for the cohorts.
702 { # 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.
703 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800704 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800705 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800706 &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.
707 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800708 &quot;dimension&quot;: &quot;A String&quot;, # The dimension used by cohort. Only supports `firstTouchDate` for retention report.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800709 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800710 },
711 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800712 &quot;cohortsRange&quot;: { # Describes date range for a cohort report. # The data ranges of cohorts.
713 &quot;endOffset&quot;: 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
714 &quot;granularity&quot;: &quot;A String&quot;, # Reporting date range for each cohort is calculated based on these three fields.
715 &quot;startOffset&quot;: 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
716 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800717 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800718 &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 Bot0bf565c2020-12-09 08:56:03 -0800719 &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.
720 { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800721 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800722 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800723 &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.
724 },
725 ],
726 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800727 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
728 &quot;expressions&quot;: [ # A list of filter expressions.
729 # Object with schema name: FilterExpression
730 ],
731 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800732 &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 -0800733 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800734 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
735 &quot;doubleValue&quot;: 3.14, # Double value
736 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
737 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800738 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
739 &quot;doubleValue&quot;: 3.14, # Double value
740 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
741 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800742 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800743 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
744 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800745 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800746 &quot;values&quot;: [ # The list of string values. Must be non-empty.
747 &quot;A String&quot;,
748 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800749 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800750 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800751 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
752 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
753 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
754 &quot;doubleValue&quot;: 3.14, # Double value
755 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
756 },
757 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800758 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800759 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800760 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
761 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800762 },
763 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800764 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800765 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
766 &quot;expressions&quot;: [ # A list of filter expressions.
767 # Object with schema name: FilterExpression
768 ],
769 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800770 },
771 &quot;dimensions&quot;: [ # The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys.
772 { # 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.
773 &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).
774 &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).
775 &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;.
776 &quot;dimensionNames&quot;: [ # Names of dimensions. The names must refer back to names in the dimensions field of the request.
777 &quot;A String&quot;,
778 ],
779 },
780 &quot;lowerCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case.
781 &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.
782 },
783 &quot;upperCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case.
784 &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.
785 },
786 },
787 &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`.
788 },
789 ],
790 &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.
791 &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).
792 },
793 &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.
794 &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 Bot0bf565c2020-12-09 08:56:03 -0800795 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
796 &quot;expressions&quot;: [ # A list of filter expressions.
797 # Object with schema name: FilterExpression
798 ],
799 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800800 &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.
801 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
802 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
803 &quot;doubleValue&quot;: 3.14, # Double value
804 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
805 },
806 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
807 &quot;doubleValue&quot;: 3.14, # Double value
808 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
809 },
810 },
811 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
812 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
813 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
814 &quot;values&quot;: [ # The list of string values. Must be non-empty.
815 &quot;A String&quot;,
816 ],
817 },
818 &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.
819 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
820 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
821 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
822 &quot;doubleValue&quot;: 3.14, # Double value
823 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
824 },
825 },
826 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
827 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
828 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
829 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
830 },
831 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800832 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800833 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
834 &quot;expressions&quot;: [ # A list of filter expressions.
835 # Object with schema name: FilterExpression
836 ],
837 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800838 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800839 &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.
840 { # The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800841 &quot;expression&quot;: &quot;A String&quot;, # A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800842 &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`.
843 &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`.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800844 },
845 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800846 &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.
847 { # Describes the visible dimension columns and rows in the report response.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800848 &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.
849 &quot;A String&quot;,
850 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800851 &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 -0800852 &quot;metricAggregations&quot;: [ # Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800853 &quot;A String&quot;,
854 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800855 &quot;offset&quot;: &quot;A String&quot;, # The row count of the start row. The first row is counted as row 0.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800856 &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.
857 { # The sort options.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800858 &quot;desc&quot;: True or False, # If true, sorts by descending order.
859 &quot;dimension&quot;: { # Sorts by dimension values. # Sorts results by a dimension&#x27;s values.
860 &quot;dimensionName&quot;: &quot;A String&quot;, # A dimension name in the request to order by.
861 &quot;orderType&quot;: &quot;A String&quot;, # Controls the rule for dimension value ordering.
862 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800863 &quot;metric&quot;: { # Sorts by metric values. # Sorts results by a metric&#x27;s values.
864 &quot;metricName&quot;: &quot;A String&quot;, # A metric name in the request to order by.
865 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800866 &quot;pivot&quot;: { # Sorts by a pivot column group. # Sorts results by a metric&#x27;s values within a pivot column group.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800867 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800868 &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.
869 { # 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 ---------|----------|----------------|----------|----------------
870 &quot;dimensionName&quot;: &quot;A String&quot;, # Must be a dimension name from the request.
871 &quot;dimensionValue&quot;: &quot;A String&quot;, # Order by only when the named dimension is this value.
872 },
873 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800874 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800875 },
876 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700877 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800878 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800879 &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 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 Botcc94ec82021-01-15 07:10:04 -0800891 &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;.
892 { # 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;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
894 { # The value of a dimension.
895 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
896 },
897 ],
898 &quot;metricValues&quot;: [ # List of requested visible metric values.
899 { # The value of a metric.
900 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
901 },
902 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800903 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800904 ],
905 &quot;dimensionHeaders&quot;: [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
906 { # 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.
907 &quot;name&quot;: &quot;A String&quot;, # The dimension&#x27;s name.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800908 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800909 ],
910 &quot;metadata&quot;: { # Response&#x27;s metadata carrying additional information about the report content. # Metadata for the report.
911 &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.
912 },
913 &quot;metricHeaders&quot;: [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
914 { # 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.
915 &quot;name&quot;: &quot;A String&quot;, # The metric&#x27;s name.
916 &quot;type&quot;: &quot;A String&quot;, # The metric&#x27;s data type.
917 },
918 ],
919 &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; }] }] }]
920 { # Dimensions&#x27; values in a single pivot.
921 &quot;pivotDimensionHeaders&quot;: [ # The size is the same as the cardinality of the corresponding dimension combinations.
922 { # Summarizes dimension values from a row for this pivot.
923 &quot;dimensionValues&quot;: [ # Values of multiple dimensions in a pivot.
924 { # The value of a dimension.
925 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
926 },
927 ],
928 },
929 ],
930 &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.
931 },
932 ],
933 &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.
934 &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.
935 &quot;consumed&quot;: 42, # Quota consumed by this request.
936 &quot;remaining&quot;: 42, # Quota remaining after this request.
937 },
938 &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.
939 &quot;consumed&quot;: 42, # Quota consumed by this request.
940 &quot;remaining&quot;: 42, # Quota remaining after this request.
941 },
942 &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.
943 &quot;consumed&quot;: 42, # Quota consumed by this request.
944 &quot;remaining&quot;: 42, # Quota remaining after this request.
945 },
946 &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.
947 &quot;consumed&quot;: 42, # Quota consumed by this request.
948 &quot;remaining&quot;: 42, # Quota remaining after this request.
949 },
950 },
951 &quot;rows&quot;: [ # Rows of dimension value combinations and metric values in the report.
952 { # 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; } ] ```
953 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
954 { # The value of a dimension.
955 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
956 },
957 ],
958 &quot;metricValues&quot;: [ # List of requested visible metric values.
959 { # The value of a metric.
960 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
961 },
962 ],
963 },
964 ],
965}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700966</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 Botcc94ec82021-01-15 07:10:04 -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;cohortReportSettings&quot;: { # Settings of a cohort report. # Settings of a cohort report.
979 &quot;accumulate&quot;: True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`.
980 },
981 &quot;cohorts&quot;: [ # The definition for the cohorts.
982 { # 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.
983 &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.
984 &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.
985 &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.
986 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800987 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800988 &quot;dimension&quot;: &quot;A String&quot;, # The dimension used by cohort. Only supports `firstTouchDate` for retention report.
989 &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.
990 },
991 ],
992 &quot;cohortsRange&quot;: { # Describes date range for a cohort report. # The data ranges of cohorts.
993 &quot;endOffset&quot;: 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
994 &quot;granularity&quot;: &quot;A String&quot;, # Reporting date range for each cohort is calculated based on these three fields.
995 &quot;startOffset&quot;: 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
996 },
997 },
998 &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.
999 &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.
1000 { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
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;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.
1003 &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.
1004 },
1005 ],
1006 &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.
1007 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
1008 &quot;expressions&quot;: [ # A list of filter expressions.
1009 # Object with schema name: FilterExpression
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001010 ],
1011 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001012 &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.
1013 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
1014 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
1015 &quot;doubleValue&quot;: 3.14, # Double value
1016 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
1017 },
1018 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
1019 &quot;doubleValue&quot;: 3.14, # Double value
1020 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
1021 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001022 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001023 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
1024 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
1025 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
1026 &quot;values&quot;: [ # The list of string values. Must be non-empty.
1027 &quot;A String&quot;,
1028 ],
1029 },
1030 &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.
1031 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
1032 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
1033 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
1034 &quot;doubleValue&quot;: 3.14, # Double value
1035 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001036 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001037 },
1038 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
1039 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
1040 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
1041 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
1042 },
1043 },
1044 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
1045 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
1046 &quot;expressions&quot;: [ # A list of filter expressions.
1047 # Object with schema name: FilterExpression
1048 ],
1049 },
1050 },
1051 &quot;dimensions&quot;: [ # The dimensions requested and displayed.
1052 { # 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.
1053 &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).
1054 &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).
1055 &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;.
1056 &quot;dimensionNames&quot;: [ # Names of dimensions. The names must refer back to names in the dimensions field of the request.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001057 &quot;A String&quot;,
1058 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001059 },
1060 &quot;lowerCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case.
1061 &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.
1062 },
1063 &quot;upperCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case.
1064 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001065 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001066 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001067 &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 Botc2228be2020-11-24 15:48:03 -08001068 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001069 ],
1070 &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.
1071 &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).
1072 },
1073 &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.
1074 &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).
1075 &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;.
1076 &quot;A String&quot;,
1077 ],
1078 &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.
1079 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
1080 &quot;expressions&quot;: [ # A list of filter expressions.
1081 # Object with schema name: FilterExpression
1082 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001083 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001084 &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.
1085 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
1086 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
1087 &quot;doubleValue&quot;: 3.14, # Double value
1088 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001089 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001090 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
1091 &quot;doubleValue&quot;: 3.14, # Double value
1092 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001093 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001094 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001095 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
1096 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
1097 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
1098 &quot;values&quot;: [ # The list of string values. Must be non-empty.
1099 &quot;A String&quot;,
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001100 ],
1101 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001102 &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.
1103 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
1104 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
1105 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
1106 &quot;doubleValue&quot;: 3.14, # Double value
1107 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001108 },
1109 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001110 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
1111 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
1112 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
1113 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
1114 },
1115 },
1116 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
1117 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
1118 &quot;expressions&quot;: [ # A list of filter expressions.
1119 # Object with schema name: FilterExpression
1120 ],
1121 },
1122 },
1123 &quot;metrics&quot;: [ # The metrics requested and displayed.
1124 { # The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.
1125 &quot;expression&quot;: &quot;A String&quot;, # A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.
1126 &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`.
1127 &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`.
1128 },
1129 ],
1130 &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).
1131 &quot;orderBys&quot;: [ # Specifies how rows are ordered in the response.
1132 { # The sort options.
1133 &quot;desc&quot;: True or False, # If true, sorts by descending order.
1134 &quot;dimension&quot;: { # Sorts by dimension values. # Sorts results by a dimension&#x27;s values.
1135 &quot;dimensionName&quot;: &quot;A String&quot;, # A dimension name in the request to order by.
1136 &quot;orderType&quot;: &quot;A String&quot;, # Controls the rule for dimension value ordering.
1137 },
1138 &quot;metric&quot;: { # Sorts by metric values. # Sorts results by a metric&#x27;s values.
1139 &quot;metricName&quot;: &quot;A String&quot;, # A metric name in the request to order by.
1140 },
1141 &quot;pivot&quot;: { # Sorts by a pivot column group. # Sorts results by a metric&#x27;s values within a pivot column group.
1142 &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.
1143 &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.
1144 { # 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 ---------|----------|----------------|----------|----------------
1145 &quot;dimensionName&quot;: &quot;A String&quot;, # Must be a dimension name from the request.
1146 &quot;dimensionValue&quot;: &quot;A String&quot;, # Order by only when the named dimension is this value.
1147 },
1148 ],
1149 },
1150 },
1151 ],
1152 &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).
1153}
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 Botcc94ec82021-01-15 07:10:04 -08001164 &quot;dimensionHeaders&quot;: [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
1165 { # 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.
1166 &quot;name&quot;: &quot;A String&quot;, # The dimension&#x27;s name.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001167 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001168 ],
1169 &quot;maximums&quot;: [ # If requested, the maximum values of metrics.
1170 { # 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; } ] ```
1171 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
1172 { # The value of a dimension.
1173 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
1174 },
1175 ],
1176 &quot;metricValues&quot;: [ # List of requested visible metric values.
1177 { # The value of a metric.
1178 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
1179 },
1180 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001181 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001182 ],
1183 &quot;metadata&quot;: { # Response&#x27;s metadata carrying additional information about the report content. # Metadata for the report.
1184 &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.
1185 },
1186 &quot;metricHeaders&quot;: [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
1187 { # 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.
1188 &quot;name&quot;: &quot;A String&quot;, # The metric&#x27;s name.
1189 &quot;type&quot;: &quot;A String&quot;, # The metric&#x27;s data type.
1190 },
1191 ],
1192 &quot;minimums&quot;: [ # If requested, the minimum values of metrics.
1193 { # 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; } ] ```
1194 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
1195 { # The value of a dimension.
1196 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
1197 },
1198 ],
1199 &quot;metricValues&quot;: [ # List of requested visible metric values.
1200 { # The value of a metric.
1201 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
1202 },
1203 ],
1204 },
1205 ],
1206 &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.
1207 &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.
1208 &quot;consumed&quot;: 42, # Quota consumed by this request.
1209 &quot;remaining&quot;: 42, # Quota remaining after this request.
1210 },
1211 &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.
1212 &quot;consumed&quot;: 42, # Quota consumed by this request.
1213 &quot;remaining&quot;: 42, # Quota remaining after this request.
1214 },
1215 &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.
1216 &quot;consumed&quot;: 42, # Quota consumed by this request.
1217 &quot;remaining&quot;: 42, # Quota remaining after this request.
1218 },
1219 &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.
1220 &quot;consumed&quot;: 42, # Quota consumed by this request.
1221 &quot;remaining&quot;: 42, # Quota remaining after this request.
1222 },
1223 },
1224 &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).
1225 &quot;rows&quot;: [ # Rows of dimension value combinations and metric values in the report.
1226 { # 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; } ] ```
1227 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
1228 { # The value of a dimension.
1229 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
1230 },
1231 ],
1232 &quot;metricValues&quot;: [ # List of requested visible metric values.
1233 { # The value of a metric.
1234 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
1235 },
1236 ],
1237 },
1238 ],
1239 &quot;totals&quot;: [ # If requested, the totaled values of metrics.
1240 { # 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; } ] ```
1241 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
1242 { # The value of a dimension.
1243 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
1244 },
1245 ],
1246 &quot;metricValues&quot;: [ # List of requested visible metric values.
1247 { # The value of a metric.
1248 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
1249 },
1250 ],
1251 },
1252 ],
1253}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001254</div>
1255
1256</body></html>