blob: dae70493059bf6d465b83e3b58c9c756aacbe345 [file] [log] [blame]
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="analyticsdata_v1alpha.html">Google Analytics Data API</a> . <a href="analyticsdata_v1alpha.v1alpha.html">v1alpha</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#batchRunPivotReports">batchRunPivotReports(body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Returns multiple pivot reports in a batch. All reports must be for the same Entity.</p>
80<p class="toc_element">
81 <code><a href="#batchRunReports">batchRunReports(body=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Returns multiple reports in a batch. All reports must be for the same Entity.</p>
83<p class="toc_element">
84 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070087 <code><a href="#runPivotReport">runPivotReport(body=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.</p>
89<p class="toc_element">
90 <code><a href="#runReport">runReport(body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="batchRunPivotReports">batchRunPivotReports(body=None, x__xgafv=None)</code>
95 <pre>Returns multiple pivot reports in a batch. All reports must be for the same Entity.
96
97Args:
98 body: object, The request body.
99 The object takes the form of:
100
101{ # The batch request containing multiple pivot report requests.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700102 &quot;requests&quot;: [ # Individual requests. Each request has a separate pivot report response. Each batch request is allowed up to 5 requests.
103 { # The request to generate a pivot report.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800104 &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.
105 { # The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.
106 &quot;expression&quot;: &quot;A String&quot;, # A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.
107 &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`.
108 &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`.
109 },
110 ],
111 &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 Bot0d561ef2020-11-25 07:50:41 -0800112 &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 Bot0d561ef2020-11-25 07:50:41 -0800113 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
114 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
115 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800116 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800117 &quot;doubleValue&quot;: 3.14, # Double value
118 },
119 },
120 &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.
121 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
122 &quot;values&quot;: [ # The list of string values. Must be non-empty.
123 &quot;A String&quot;,
124 ],
125 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
126 },
127 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
128 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
129 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
130 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
131 },
132 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
133 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
134 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
135 &quot;doubleValue&quot;: 3.14, # Double value
136 },
137 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
138 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
139 &quot;doubleValue&quot;: 3.14, # Double value
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800140 },
141 },
142 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700143 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800144 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
145 &quot;expressions&quot;: [ # A list of filter expressions.
146 # Object with schema name: FilterExpression
147 ],
148 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800149 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
150 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
151 &quot;expressions&quot;: [ # A list of filter expressions.
152 # Object with schema name: FilterExpression
153 ],
154 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800155 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800156 &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.
157 &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).
158 },
159 &quot;dimensions&quot;: [ # The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys.
160 { # 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.
161 &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).
162 &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).
163 &quot;dimensionNames&quot;: [ # Names of dimensions. The names must refer back to names in the dimensions field of the request.
164 &quot;A String&quot;,
165 ],
166 &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;.
167 },
168 &quot;lowerCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case.
169 &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.
170 },
171 &quot;upperCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case.
172 &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.
173 },
174 },
175 &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 Bot0d561ef2020-11-25 07:50:41 -0800176 },
177 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800178 &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.
179 &quot;cohortsRange&quot;: { # Describes date range for a cohort report. # The data ranges of cohorts.
180 &quot;startOffset&quot;: 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
181 &quot;granularity&quot;: &quot;A String&quot;, # Reporting date range for each cohort is calculated based on these three fields.
182 &quot;endOffset&quot;: 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
183 },
184 &quot;cohorts&quot;: [ # The definition for the cohorts.
185 { # 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.
186 &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.
187 &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.
188 &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.
189 &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.
190 },
191 &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.
192 &quot;dimension&quot;: &quot;A String&quot;, # The dimension used by cohort. Only supports `firstTouchDate` for retention report.
193 },
194 ],
195 &quot;cohortReportSettings&quot;: { # Settings of a cohort report. # Settings of a cohort report.
196 &quot;accumulate&quot;: True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`.
197 },
198 },
199 &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.
200 &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.
201 { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
202 &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.
203 &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.
204 &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.
205 },
206 ],
207 &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.
208 &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.
209 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
210 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
211 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
212 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
213 &quot;doubleValue&quot;: 3.14, # Double value
214 },
215 },
216 &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.
217 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
218 &quot;values&quot;: [ # The list of string values. Must be non-empty.
219 &quot;A String&quot;,
220 ],
221 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
222 },
223 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
224 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
225 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
226 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
227 },
228 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
229 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
230 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
231 &quot;doubleValue&quot;: 3.14, # Double value
232 },
233 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
234 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
235 &quot;doubleValue&quot;: 3.14, # Double value
236 },
237 },
238 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
239 },
240 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
241 &quot;expressions&quot;: [ # A list of filter expressions.
242 # Object with schema name: FilterExpression
243 ],
244 },
245 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
246 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
247 &quot;expressions&quot;: [ # A list of filter expressions.
248 # Object with schema name: FilterExpression
249 ],
250 },
251 },
252 &quot;currencyCode&quot;: &quot;A String&quot;, # A currency code in ISO4217 format, such as &quot;AED&quot;, &quot;USD&quot;, &quot;JPY&quot;. If the field is empty, the report uses the entity&#x27;s default currency.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800253 &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.
254 { # Describes the visible dimension columns and rows in the report response.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800255 &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.
256 &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.
257 &quot;A String&quot;,
258 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800259 &quot;orderBys&quot;: [ # Specifies how dimensions are ordered in the pivot. In the first Pivot, the OrderBys determine Row and PivotDimensionHeader ordering; in subsequent Pivots, the OrderBys determine only PivotDimensionHeader ordering. Dimensions specified in these OrderBys must be a subset of Pivot.field_names.
260 { # The sort options.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800261 &quot;desc&quot;: True or False, # If true, sorts by descending order.
262 &quot;pivot&quot;: { # Sorts by a pivot column group. # Sorts results by a metric&#x27;s values within a pivot column group.
263 &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.
264 { # 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 ---------|----------|----------------|----------|----------------
265 &quot;dimensionName&quot;: &quot;A String&quot;, # Must be a dimension name from the request.
266 &quot;dimensionValue&quot;: &quot;A String&quot;, # Order by only when the named dimension is this value.
267 },
268 ],
269 &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.
270 },
271 &quot;metric&quot;: { # Sorts by metric values. # Sorts results by a metric&#x27;s values.
272 &quot;metricName&quot;: &quot;A String&quot;, # A metric name in the request to order by.
273 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800274 &quot;dimension&quot;: { # Sorts by dimension values. # Sorts results by a dimension&#x27;s values.
275 &quot;orderType&quot;: &quot;A String&quot;, # Controls the rule for dimension value ordering.
276 &quot;dimensionName&quot;: &quot;A String&quot;, # A dimension name in the request to order by.
277 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800278 },
279 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800280 &quot;metricAggregations&quot;: [ # Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations.
281 &quot;A String&quot;,
282 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800283 &quot;offset&quot;: &quot;A String&quot;, # The row count of the start row. The first row is counted as row 0.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800284 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800285 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800286 &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 -0800287 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700288 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800289 &quot;entity&quot;: { # The unique identifier of the property whose events are tracked. # A property whose events are tracked. This entity must be specified for the batch. The entity within RunPivotReportRequest may either be unspecified or consistent with this entity.
290 &quot;propertyId&quot;: &quot;A String&quot;, # A Google Analytics GA4 property id. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
291 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700292 }
293
294 x__xgafv: string, V1 error format.
295 Allowed values
296 1 - v1 error format
297 2 - v2 error format
298
299Returns:
300 An object of the form:
301
302 { # The batch response containing multiple pivot reports.
303 &quot;pivotReports&quot;: [ # Individual responses. Each response has a separate pivot report request.
304 { # The response pivot report table corresponding to a pivot request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800305 &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.
306 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800307 &quot;remaining&quot;: 42, # Quota remaining after this request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800308 &quot;consumed&quot;: 42, # Quota consumed by this request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800309 },
310 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800311 &quot;remaining&quot;: 42, # Quota remaining after this request.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800312 &quot;consumed&quot;: 42, # Quota consumed by this request.
313 },
314 &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.
315 &quot;remaining&quot;: 42, # Quota remaining after this request.
316 &quot;consumed&quot;: 42, # Quota consumed by this request.
317 },
318 &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.
319 &quot;remaining&quot;: 42, # Quota remaining after this request.
320 &quot;consumed&quot;: 42, # Quota consumed by this request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800321 },
322 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800323 &quot;aggregates&quot;: [ # Aggregation of metric values. Can be totals, minimums, or maximums. The returned aggregations are controlled by the metric_aggregations in the pivot. The type of aggregation returned in each row is shown by the dimension_values which are set to &quot;RESERVED_&quot;.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800324 { # 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; } ] ```
325 &quot;metricValues&quot;: [ # List of requested visible metric values.
326 { # The value of a metric.
327 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
328 },
329 ],
330 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
331 { # The value of a dimension.
332 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
333 },
334 ],
335 },
336 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800337 &quot;metricHeaders&quot;: [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
338 { # Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800339 &quot;type&quot;: &quot;A String&quot;, # The metric&#x27;s data type.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800340 &quot;name&quot;: &quot;A String&quot;, # The metric&#x27;s name.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700341 },
342 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800343 &quot;rows&quot;: [ # Rows of dimension value combinations and metric values in the report.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800344 { # 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; } ] ```
345 &quot;metricValues&quot;: [ # List of requested visible metric values.
346 { # The value of a metric.
347 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
348 },
349 ],
350 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
351 { # The value of a dimension.
352 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
353 },
354 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700355 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800356 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700357 &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; }] }] }]
358 { # Dimensions&#x27; values in a single pivot.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800359 &quot;rowCount&quot;: 42, # The cardinality of the pivot as if offset = 0 and limit = -1. The total number of rows for this pivot&#x27;s fields regardless of how the parameters offset and limit are specified in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700360 &quot;pivotDimensionHeaders&quot;: [ # The size is the same as the cardinality of the corresponding dimension combinations.
361 { # Summarizes dimension values from a row for this pivot.
362 &quot;dimensionValues&quot;: [ # Values of multiple dimensions in a pivot.
363 { # The value of a dimension.
364 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
365 },
366 ],
367 },
368 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700369 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700370 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800371 &quot;dimensionHeaders&quot;: [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
372 { # 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.
373 &quot;name&quot;: &quot;A String&quot;, # The dimension&#x27;s name.
374 },
375 ],
376 &quot;metadata&quot;: { # Response&#x27;s metadata carrying additional information about the report content. # Metadata for the report.
377 &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.
378 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700379 },
380 ],
381 }</pre>
382</div>
383
384<div class="method">
385 <code class="details" id="batchRunReports">batchRunReports(body=None, x__xgafv=None)</code>
386 <pre>Returns multiple reports in a batch. All reports must be for the same Entity.
387
388Args:
389 body: object, The request body.
390 The object takes the form of:
391
392{ # The batch request containing multiple report requests.
393 &quot;requests&quot;: [ # Individual requests. Each request has a separate report response. Each batch request is allowed up to 5 requests.
394 { # The request to generate a report.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800395 &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.
396 &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.
397 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
398 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
399 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
400 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
401 &quot;doubleValue&quot;: 3.14, # Double value
402 },
403 },
404 &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.
405 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
406 &quot;values&quot;: [ # The list of string values. Must be non-empty.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800407 &quot;A String&quot;,
408 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800409 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800410 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800411 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
412 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
413 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
414 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800415 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800416 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
417 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
418 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
419 &quot;doubleValue&quot;: 3.14, # Double value
420 },
421 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
422 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
423 &quot;doubleValue&quot;: 3.14, # Double value
424 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800425 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800426 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
427 },
428 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
429 &quot;expressions&quot;: [ # A list of filter expressions.
430 # Object with schema name: FilterExpression
431 ],
432 },
433 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
434 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
435 &quot;expressions&quot;: [ # A list of filter expressions.
436 # Object with schema name: FilterExpression
437 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800438 },
439 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800440 &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).
441 &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.
442 { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
443 &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.
444 &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.
445 &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 Bot0d561ef2020-11-25 07:50:41 -0800446 },
447 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800448 &quot;dimensions&quot;: [ # The dimensions requested and displayed.
449 { # 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.
450 &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).
451 &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).
452 &quot;dimensionNames&quot;: [ # Names of dimensions. The names must refer back to names in the dimensions field of the request.
453 &quot;A String&quot;,
454 ],
455 &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;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800456 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800457 &quot;lowerCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case.
458 &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.
459 },
460 &quot;upperCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case.
461 &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.
462 },
463 },
464 &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 Bot0d561ef2020-11-25 07:50:41 -0800465 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800466 ],
467 &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).
468 &quot;orderBys&quot;: [ # Specifies how rows are ordered in the response.
469 { # The sort options.
470 &quot;desc&quot;: True or False, # If true, sorts by descending order.
471 &quot;pivot&quot;: { # Sorts by a pivot column group. # Sorts results by a metric&#x27;s values within a pivot column group.
472 &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.
473 { # 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 ---------|----------|----------------|----------|----------------
474 &quot;dimensionName&quot;: &quot;A String&quot;, # Must be a dimension name from the request.
475 &quot;dimensionValue&quot;: &quot;A String&quot;, # Order by only when the named dimension is this value.
476 },
477 ],
478 &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.
479 },
480 &quot;metric&quot;: { # Sorts by metric values. # Sorts results by a metric&#x27;s values.
481 &quot;metricName&quot;: &quot;A String&quot;, # A metric name in the request to order by.
482 },
483 &quot;dimension&quot;: { # Sorts by dimension values. # Sorts results by a dimension&#x27;s values.
484 &quot;orderType&quot;: &quot;A String&quot;, # Controls the rule for dimension value ordering.
485 &quot;dimensionName&quot;: &quot;A String&quot;, # A dimension name in the request to order by.
486 },
487 },
488 ],
489 &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).
490 &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.
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;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.
495 &quot;cohortsRange&quot;: { # Describes date range for a cohort report. # The data ranges of cohorts.
496 &quot;startOffset&quot;: 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
497 &quot;granularity&quot;: &quot;A String&quot;, # Reporting date range for each cohort is calculated based on these three fields.
498 &quot;endOffset&quot;: 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
499 },
500 &quot;cohorts&quot;: [ # The definition for the cohorts.
501 { # 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.
502 &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.
503 &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.
504 &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.
505 &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.
506 },
507 &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.
508 &quot;dimension&quot;: &quot;A String&quot;, # The dimension used by cohort. Only supports `firstTouchDate` for retention report.
509 },
510 ],
511 &quot;cohortReportSettings&quot;: { # Settings of a cohort report. # Settings of a cohort report.
512 &quot;accumulate&quot;: True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800513 },
514 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800515 &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;.
516 &quot;A String&quot;,
517 ],
518 &quot;metrics&quot;: [ # The metrics requested and displayed.
519 { # The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.
520 &quot;expression&quot;: &quot;A String&quot;, # A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.
521 &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`.
522 &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`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800523 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800524 ],
525 &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.
526 &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.
527 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
528 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
529 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
530 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
531 &quot;doubleValue&quot;: 3.14, # Double value
532 },
533 },
534 &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.
535 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
536 &quot;values&quot;: [ # The list of string values. Must be non-empty.
537 &quot;A String&quot;,
538 ],
539 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
540 },
541 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
542 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
543 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
544 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
545 },
546 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
547 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
548 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
549 &quot;doubleValue&quot;: 3.14, # Double value
550 },
551 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
552 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
553 &quot;doubleValue&quot;: 3.14, # Double value
554 },
555 },
556 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
557 },
558 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
559 &quot;expressions&quot;: [ # A list of filter expressions.
560 # Object with schema name: FilterExpression
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800561 ],
562 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800563 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
564 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
565 &quot;expressions&quot;: [ # A list of filter expressions.
566 # Object with schema name: FilterExpression
567 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800568 },
569 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800570 &quot;keepEmptyRows&quot;: True or False, # If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800571 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700572 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800573 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800574 &quot;propertyId&quot;: &quot;A String&quot;, # A Google Analytics GA4 property id. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800575 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700576 }
577
578 x__xgafv: string, V1 error format.
579 Allowed values
580 1 - v1 error format
581 2 - v2 error format
582
583Returns:
584 An object of the form:
585
586 { # The batch response containing multiple reports.
587 &quot;reports&quot;: [ # Individual responses. Each response has a separate report request.
588 { # The response report table corresponding to a request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800589 &quot;metricHeaders&quot;: [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
590 { # Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800591 &quot;type&quot;: &quot;A String&quot;, # The metric&#x27;s data type.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800592 &quot;name&quot;: &quot;A String&quot;, # The metric&#x27;s name.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800593 },
594 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800595 &quot;rowCount&quot;: 42, # The total number of rows in the query result, regardless of the number of rows returned in the response. For example if a query returns 175 rows and includes limit = 50 in the API request, the response will contain row_count = 175 but only 50 rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800596 &quot;maximums&quot;: [ # If requested, the maximum values of metrics.
597 { # 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; } ] ```
598 &quot;metricValues&quot;: [ # List of requested visible metric values.
599 { # The value of a metric.
600 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
601 },
602 ],
603 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
604 { # The value of a dimension.
605 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
606 },
607 ],
608 },
609 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800610 &quot;rows&quot;: [ # Rows of dimension value combinations and metric values in the report.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700611 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700612 &quot;metricValues&quot;: [ # List of requested visible metric values.
613 { # The value of a metric.
614 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
615 },
616 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700617 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
618 { # The value of a dimension.
619 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
620 },
621 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700622 },
623 ],
624 &quot;dimensionHeaders&quot;: [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
625 { # 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.
626 &quot;name&quot;: &quot;A String&quot;, # The dimension&#x27;s name.
627 },
628 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800629 &quot;minimums&quot;: [ # If requested, the minimum values of metrics.
630 { # 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; } ] ```
631 &quot;metricValues&quot;: [ # List of requested visible metric values.
632 { # The value of a metric.
633 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
634 },
635 ],
636 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
637 { # The value of a dimension.
638 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
639 },
640 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700641 },
642 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800643 &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.
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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800645 &quot;remaining&quot;: 42, # Quota remaining after this request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800646 &quot;consumed&quot;: 42, # Quota consumed by this request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800647 },
648 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800649 &quot;remaining&quot;: 42, # Quota remaining after this request.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800650 &quot;consumed&quot;: 42, # Quota consumed by this request.
651 },
652 &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.
653 &quot;remaining&quot;: 42, # Quota remaining after this request.
654 &quot;consumed&quot;: 42, # Quota consumed by this request.
655 },
656 &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.
657 &quot;remaining&quot;: 42, # Quota remaining after this request.
658 &quot;consumed&quot;: 42, # Quota consumed by this request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800659 },
660 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800661 &quot;metadata&quot;: { # Response&#x27;s metadata carrying additional information about the report content. # Metadata for the report.
662 &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.
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;metricValues&quot;: [ # List of requested visible metric values.
667 { # The value of a metric.
668 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
669 },
670 ],
671 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
672 { # The value of a dimension.
673 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
674 },
675 ],
676 },
677 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700678 },
679 ],
680 }</pre>
681</div>
682
683<div class="method">
684 <code class="details" id="close">close()</code>
685 <pre>Close httplib2 connections.</pre>
686</div>
687
688<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700689 <code class="details" id="runPivotReport">runPivotReport(body=None, x__xgafv=None)</code>
690 <pre>Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.
691
692Args:
693 body: object, The request body.
694 The object takes the form of:
695
696{ # The request to generate a pivot report.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800697 &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.
698 { # The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.
699 &quot;expression&quot;: &quot;A String&quot;, # A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.
700 &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`.
701 &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`.
702 },
703 ],
704 &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 Bot0d561ef2020-11-25 07:50:41 -0800705 &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 Bot0d561ef2020-11-25 07:50:41 -0800706 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
707 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
708 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800709 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800710 &quot;doubleValue&quot;: 3.14, # Double value
711 },
712 },
713 &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.
714 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
715 &quot;values&quot;: [ # The list of string values. Must be non-empty.
716 &quot;A String&quot;,
717 ],
718 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
719 },
720 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
721 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
722 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
723 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
724 },
725 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
726 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
727 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
728 &quot;doubleValue&quot;: 3.14, # Double value
729 },
730 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
731 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
732 &quot;doubleValue&quot;: 3.14, # Double value
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800733 },
734 },
735 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700736 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800737 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
738 &quot;expressions&quot;: [ # A list of filter expressions.
739 # Object with schema name: FilterExpression
740 ],
741 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800742 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
743 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
744 &quot;expressions&quot;: [ # A list of filter expressions.
745 # Object with schema name: FilterExpression
746 ],
747 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800748 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800749 &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.
750 &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).
751 },
752 &quot;dimensions&quot;: [ # The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys.
753 { # 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.
754 &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).
755 &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).
756 &quot;dimensionNames&quot;: [ # Names of dimensions. The names must refer back to names in the dimensions field of the request.
757 &quot;A String&quot;,
758 ],
759 &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;.
760 },
761 &quot;lowerCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case.
762 &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.
763 },
764 &quot;upperCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case.
765 &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.
766 },
767 },
768 &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 Bot0d561ef2020-11-25 07:50:41 -0800769 },
770 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800771 &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.
772 &quot;cohortsRange&quot;: { # Describes date range for a cohort report. # The data ranges of cohorts.
773 &quot;startOffset&quot;: 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
774 &quot;granularity&quot;: &quot;A String&quot;, # Reporting date range for each cohort is calculated based on these three fields.
775 &quot;endOffset&quot;: 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
776 },
777 &quot;cohorts&quot;: [ # The definition for the cohorts.
778 { # 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.
779 &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.
780 &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.
781 &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.
782 &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.
783 },
784 &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.
785 &quot;dimension&quot;: &quot;A String&quot;, # The dimension used by cohort. Only supports `firstTouchDate` for retention report.
786 },
787 ],
788 &quot;cohortReportSettings&quot;: { # Settings of a cohort report. # Settings of a cohort report.
789 &quot;accumulate&quot;: True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`.
790 },
791 },
792 &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.
793 &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.
794 { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
795 &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.
796 &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.
797 &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.
798 },
799 ],
800 &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.
801 &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.
802 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
803 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
804 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
805 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
806 &quot;doubleValue&quot;: 3.14, # Double value
807 },
808 },
809 &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.
810 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
811 &quot;values&quot;: [ # The list of string values. Must be non-empty.
812 &quot;A String&quot;,
813 ],
814 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
815 },
816 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
817 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
818 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
819 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
820 },
821 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
822 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
823 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
824 &quot;doubleValue&quot;: 3.14, # Double value
825 },
826 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
827 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
828 &quot;doubleValue&quot;: 3.14, # Double value
829 },
830 },
831 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
832 },
833 &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 },
838 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
839 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
840 &quot;expressions&quot;: [ # A list of filter expressions.
841 # Object with schema name: FilterExpression
842 ],
843 },
844 },
845 &quot;currencyCode&quot;: &quot;A String&quot;, # A currency code in ISO4217 format, such as &quot;AED&quot;, &quot;USD&quot;, &quot;JPY&quot;. If the field is empty, the report uses the entity&#x27;s default currency.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -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 Botb6971b02020-11-26 17:16:03 -0800848 &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.
849 &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.
850 &quot;A String&quot;,
851 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800852 &quot;orderBys&quot;: [ # Specifies how dimensions are ordered in the pivot. In the first Pivot, the OrderBys determine Row and PivotDimensionHeader ordering; in subsequent Pivots, the OrderBys determine only PivotDimensionHeader ordering. Dimensions specified in these OrderBys must be a subset of Pivot.field_names.
853 { # The sort options.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800854 &quot;desc&quot;: True or False, # If true, sorts by descending order.
855 &quot;pivot&quot;: { # Sorts by a pivot column group. # Sorts results by a metric&#x27;s values within a pivot column group.
856 &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.
857 { # 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 ---------|----------|----------------|----------|----------------
858 &quot;dimensionName&quot;: &quot;A String&quot;, # Must be a dimension name from the request.
859 &quot;dimensionValue&quot;: &quot;A String&quot;, # Order by only when the named dimension is this value.
860 },
861 ],
862 &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.
863 },
864 &quot;metric&quot;: { # Sorts by metric values. # Sorts results by a metric&#x27;s values.
865 &quot;metricName&quot;: &quot;A String&quot;, # A metric name in the request to order by.
866 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800867 &quot;dimension&quot;: { # Sorts by dimension values. # Sorts results by a dimension&#x27;s values.
868 &quot;orderType&quot;: &quot;A String&quot;, # Controls the rule for dimension value ordering.
869 &quot;dimensionName&quot;: &quot;A String&quot;, # A dimension name in the request to order by.
870 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800871 },
872 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800873 &quot;metricAggregations&quot;: [ # Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations.
874 &quot;A String&quot;,
875 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800876 &quot;offset&quot;: &quot;A String&quot;, # The row count of the start row. The first row is counted as row 0.
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 Bot0d561ef2020-11-25 07:50:41 -0800891 &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.
892 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800893 &quot;remaining&quot;: 42, # Quota remaining after this request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800894 &quot;consumed&quot;: 42, # Quota consumed by this request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800895 },
896 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800897 &quot;remaining&quot;: 42, # Quota remaining after this request.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800898 &quot;consumed&quot;: 42, # Quota consumed by this request.
899 },
900 &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.
901 &quot;remaining&quot;: 42, # Quota remaining after this request.
902 &quot;consumed&quot;: 42, # Quota consumed by this request.
903 },
904 &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.
905 &quot;remaining&quot;: 42, # Quota remaining after this request.
906 &quot;consumed&quot;: 42, # Quota consumed by this request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800907 },
908 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800909 &quot;aggregates&quot;: [ # Aggregation of metric values. Can be totals, minimums, or maximums. The returned aggregations are controlled by the metric_aggregations in the pivot. The type of aggregation returned in each row is shown by the dimension_values which are set to &quot;RESERVED_&quot;.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800910 { # 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; } ] ```
911 &quot;metricValues&quot;: [ # List of requested visible metric values.
912 { # The value of a metric.
913 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
914 },
915 ],
916 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
917 { # The value of a dimension.
918 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
919 },
920 ],
921 },
922 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800923 &quot;metricHeaders&quot;: [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
924 { # Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800925 &quot;type&quot;: &quot;A String&quot;, # The metric&#x27;s data type.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800926 &quot;name&quot;: &quot;A String&quot;, # The metric&#x27;s name.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700927 },
928 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800929 &quot;rows&quot;: [ # Rows of dimension value combinations and metric values in the report.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800930 { # 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; } ] ```
931 &quot;metricValues&quot;: [ # List of requested visible metric values.
932 { # The value of a metric.
933 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
934 },
935 ],
936 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
937 { # The value of a dimension.
938 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
939 },
940 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700941 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800942 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700943 &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; }] }] }]
944 { # Dimensions&#x27; values in a single pivot.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800945 &quot;rowCount&quot;: 42, # The cardinality of the pivot as if offset = 0 and limit = -1. The total number of rows for this pivot&#x27;s fields regardless of how the parameters offset and limit are specified in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700946 &quot;pivotDimensionHeaders&quot;: [ # The size is the same as the cardinality of the corresponding dimension combinations.
947 { # Summarizes dimension values from a row for this pivot.
948 &quot;dimensionValues&quot;: [ # Values of multiple dimensions in a pivot.
949 { # The value of a dimension.
950 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
951 },
952 ],
953 },
954 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700955 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700956 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800957 &quot;dimensionHeaders&quot;: [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
958 { # 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.
959 &quot;name&quot;: &quot;A String&quot;, # The dimension&#x27;s name.
960 },
961 ],
962 &quot;metadata&quot;: { # Response&#x27;s metadata carrying additional information about the report content. # Metadata for the report.
963 &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.
964 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700965 }</pre>
966</div>
967
968<div class="method">
969 <code class="details" id="runReport">runReport(body=None, x__xgafv=None)</code>
970 <pre>Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name.
971
972Args:
973 body: object, The request body.
974 The object takes the form of:
975
976{ # The request to generate a report.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800977 &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.
978 &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.
979 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
980 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
981 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
982 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
983 &quot;doubleValue&quot;: 3.14, # Double value
984 },
985 },
986 &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.
987 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
988 &quot;values&quot;: [ # The list of string values. Must be non-empty.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800989 &quot;A String&quot;,
990 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800991 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800992 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800993 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
994 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
995 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
996 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800997 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800998 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
999 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
1000 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
1001 &quot;doubleValue&quot;: 3.14, # Double value
1002 },
1003 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
1004 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
1005 &quot;doubleValue&quot;: 3.14, # Double value
1006 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001007 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001008 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
1009 },
1010 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
1011 &quot;expressions&quot;: [ # A list of filter expressions.
1012 # Object with schema name: FilterExpression
1013 ],
1014 },
1015 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
1016 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
1017 &quot;expressions&quot;: [ # A list of filter expressions.
1018 # Object with schema name: FilterExpression
1019 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001020 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001021 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001022 &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).
1023 &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.
1024 { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
1025 &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.
1026 &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.
1027 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001028 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001029 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001030 &quot;dimensions&quot;: [ # The dimensions requested and displayed.
1031 { # 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.
1032 &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).
1033 &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).
1034 &quot;dimensionNames&quot;: [ # Names of dimensions. The names must refer back to names in the dimensions field of the request.
1035 &quot;A String&quot;,
1036 ],
1037 &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;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001038 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001039 &quot;lowerCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case.
1040 &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.
1041 },
1042 &quot;upperCase&quot;: { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case.
1043 &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.
1044 },
1045 },
1046 &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 Bot0d561ef2020-11-25 07:50:41 -08001047 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001048 ],
1049 &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).
1050 &quot;orderBys&quot;: [ # Specifies how rows are ordered in the response.
1051 { # The sort options.
1052 &quot;desc&quot;: True or False, # If true, sorts by descending order.
1053 &quot;pivot&quot;: { # Sorts by a pivot column group. # Sorts results by a metric&#x27;s values within a pivot column group.
1054 &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.
1055 { # 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 ---------|----------|----------------|----------|----------------
1056 &quot;dimensionName&quot;: &quot;A String&quot;, # Must be a dimension name from the request.
1057 &quot;dimensionValue&quot;: &quot;A String&quot;, # Order by only when the named dimension is this value.
1058 },
1059 ],
1060 &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.
1061 },
1062 &quot;metric&quot;: { # Sorts by metric values. # Sorts results by a metric&#x27;s values.
1063 &quot;metricName&quot;: &quot;A String&quot;, # A metric name in the request to order by.
1064 },
1065 &quot;dimension&quot;: { # Sorts by dimension values. # Sorts results by a dimension&#x27;s values.
1066 &quot;orderType&quot;: &quot;A String&quot;, # Controls the rule for dimension value ordering.
1067 &quot;dimensionName&quot;: &quot;A String&quot;, # A dimension name in the request to order by.
1068 },
1069 },
1070 ],
1071 &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).
1072 &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.
1073 &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.
1074 &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).
1075 },
1076 &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.
1077 &quot;cohortsRange&quot;: { # Describes date range for a cohort report. # The data ranges of cohorts.
1078 &quot;startOffset&quot;: 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
1079 &quot;granularity&quot;: &quot;A String&quot;, # Reporting date range for each cohort is calculated based on these three fields.
1080 &quot;endOffset&quot;: 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
1081 },
1082 &quot;cohorts&quot;: [ # The definition for the cohorts.
1083 { # 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.
1084 &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.
1085 &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.
1086 &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.
1087 &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.
1088 },
1089 &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.
1090 &quot;dimension&quot;: &quot;A String&quot;, # The dimension used by cohort. Only supports `firstTouchDate` for retention report.
1091 },
1092 ],
1093 &quot;cohortReportSettings&quot;: { # Settings of a cohort report. # Settings of a cohort report.
1094 &quot;accumulate&quot;: True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001095 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001096 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001097 &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;.
1098 &quot;A String&quot;,
1099 ],
1100 &quot;metrics&quot;: [ # The metrics requested and displayed.
1101 { # The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.
1102 &quot;expression&quot;: &quot;A String&quot;, # A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.
1103 &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`.
1104 &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`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001105 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001106 ],
1107 &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.
1108 &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.
1109 &quot;numericFilter&quot;: { # Filters for numeric or date values. # A filter for numeric or date values.
1110 &quot;operation&quot;: &quot;A String&quot;, # The operation type for this filter.
1111 &quot;value&quot;: { # To represent a number. # A numeric value or a date value.
1112 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
1113 &quot;doubleValue&quot;: 3.14, # Double value
1114 },
1115 },
1116 &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.
1117 &quot;inListFilter&quot;: { # The result needs to be in a list of string values. # A filter for in list values.
1118 &quot;values&quot;: [ # The list of string values. Must be non-empty.
1119 &quot;A String&quot;,
1120 ],
1121 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
1122 },
1123 &quot;stringFilter&quot;: { # The filter for string # Strings related filter.
1124 &quot;matchType&quot;: &quot;A String&quot;, # The match type for this filter.
1125 &quot;value&quot;: &quot;A String&quot;, # The string value used for the matching.
1126 &quot;caseSensitive&quot;: True or False, # If true, the string value is case sensitive.
1127 },
1128 &quot;betweenFilter&quot;: { # To express that the result needs to be between two numbers (inclusive). # A filter for two values.
1129 &quot;toValue&quot;: { # To represent a number. # Ends with this number.
1130 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
1131 &quot;doubleValue&quot;: 3.14, # Double value
1132 },
1133 &quot;fromValue&quot;: { # To represent a number. # Begins with this number.
1134 &quot;int64Value&quot;: &quot;A String&quot;, # Integer value
1135 &quot;doubleValue&quot;: 3.14, # Double value
1136 },
1137 },
1138 &quot;fieldName&quot;: &quot;A String&quot;, # The dimension name or metric name. Must be a name defined in dimensions or metrics.
1139 },
1140 &quot;orGroup&quot;: { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship.
1141 &quot;expressions&quot;: [ # A list of filter expressions.
1142 # Object with schema name: FilterExpression
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001143 ],
1144 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001145 &quot;notExpression&quot;: # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression.
1146 &quot;andGroup&quot;: { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship.
1147 &quot;expressions&quot;: [ # A list of filter expressions.
1148 # Object with schema name: FilterExpression
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001149 ],
1150 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001151 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001152 &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.
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 Bot0d561ef2020-11-25 07:50:41 -08001164 &quot;metricHeaders&quot;: [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
1165 { # Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001166 &quot;type&quot;: &quot;A String&quot;, # The metric&#x27;s data type.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001167 &quot;name&quot;: &quot;A String&quot;, # The metric&#x27;s name.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001168 },
1169 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001170 &quot;rowCount&quot;: 42, # The total number of rows in the query result, regardless of the number of rows returned in the response. For example if a query returns 175 rows and includes limit = 50 in the API request, the response will contain row_count = 175 but only 50 rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001171 &quot;maximums&quot;: [ # If requested, the maximum values of metrics.
1172 { # 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; } ] ```
1173 &quot;metricValues&quot;: [ # List of requested visible metric values.
1174 { # The value of a metric.
1175 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
1176 },
1177 ],
1178 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
1179 { # The value of a dimension.
1180 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
1181 },
1182 ],
1183 },
1184 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001185 &quot;rows&quot;: [ # Rows of dimension value combinations and metric values in the report.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001186 { # Report data for each row. For example if RunReportRequest contains: ```none &quot;dimensions&quot;: [ { &quot;name&quot;: &quot;eventName&quot; }, { &quot;name&quot;: &quot;countryId&quot; } ], &quot;metrics&quot;: [ { &quot;name&quot;: &quot;eventCount&quot; } ] ``` One row with &#x27;in_app_purchase&#x27; as the eventName, &#x27;JP&#x27; as the countryId, and 15 as the eventCount, would be: ```none &quot;dimensionValues&quot;: [ { &quot;value&quot;: &quot;in_app_purchase&quot; }, { &quot;value&quot;: &quot;JP&quot; } ], &quot;metricValues&quot;: [ { &quot;value&quot;: &quot;15&quot; } ] ```
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001187 &quot;metricValues&quot;: [ # List of requested visible metric values.
1188 { # The value of a metric.
1189 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
1190 },
1191 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001192 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
1193 { # The value of a dimension.
1194 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
1195 },
1196 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001197 },
1198 ],
1199 &quot;dimensionHeaders&quot;: [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
1200 { # 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.
1201 &quot;name&quot;: &quot;A String&quot;, # The dimension&#x27;s name.
1202 },
1203 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001204 &quot;minimums&quot;: [ # If requested, the minimum values of metrics.
1205 { # 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; } ] ```
1206 &quot;metricValues&quot;: [ # List of requested visible metric values.
1207 { # The value of a metric.
1208 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
1209 },
1210 ],
1211 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
1212 { # The value of a dimension.
1213 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
1214 },
1215 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001216 },
1217 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001218 &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.
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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001220 &quot;remaining&quot;: 42, # Quota remaining after this request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001221 &quot;consumed&quot;: 42, # Quota consumed by this request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001222 },
1223 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001224 &quot;remaining&quot;: 42, # Quota remaining after this request.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001225 &quot;consumed&quot;: 42, # Quota consumed by this request.
1226 },
1227 &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.
1228 &quot;remaining&quot;: 42, # Quota remaining after this request.
1229 &quot;consumed&quot;: 42, # Quota consumed by this request.
1230 },
1231 &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.
1232 &quot;remaining&quot;: 42, # Quota remaining after this request.
1233 &quot;consumed&quot;: 42, # Quota consumed by this request.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001234 },
1235 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001236 &quot;metadata&quot;: { # Response&#x27;s metadata carrying additional information about the report content. # Metadata for the report.
1237 &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.
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;metricValues&quot;: [ # List of requested visible metric values.
1242 { # The value of a metric.
1243 &quot;value&quot;: &quot;A String&quot;, # Measurement value. See MetricHeader for type.
1244 },
1245 ],
1246 &quot;dimensionValues&quot;: [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
1247 { # The value of a dimension.
1248 &quot;value&quot;: &quot;A String&quot;, # Value as a string if the dimension type is a string.
1249 },
1250 ],
1251 },
1252 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001253 }</pre>
1254</div>
1255
1256</body></html>