Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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"> |
| 87 | <code><a href="#getUniversalMetadata">getUniversalMetadata(x__xgafv=None)</a></code></p> |
| 88 | <p class="firstline">Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. Dimensions and metrics will be mostly added over time, but renames and deletions may occur. This method returns Universal Metadata. Universal Metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#runPivotReport">runPivotReport(body=None, x__xgafv=None)</a></code></p> |
| 91 | <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> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#runReport">runReport(body=None, x__xgafv=None)</a></code></p> |
| 94 | <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> |
| 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
| 97 | <code class="details" id="batchRunPivotReports">batchRunPivotReports(body=None, x__xgafv=None)</code> |
| 98 | <pre>Returns multiple pivot reports in a batch. All reports must be for the same Entity. |
| 99 | |
| 100 | Args: |
| 101 | body: object, The request body. |
| 102 | The object takes the form of: |
| 103 | |
| 104 | { # The batch request containing multiple pivot report requests. |
| 105 | "entity": { # 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. |
| 106 | "propertyId": "A String", # A Google Analytics App + Web property id. |
| 107 | }, |
| 108 | "requests": [ # Individual requests. Each request has a separate pivot report response. Each batch request is allowed up to 5 requests. |
| 109 | { # The request to generate a pivot report. |
| 110 | "keepEmptyRows": 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. |
| 111 | "entity": { # 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. |
| 112 | "propertyId": "A String", # A Google Analytics App + Web property id. |
| 113 | }, |
| 114 | "pivots": [ # Describes the visual format of the report'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. |
| 115 | { # Describes the visible dimension columns and rows in the report response. |
| 116 | "limit": "A String", # The number of rows to return in this pivot. If unspecified, 10 rows are returned. If -1, all rows are returned. |
| 117 | "metricAggregations": [ # Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations. |
| 118 | "A String", |
| 119 | ], |
| 120 | "fieldNames": [ # Dimension names for visible columns in the report response. Including "dateRange" 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. |
| 121 | "A String", |
| 122 | ], |
| 123 | "orderBys": [ # 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. |
| 124 | { # The sort options. |
| 125 | "dimension": { # Sorts by dimension values. # Sorts results by a dimension's values. |
| 126 | "orderType": "A String", # Controls the rule for dimension value ordering. |
| 127 | "dimensionName": "A String", # A dimension name in the request to order by. |
| 128 | }, |
| 129 | "metric": { # Sorts by metric values. # Sorts results by a metric's values. |
| 130 | "metricName": "A String", # A metric name in the request to order by. |
| 131 | }, |
| 132 | "desc": True or False, # If true, sorts by descending order. |
| 133 | "pivot": { # Sorts by a pivot column group. # Sorts results by a metric's values within a pivot column group. |
| 134 | "pivotSelections": [ # 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's dimension name and value pair. |
| 135 | { # A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric's value. For example if pivots = {{"browser", "Chrome"}} and metric_name = "Sessions", 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 ---------|----------|----------------|----------|---------------- |
| 136 | "dimensionName": "A String", # Must be a dimension name from the request. |
| 137 | "dimensionValue": "A String", # Order by only when the named dimension is this value. |
| 138 | }, |
| 139 | ], |
| 140 | "metricName": "A String", # In the response to order by, order rows by this column. Must be a metric name from the request. |
| 141 | }, |
| 142 | }, |
| 143 | ], |
| 144 | "offset": "A String", # The row count of the start row. The first row is counted as row 0. |
| 145 | }, |
| 146 | ], |
| 147 | "cohortSpec": { # Specification for a cohort report. # Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present. |
| 148 | "cohortsRange": { # Describes date range for a cohort report. # The data ranges of cohorts. |
| 149 | "endOffset": 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset. |
| 150 | "granularity": "A String", # Reporting date range for each cohort is calculated based on these three fields. |
| 151 | "startOffset": 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset. |
| 152 | }, |
| 153 | "cohorts": [ # The definition for the cohorts. |
| 154 | { # 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. |
| 155 | "dimension": "A String", # The dimension used by cohort. Only supports `firstTouchDate` for retention report. |
| 156 | "name": "A String", # 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. |
| 157 | "dateRange": { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges, and the union of the ranges can cover up to 1 year. # 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'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. |
| 158 | "name": "A String", # 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. |
| 159 | "endDate": "A String", # 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's reporting time zone. |
| 160 | "startDate": "A String", # 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's reporting time zone. |
| 161 | }, |
| 162 | }, |
| 163 | ], |
| 164 | "cohortReportSettings": { # Settings of a cohort report. # Settings of a cohort report. |
| 165 | "accumulate": True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`. |
| 166 | }, |
| 167 | }, |
| 168 | "metrics": [ # 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. |
| 169 | { # The quantitative measurements of a report. For example, the metric eventCount is the total number of events. Requests are allowed up to 10 metrics. |
| 170 | "name": "A String", # The name of the metric. |
| 171 | "expression": "A String", # A mathematical expression for derived metrics. For example, the metric Event count per user is eventCount/totalUsers. |
| 172 | "invisible": True or False, # Indicates if a metric is invisible. If a metric is invisible, the metric is not in the response, but can be used in filters, order_bys or being referred to in a metric expression. |
| 173 | }, |
| 174 | ], |
| 175 | "returnPropertyQuota": True or False, # Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). |
| 176 | "metricFilter": { # 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. |
| 177 | "filter": { # 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. |
| 178 | "stringFilter": { # The filter for string # Strings related filter. |
| 179 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 180 | "matchType": "A String", # The match type for this filter. |
| 181 | "value": "A String", # The string value used for the matching. |
| 182 | }, |
| 183 | "inListFilter": { # The result needs to be in a list of string values. # A filter for in list values. |
| 184 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 185 | "values": [ # The list of string values. Must be non-empty. |
| 186 | "A String", |
| 187 | ], |
| 188 | }, |
| 189 | "betweenFilter": { # To express that the result needs to be between two numbers (inclusive). # A filter for two values. |
| 190 | "fromValue": { # To represent a number. # Begins with this number. |
| 191 | "doubleValue": 3.14, # Double value |
| 192 | "int64Value": "A String", # Integer value |
| 193 | }, |
| 194 | "toValue": { # To represent a number. # Ends with this number. |
| 195 | "doubleValue": 3.14, # Double value |
| 196 | "int64Value": "A String", # Integer value |
| 197 | }, |
| 198 | }, |
| 199 | "fieldName": "A String", # The dimension name or metric name. Must be a name defined in dimensions or metrics. |
| 200 | "numericFilter": { # Filters for numeric or date values. # A filter for numeric or date values. |
| 201 | "value": { # To represent a number. # A numeric value or a date value. |
| 202 | "doubleValue": 3.14, # Double value |
| 203 | "int64Value": "A String", # Integer value |
| 204 | }, |
| 205 | "operation": "A String", # The operation type for this filter. |
| 206 | }, |
| 207 | "nullFilter": True or False, # A filter for null values. |
| 208 | }, |
| 209 | "andGroup": { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship. |
| 210 | "expressions": [ # A list of filter expressions. |
| 211 | # Object with schema name: FilterExpression |
| 212 | ], |
| 213 | }, |
| 214 | "orGroup": { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship. |
| 215 | "expressions": [ # A list of filter expressions. |
| 216 | # Object with schema name: FilterExpression |
| 217 | ], |
| 218 | }, |
| 219 | "notExpression": # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression. |
| 220 | }, |
| 221 | "dateRanges": [ # 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 "dateRange" can be included in a Pivot's field names; if included, the report compares between date ranges. In a cohort request, this `dateRanges` must be unspecified. |
| 222 | { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges, and the union of the ranges can cover up to 1 year. |
| 223 | "name": "A String", # 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. |
| 224 | "endDate": "A String", # 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's reporting time zone. |
| 225 | "startDate": "A String", # 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's reporting time zone. |
| 226 | }, |
| 227 | ], |
| 228 | "currencyCode": "A String", # A currency code in ISO4217 format, such as "AED", "USD", "JPY". If the field is empty, the report uses the entity's default currency. |
| 229 | "dimensions": [ # The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys. |
| 230 | { # Dimensions are attributes of your data. For example, the dimension City indicates the city, for example, "Paris" or "New York", from which an event originates. Requests are allowed up to 8 dimensions. |
| 231 | "dimensionExpression": { # 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 "country, city": concatenate(country, ", ", city). |
| 232 | "upperCase": { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case. |
| 233 | "dimensionName": "A String", # Name of a dimension. The name must refer back to a name in dimensions field of the request. |
| 234 | }, |
| 235 | "concatenate": { # Used to combine dimension values to a single dimension. # Used to combine dimension values to a single dimension. For example, dimension "country, city": concatenate(country, ", ", city). |
| 236 | "delimiter": "A String", # The delimiter placed between dimension names. Delimiters are often single characters such as "|" or "," 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 = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the response will contain "US,FR,JP". |
| 237 | "dimensionNames": [ # Names of dimensions. The names must refer back to names in the dimensions field of the request. |
| 238 | "A String", |
| 239 | ], |
| 240 | }, |
| 241 | "lowerCase": { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case. |
| 242 | "dimensionName": "A String", # Name of a dimension. The name must refer back to a name in dimensions field of the request. |
| 243 | }, |
| 244 | }, |
| 245 | "name": "A String", # The name of the dimension. |
| 246 | }, |
| 247 | ], |
| 248 | "dimensionFilter": { # 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. |
| 249 | "filter": { # 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. |
| 250 | "stringFilter": { # The filter for string # Strings related filter. |
| 251 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 252 | "matchType": "A String", # The match type for this filter. |
| 253 | "value": "A String", # The string value used for the matching. |
| 254 | }, |
| 255 | "inListFilter": { # The result needs to be in a list of string values. # A filter for in list values. |
| 256 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 257 | "values": [ # The list of string values. Must be non-empty. |
| 258 | "A String", |
| 259 | ], |
| 260 | }, |
| 261 | "betweenFilter": { # To express that the result needs to be between two numbers (inclusive). # A filter for two values. |
| 262 | "fromValue": { # To represent a number. # Begins with this number. |
| 263 | "doubleValue": 3.14, # Double value |
| 264 | "int64Value": "A String", # Integer value |
| 265 | }, |
| 266 | "toValue": { # To represent a number. # Ends with this number. |
| 267 | "doubleValue": 3.14, # Double value |
| 268 | "int64Value": "A String", # Integer value |
| 269 | }, |
| 270 | }, |
| 271 | "fieldName": "A String", # The dimension name or metric name. Must be a name defined in dimensions or metrics. |
| 272 | "numericFilter": { # Filters for numeric or date values. # A filter for numeric or date values. |
| 273 | "value": { # To represent a number. # A numeric value or a date value. |
| 274 | "doubleValue": 3.14, # Double value |
| 275 | "int64Value": "A String", # Integer value |
| 276 | }, |
| 277 | "operation": "A String", # The operation type for this filter. |
| 278 | }, |
| 279 | "nullFilter": True or False, # A filter for null values. |
| 280 | }, |
| 281 | "andGroup": { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship. |
| 282 | "expressions": [ # A list of filter expressions. |
| 283 | # Object with schema name: FilterExpression |
| 284 | ], |
| 285 | }, |
| 286 | "orGroup": { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship. |
| 287 | "expressions": [ # A list of filter expressions. |
| 288 | # Object with schema name: FilterExpression |
| 289 | ], |
| 290 | }, |
| 291 | "notExpression": # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression. |
| 292 | }, |
| 293 | }, |
| 294 | ], |
| 295 | } |
| 296 | |
| 297 | x__xgafv: string, V1 error format. |
| 298 | Allowed values |
| 299 | 1 - v1 error format |
| 300 | 2 - v2 error format |
| 301 | |
| 302 | Returns: |
| 303 | An object of the form: |
| 304 | |
| 305 | { # The batch response containing multiple pivot reports. |
| 306 | "pivotReports": [ # Individual responses. Each response has a separate pivot report request. |
| 307 | { # The response pivot report table corresponding to a pivot request. |
| 308 | "dimensionHeaders": [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows. |
| 309 | { # 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. |
| 310 | "name": "A String", # The dimension's name. |
| 311 | }, |
| 312 | ], |
| 313 | "rows": [ # Rows of dimension value combinations and metric values in the report. |
| 314 | { # Report data for each row. For example if RunReportRequest contains: ```none dimensions { name: "eventName" } dimensions { name: "countryId" } metrics { name: "eventCount" } ``` One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and 15 as the eventCount, would be: ```none dimension_values { name: 'in_app_purchase' name: 'us' } metric_values { int64_value: 15 } ``` |
| 315 | "metricValues": [ # List of requested visible metric values. |
| 316 | { # The value of a metric. |
| 317 | "value": "A String", # Measurement value. See MetricHeader for type. |
| 318 | }, |
| 319 | ], |
| 320 | "dimensionValues": [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. |
| 321 | { # The value of a dimension. |
| 322 | "value": "A String", # Value as a string if the dimension type is a string. |
| 323 | }, |
| 324 | ], |
| 325 | }, |
| 326 | ], |
| 327 | "aggregates": [ # 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 "RESERVED_". |
| 328 | { # Report data for each row. For example if RunReportRequest contains: ```none dimensions { name: "eventName" } dimensions { name: "countryId" } metrics { name: "eventCount" } ``` One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and 15 as the eventCount, would be: ```none dimension_values { name: 'in_app_purchase' name: 'us' } metric_values { int64_value: 15 } ``` |
| 329 | "metricValues": [ # List of requested visible metric values. |
| 330 | { # The value of a metric. |
| 331 | "value": "A String", # Measurement value. See MetricHeader for type. |
| 332 | }, |
| 333 | ], |
| 334 | "dimensionValues": [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. |
| 335 | { # The value of a dimension. |
| 336 | "value": "A String", # Value as a string if the dimension type is a string. |
| 337 | }, |
| 338 | ], |
| 339 | }, |
| 340 | ], |
| 341 | "pivotHeaders": [ # 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: "pivots": [{ "fieldNames": ["country", "city"] }, { "fieldNames": "eventName" }] We will have the following `pivotHeaders` in the response: "pivotHeaders" : [{ "dimensionHeaders": [{ "dimensionValues": [ { "value": "United Kingdom" }, { "value": "London" } ] }, { "dimensionValues": [ { "value": "Japan" }, { "value": "Osaka" } ] }] }, { "dimensionHeaders": [{ "dimensionValues": [{ "value": "session_start" }] }, { "dimensionValues": [{ "value": "scroll" }] }] }] |
| 342 | { # Dimensions' values in a single pivot. |
| 343 | "rowCount": 42, # The cardinality of the pivot as if offset = 0 and limit = -1. The total number of rows for this pivot's fields regardless of how the parameters offset and limit are specified in the request. |
| 344 | "pivotDimensionHeaders": [ # The size is the same as the cardinality of the corresponding dimension combinations. |
| 345 | { # Summarizes dimension values from a row for this pivot. |
| 346 | "dimensionValues": [ # Values of multiple dimensions in a pivot. |
| 347 | { # The value of a dimension. |
| 348 | "value": "A String", # Value as a string if the dimension type is a string. |
| 349 | }, |
| 350 | ], |
| 351 | }, |
| 352 | ], |
| 353 | }, |
| 354 | ], |
| 355 | "propertyQuota": { # 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's quota state including this request. |
| 356 | "serverErrorsPerProjectPerHour": { # Current state for a particular quota group. # Analytics Properties and cloud project pairs can have up to 10 server errors per hour. |
| 357 | "remaining": 42, # Quota remaining after this request. |
| 358 | "consumed": 42, # Quota consumed by this request. |
| 359 | }, |
| 360 | "concurrentRequests": { # Current state for a particular quota group. # Analytics Properties can send up to 10 concurrent requests. |
| 361 | "remaining": 42, # Quota remaining after this request. |
| 362 | "consumed": 42, # Quota consumed by this request. |
| 363 | }, |
| 364 | "tokensPerHour": { # Current state for a particular quota group. # Analytics Properties can use up to 5,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. |
| 365 | "remaining": 42, # Quota remaining after this request. |
| 366 | "consumed": 42, # Quota consumed by this request. |
| 367 | }, |
| 368 | "tokensPerDay": { # Current state for a particular quota group. # Analytics Properties can use up to 25,000 tokens per day. Most requests consume fewer than 10 tokens. |
| 369 | "remaining": 42, # Quota remaining after this request. |
| 370 | "consumed": 42, # Quota consumed by this request. |
| 371 | }, |
| 372 | }, |
| 373 | "metadata": { # Response's metadata carrying additional information about the report content. # Metadata for the report. |
| 374 | "dataLossFromOtherRow": True or False, # If true, indicates some buckets of dimension combinations are rolled into "(other)" row. This can happen for high cardinality reports. |
| 375 | }, |
| 376 | "metricHeaders": [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows. |
| 377 | { # 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. |
| 378 | "type": "A String", # The metric's data type. |
| 379 | "name": "A String", # The metric's name. |
| 380 | }, |
| 381 | ], |
| 382 | }, |
| 383 | ], |
| 384 | }</pre> |
| 385 | </div> |
| 386 | |
| 387 | <div class="method"> |
| 388 | <code class="details" id="batchRunReports">batchRunReports(body=None, x__xgafv=None)</code> |
| 389 | <pre>Returns multiple reports in a batch. All reports must be for the same Entity. |
| 390 | |
| 391 | Args: |
| 392 | body: object, The request body. |
| 393 | The object takes the form of: |
| 394 | |
| 395 | { # The batch request containing multiple report requests. |
| 396 | "requests": [ # Individual requests. Each request has a separate report response. Each batch request is allowed up to 5 requests. |
| 397 | { # The request to generate a report. |
| 398 | "dimensions": [ # The dimensions requested and displayed. |
| 399 | { # Dimensions are attributes of your data. For example, the dimension City indicates the city, for example, "Paris" or "New York", from which an event originates. Requests are allowed up to 8 dimensions. |
| 400 | "dimensionExpression": { # 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 "country, city": concatenate(country, ", ", city). |
| 401 | "upperCase": { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case. |
| 402 | "dimensionName": "A String", # Name of a dimension. The name must refer back to a name in dimensions field of the request. |
| 403 | }, |
| 404 | "concatenate": { # Used to combine dimension values to a single dimension. # Used to combine dimension values to a single dimension. For example, dimension "country, city": concatenate(country, ", ", city). |
| 405 | "delimiter": "A String", # The delimiter placed between dimension names. Delimiters are often single characters such as "|" or "," 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 = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the response will contain "US,FR,JP". |
| 406 | "dimensionNames": [ # Names of dimensions. The names must refer back to names in the dimensions field of the request. |
| 407 | "A String", |
| 408 | ], |
| 409 | }, |
| 410 | "lowerCase": { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case. |
| 411 | "dimensionName": "A String", # Name of a dimension. The name must refer back to a name in dimensions field of the request. |
| 412 | }, |
| 413 | }, |
| 414 | "name": "A String", # The name of the dimension. |
| 415 | }, |
| 416 | ], |
| 417 | "offset": "A String", # The row count of the start row. The first row is counted as row 0. |
| 418 | "metrics": [ # The metrics requested and displayed. |
| 419 | { # The quantitative measurements of a report. For example, the metric eventCount is the total number of events. Requests are allowed up to 10 metrics. |
| 420 | "name": "A String", # The name of the metric. |
| 421 | "expression": "A String", # A mathematical expression for derived metrics. For example, the metric Event count per user is eventCount/totalUsers. |
| 422 | "invisible": True or False, # Indicates if a metric is invisible. If a metric is invisible, the metric is not in the response, but can be used in filters, order_bys or being referred to in a metric expression. |
| 423 | }, |
| 424 | ], |
| 425 | "metricAggregations": [ # Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to "RESERVED_(MetricAggregation)". |
| 426 | "A String", |
| 427 | ], |
| 428 | "keepEmptyRows": 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. |
| 429 | "cohortSpec": { # Specification for a cohort report. # Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present. |
| 430 | "cohortsRange": { # Describes date range for a cohort report. # The data ranges of cohorts. |
| 431 | "endOffset": 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset. |
| 432 | "granularity": "A String", # Reporting date range for each cohort is calculated based on these three fields. |
| 433 | "startOffset": 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset. |
| 434 | }, |
| 435 | "cohorts": [ # The definition for the cohorts. |
| 436 | { # 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. |
| 437 | "dimension": "A String", # The dimension used by cohort. Only supports `firstTouchDate` for retention report. |
| 438 | "name": "A String", # 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. |
| 439 | "dateRange": { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges, and the union of the ranges can cover up to 1 year. # 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'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. |
| 440 | "name": "A String", # 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. |
| 441 | "endDate": "A String", # 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's reporting time zone. |
| 442 | "startDate": "A String", # 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's reporting time zone. |
| 443 | }, |
| 444 | }, |
| 445 | ], |
| 446 | "cohortReportSettings": { # Settings of a cohort report. # Settings of a cohort report. |
| 447 | "accumulate": True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`. |
| 448 | }, |
| 449 | }, |
| 450 | "orderBys": [ # Specifies how rows are ordered in the response. |
| 451 | { # The sort options. |
| 452 | "dimension": { # Sorts by dimension values. # Sorts results by a dimension's values. |
| 453 | "orderType": "A String", # Controls the rule for dimension value ordering. |
| 454 | "dimensionName": "A String", # A dimension name in the request to order by. |
| 455 | }, |
| 456 | "metric": { # Sorts by metric values. # Sorts results by a metric's values. |
| 457 | "metricName": "A String", # A metric name in the request to order by. |
| 458 | }, |
| 459 | "desc": True or False, # If true, sorts by descending order. |
| 460 | "pivot": { # Sorts by a pivot column group. # Sorts results by a metric's values within a pivot column group. |
| 461 | "pivotSelections": [ # 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's dimension name and value pair. |
| 462 | { # A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric's value. For example if pivots = {{"browser", "Chrome"}} and metric_name = "Sessions", 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 ---------|----------|----------------|----------|---------------- |
| 463 | "dimensionName": "A String", # Must be a dimension name from the request. |
| 464 | "dimensionValue": "A String", # Order by only when the named dimension is this value. |
| 465 | }, |
| 466 | ], |
| 467 | "metricName": "A String", # In the response to order by, order rows by this column. Must be a metric name from the request. |
| 468 | }, |
| 469 | }, |
| 470 | ], |
| 471 | "currencyCode": "A String", # A currency code in ISO4217 format, such as "AED", "USD", "JPY". If the field is empty, the report uses the entity's default currency. |
| 472 | "dateRanges": [ # 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. |
| 473 | { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges, and the union of the ranges can cover up to 1 year. |
| 474 | "name": "A String", # 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. |
| 475 | "endDate": "A String", # 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's reporting time zone. |
| 476 | "startDate": "A String", # 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's reporting time zone. |
| 477 | }, |
| 478 | ], |
| 479 | "metricFilter": { # 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. |
| 480 | "filter": { # 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. |
| 481 | "stringFilter": { # The filter for string # Strings related filter. |
| 482 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 483 | "matchType": "A String", # The match type for this filter. |
| 484 | "value": "A String", # The string value used for the matching. |
| 485 | }, |
| 486 | "inListFilter": { # The result needs to be in a list of string values. # A filter for in list values. |
| 487 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 488 | "values": [ # The list of string values. Must be non-empty. |
| 489 | "A String", |
| 490 | ], |
| 491 | }, |
| 492 | "betweenFilter": { # To express that the result needs to be between two numbers (inclusive). # A filter for two values. |
| 493 | "fromValue": { # To represent a number. # Begins with this number. |
| 494 | "doubleValue": 3.14, # Double value |
| 495 | "int64Value": "A String", # Integer value |
| 496 | }, |
| 497 | "toValue": { # To represent a number. # Ends with this number. |
| 498 | "doubleValue": 3.14, # Double value |
| 499 | "int64Value": "A String", # Integer value |
| 500 | }, |
| 501 | }, |
| 502 | "fieldName": "A String", # The dimension name or metric name. Must be a name defined in dimensions or metrics. |
| 503 | "numericFilter": { # Filters for numeric or date values. # A filter for numeric or date values. |
| 504 | "value": { # To represent a number. # A numeric value or a date value. |
| 505 | "doubleValue": 3.14, # Double value |
| 506 | "int64Value": "A String", # Integer value |
| 507 | }, |
| 508 | "operation": "A String", # The operation type for this filter. |
| 509 | }, |
| 510 | "nullFilter": True or False, # A filter for null values. |
| 511 | }, |
| 512 | "andGroup": { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship. |
| 513 | "expressions": [ # A list of filter expressions. |
| 514 | # Object with schema name: FilterExpression |
| 515 | ], |
| 516 | }, |
| 517 | "orGroup": { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship. |
| 518 | "expressions": [ # A list of filter expressions. |
| 519 | # Object with schema name: FilterExpression |
| 520 | ], |
| 521 | }, |
| 522 | "notExpression": # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression. |
| 523 | }, |
| 524 | "entity": { # 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. |
| 525 | "propertyId": "A String", # A Google Analytics App + Web property id. |
| 526 | }, |
| 527 | "returnPropertyQuota": True or False, # Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). |
| 528 | "dimensionFilter": { # 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. |
| 529 | "filter": { # 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. |
| 530 | "stringFilter": { # The filter for string # Strings related filter. |
| 531 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 532 | "matchType": "A String", # The match type for this filter. |
| 533 | "value": "A String", # The string value used for the matching. |
| 534 | }, |
| 535 | "inListFilter": { # The result needs to be in a list of string values. # A filter for in list values. |
| 536 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 537 | "values": [ # The list of string values. Must be non-empty. |
| 538 | "A String", |
| 539 | ], |
| 540 | }, |
| 541 | "betweenFilter": { # To express that the result needs to be between two numbers (inclusive). # A filter for two values. |
| 542 | "fromValue": { # To represent a number. # Begins with this number. |
| 543 | "doubleValue": 3.14, # Double value |
| 544 | "int64Value": "A String", # Integer value |
| 545 | }, |
| 546 | "toValue": { # To represent a number. # Ends with this number. |
| 547 | "doubleValue": 3.14, # Double value |
| 548 | "int64Value": "A String", # Integer value |
| 549 | }, |
| 550 | }, |
| 551 | "fieldName": "A String", # The dimension name or metric name. Must be a name defined in dimensions or metrics. |
| 552 | "numericFilter": { # Filters for numeric or date values. # A filter for numeric or date values. |
| 553 | "value": { # To represent a number. # A numeric value or a date value. |
| 554 | "doubleValue": 3.14, # Double value |
| 555 | "int64Value": "A String", # Integer value |
| 556 | }, |
| 557 | "operation": "A String", # The operation type for this filter. |
| 558 | }, |
| 559 | "nullFilter": True or False, # A filter for null values. |
| 560 | }, |
| 561 | "andGroup": { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship. |
| 562 | "expressions": [ # A list of filter expressions. |
| 563 | # Object with schema name: FilterExpression |
| 564 | ], |
| 565 | }, |
| 566 | "orGroup": { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship. |
| 567 | "expressions": [ # A list of filter expressions. |
| 568 | # Object with schema name: FilterExpression |
| 569 | ], |
| 570 | }, |
| 571 | "notExpression": # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression. |
| 572 | }, |
| 573 | "limit": "A String", # The number of rows to return. If unspecified, 10 rows are returned. If -1, all rows are returned. |
| 574 | }, |
| 575 | ], |
| 576 | "entity": { # 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. |
| 577 | "propertyId": "A String", # A Google Analytics App + Web property id. |
| 578 | }, |
| 579 | } |
| 580 | |
| 581 | x__xgafv: string, V1 error format. |
| 582 | Allowed values |
| 583 | 1 - v1 error format |
| 584 | 2 - v2 error format |
| 585 | |
| 586 | Returns: |
| 587 | An object of the form: |
| 588 | |
| 589 | { # The batch response containing multiple reports. |
| 590 | "reports": [ # Individual responses. Each response has a separate report request. |
| 591 | { # The response report table corresponding to a request. |
| 592 | "metricHeaders": [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows. |
| 593 | { # 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. |
| 594 | "type": "A String", # The metric's data type. |
| 595 | "name": "A String", # The metric's name. |
| 596 | }, |
| 597 | ], |
| 598 | "propertyQuota": { # 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's quota state including this request. |
| 599 | "serverErrorsPerProjectPerHour": { # Current state for a particular quota group. # Analytics Properties and cloud project pairs can have up to 10 server errors per hour. |
| 600 | "remaining": 42, # Quota remaining after this request. |
| 601 | "consumed": 42, # Quota consumed by this request. |
| 602 | }, |
| 603 | "concurrentRequests": { # Current state for a particular quota group. # Analytics Properties can send up to 10 concurrent requests. |
| 604 | "remaining": 42, # Quota remaining after this request. |
| 605 | "consumed": 42, # Quota consumed by this request. |
| 606 | }, |
| 607 | "tokensPerHour": { # Current state for a particular quota group. # Analytics Properties can use up to 5,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. |
| 608 | "remaining": 42, # Quota remaining after this request. |
| 609 | "consumed": 42, # Quota consumed by this request. |
| 610 | }, |
| 611 | "tokensPerDay": { # Current state for a particular quota group. # Analytics Properties can use up to 25,000 tokens per day. Most requests consume fewer than 10 tokens. |
| 612 | "remaining": 42, # Quota remaining after this request. |
| 613 | "consumed": 42, # Quota consumed by this request. |
| 614 | }, |
| 615 | }, |
| 616 | "dimensionHeaders": [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows. |
| 617 | { # 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. |
| 618 | "name": "A String", # The dimension's name. |
| 619 | }, |
| 620 | ], |
| 621 | "maximums": [ # If requested, the maximum values of metrics. |
| 622 | { # Report data for each row. For example if RunReportRequest contains: ```none dimensions { name: "eventName" } dimensions { name: "countryId" } metrics { name: "eventCount" } ``` One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and 15 as the eventCount, would be: ```none dimension_values { name: 'in_app_purchase' name: 'us' } metric_values { int64_value: 15 } ``` |
| 623 | "metricValues": [ # List of requested visible metric values. |
| 624 | { # The value of a metric. |
| 625 | "value": "A String", # Measurement value. See MetricHeader for type. |
| 626 | }, |
| 627 | ], |
| 628 | "dimensionValues": [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. |
| 629 | { # The value of a dimension. |
| 630 | "value": "A String", # Value as a string if the dimension type is a string. |
| 631 | }, |
| 632 | ], |
| 633 | }, |
| 634 | ], |
| 635 | "rows": [ # Rows of dimension value combinations and metric values in the report. |
| 636 | { # Report data for each row. For example if RunReportRequest contains: ```none dimensions { name: "eventName" } dimensions { name: "countryId" } metrics { name: "eventCount" } ``` One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and 15 as the eventCount, would be: ```none dimension_values { name: 'in_app_purchase' name: 'us' } metric_values { int64_value: 15 } ``` |
| 637 | "metricValues": [ # List of requested visible metric values. |
| 638 | { # The value of a metric. |
| 639 | "value": "A String", # Measurement value. See MetricHeader for type. |
| 640 | }, |
| 641 | ], |
| 642 | "dimensionValues": [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. |
| 643 | { # The value of a dimension. |
| 644 | "value": "A String", # Value as a string if the dimension type is a string. |
| 645 | }, |
| 646 | ], |
| 647 | }, |
| 648 | ], |
| 649 | "minimums": [ # If requested, the minimum values of metrics. |
| 650 | { # Report data for each row. For example if RunReportRequest contains: ```none dimensions { name: "eventName" } dimensions { name: "countryId" } metrics { name: "eventCount" } ``` One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and 15 as the eventCount, would be: ```none dimension_values { name: 'in_app_purchase' name: 'us' } metric_values { int64_value: 15 } ``` |
| 651 | "metricValues": [ # List of requested visible metric values. |
| 652 | { # The value of a metric. |
| 653 | "value": "A String", # Measurement value. See MetricHeader for type. |
| 654 | }, |
| 655 | ], |
| 656 | "dimensionValues": [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. |
| 657 | { # The value of a dimension. |
| 658 | "value": "A String", # Value as a string if the dimension type is a string. |
| 659 | }, |
| 660 | ], |
| 661 | }, |
| 662 | ], |
| 663 | "metadata": { # Response's metadata carrying additional information about the report content. # Metadata for the report. |
| 664 | "dataLossFromOtherRow": True or False, # If true, indicates some buckets of dimension combinations are rolled into "(other)" row. This can happen for high cardinality reports. |
| 665 | }, |
| 666 | "totals": [ # If requested, the totaled values of metrics. |
| 667 | { # Report data for each row. For example if RunReportRequest contains: ```none dimensions { name: "eventName" } dimensions { name: "countryId" } metrics { name: "eventCount" } ``` One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and 15 as the eventCount, would be: ```none dimension_values { name: 'in_app_purchase' name: 'us' } metric_values { int64_value: 15 } ``` |
| 668 | "metricValues": [ # List of requested visible metric values. |
| 669 | { # The value of a metric. |
| 670 | "value": "A String", # Measurement value. See MetricHeader for type. |
| 671 | }, |
| 672 | ], |
| 673 | "dimensionValues": [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. |
| 674 | { # The value of a dimension. |
| 675 | "value": "A String", # Value as a string if the dimension type is a string. |
| 676 | }, |
| 677 | ], |
| 678 | }, |
| 679 | ], |
| 680 | "rowCount": 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. |
| 681 | }, |
| 682 | ], |
| 683 | }</pre> |
| 684 | </div> |
| 685 | |
| 686 | <div class="method"> |
| 687 | <code class="details" id="close">close()</code> |
| 688 | <pre>Close httplib2 connections.</pre> |
| 689 | </div> |
| 690 | |
| 691 | <div class="method"> |
| 692 | <code class="details" id="getUniversalMetadata">getUniversalMetadata(x__xgafv=None)</code> |
| 693 | <pre>Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. Dimensions and metrics will be mostly added over time, but renames and deletions may occur. This method returns Universal Metadata. Universal Metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`. |
| 694 | |
| 695 | Args: |
| 696 | x__xgafv: string, V1 error format. |
| 697 | Allowed values |
| 698 | 1 - v1 error format |
| 699 | 2 - v2 error format |
| 700 | |
| 701 | Returns: |
| 702 | An object of the form: |
| 703 | |
| 704 | { # The dimensions and metrics currently accepted in reporting methods. |
| 705 | "metrics": [ # The metric descriptions. |
| 706 | { # Explains a metric. |
| 707 | "apiName": "A String", # A metric name. Useable in [Metric](#Metric)'s `name`. For example, `eventCount`. |
| 708 | "uiName": "A String", # This metric's name within the Google Analytics user interface. For example, `Event count`. |
| 709 | "description": "A String", # Description of how this metric is used and calculated. |
| 710 | "expression": "A String", # The mathematical expression for this derived metric. Can be used in [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics are not expressions, and for non-expressions, this field is empty. |
| 711 | "type": "A String", # The type of this metric. |
| 712 | "deprecatedApiNames": [ # Still usable but deprecated names for this metric. If populated, this metric is available by either `apiName` or one of `deprecatedApiNames` for a period of time. After the deprecation period, the metric will be available only by `apiName`. |
| 713 | "A String", |
| 714 | ], |
| 715 | }, |
| 716 | ], |
| 717 | "dimensions": [ # The dimensions descriptions. |
| 718 | { # Explains a dimension. |
| 719 | "apiName": "A String", # This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For example, `eventName`. |
| 720 | "deprecatedApiNames": [ # Still usable but deprecated names for this dimension. If populated, this dimension is available by either `apiName` or one of `deprecatedApiNames` for a period of time. After the deprecation period, the dimension will be available only by `apiName`. |
| 721 | "A String", |
| 722 | ], |
| 723 | "uiName": "A String", # This dimension's name within the Google Analytics user interface. For example, `Event name`. |
| 724 | "description": "A String", # Description of how this dimension is used and calculated. |
| 725 | }, |
| 726 | ], |
| 727 | }</pre> |
| 728 | </div> |
| 729 | |
| 730 | <div class="method"> |
| 731 | <code class="details" id="runPivotReport">runPivotReport(body=None, x__xgafv=None)</code> |
| 732 | <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. |
| 733 | |
| 734 | Args: |
| 735 | body: object, The request body. |
| 736 | The object takes the form of: |
| 737 | |
| 738 | { # The request to generate a pivot report. |
| 739 | "keepEmptyRows": 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. |
| 740 | "entity": { # 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. |
| 741 | "propertyId": "A String", # A Google Analytics App + Web property id. |
| 742 | }, |
| 743 | "pivots": [ # Describes the visual format of the report'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. |
| 744 | { # Describes the visible dimension columns and rows in the report response. |
| 745 | "limit": "A String", # The number of rows to return in this pivot. If unspecified, 10 rows are returned. If -1, all rows are returned. |
| 746 | "metricAggregations": [ # Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations. |
| 747 | "A String", |
| 748 | ], |
| 749 | "fieldNames": [ # Dimension names for visible columns in the report response. Including "dateRange" 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. |
| 750 | "A String", |
| 751 | ], |
| 752 | "orderBys": [ # 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. |
| 753 | { # The sort options. |
| 754 | "dimension": { # Sorts by dimension values. # Sorts results by a dimension's values. |
| 755 | "orderType": "A String", # Controls the rule for dimension value ordering. |
| 756 | "dimensionName": "A String", # A dimension name in the request to order by. |
| 757 | }, |
| 758 | "metric": { # Sorts by metric values. # Sorts results by a metric's values. |
| 759 | "metricName": "A String", # A metric name in the request to order by. |
| 760 | }, |
| 761 | "desc": True or False, # If true, sorts by descending order. |
| 762 | "pivot": { # Sorts by a pivot column group. # Sorts results by a metric's values within a pivot column group. |
| 763 | "pivotSelections": [ # 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's dimension name and value pair. |
| 764 | { # A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric's value. For example if pivots = {{"browser", "Chrome"}} and metric_name = "Sessions", 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 ---------|----------|----------------|----------|---------------- |
| 765 | "dimensionName": "A String", # Must be a dimension name from the request. |
| 766 | "dimensionValue": "A String", # Order by only when the named dimension is this value. |
| 767 | }, |
| 768 | ], |
| 769 | "metricName": "A String", # In the response to order by, order rows by this column. Must be a metric name from the request. |
| 770 | }, |
| 771 | }, |
| 772 | ], |
| 773 | "offset": "A String", # The row count of the start row. The first row is counted as row 0. |
| 774 | }, |
| 775 | ], |
| 776 | "cohortSpec": { # Specification for a cohort report. # Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present. |
| 777 | "cohortsRange": { # Describes date range for a cohort report. # The data ranges of cohorts. |
| 778 | "endOffset": 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset. |
| 779 | "granularity": "A String", # Reporting date range for each cohort is calculated based on these three fields. |
| 780 | "startOffset": 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset. |
| 781 | }, |
| 782 | "cohorts": [ # The definition for the cohorts. |
| 783 | { # 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. |
| 784 | "dimension": "A String", # The dimension used by cohort. Only supports `firstTouchDate` for retention report. |
| 785 | "name": "A String", # 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. |
| 786 | "dateRange": { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges, and the union of the ranges can cover up to 1 year. # 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'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. |
| 787 | "name": "A String", # 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. |
| 788 | "endDate": "A String", # 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's reporting time zone. |
| 789 | "startDate": "A String", # 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's reporting time zone. |
| 790 | }, |
| 791 | }, |
| 792 | ], |
| 793 | "cohortReportSettings": { # Settings of a cohort report. # Settings of a cohort report. |
| 794 | "accumulate": True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`. |
| 795 | }, |
| 796 | }, |
| 797 | "metrics": [ # 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. |
| 798 | { # The quantitative measurements of a report. For example, the metric eventCount is the total number of events. Requests are allowed up to 10 metrics. |
| 799 | "name": "A String", # The name of the metric. |
| 800 | "expression": "A String", # A mathematical expression for derived metrics. For example, the metric Event count per user is eventCount/totalUsers. |
| 801 | "invisible": True or False, # Indicates if a metric is invisible. If a metric is invisible, the metric is not in the response, but can be used in filters, order_bys or being referred to in a metric expression. |
| 802 | }, |
| 803 | ], |
| 804 | "returnPropertyQuota": True or False, # Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). |
| 805 | "metricFilter": { # 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. |
| 806 | "filter": { # 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. |
| 807 | "stringFilter": { # The filter for string # Strings related filter. |
| 808 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 809 | "matchType": "A String", # The match type for this filter. |
| 810 | "value": "A String", # The string value used for the matching. |
| 811 | }, |
| 812 | "inListFilter": { # The result needs to be in a list of string values. # A filter for in list values. |
| 813 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 814 | "values": [ # The list of string values. Must be non-empty. |
| 815 | "A String", |
| 816 | ], |
| 817 | }, |
| 818 | "betweenFilter": { # To express that the result needs to be between two numbers (inclusive). # A filter for two values. |
| 819 | "fromValue": { # To represent a number. # Begins with this number. |
| 820 | "doubleValue": 3.14, # Double value |
| 821 | "int64Value": "A String", # Integer value |
| 822 | }, |
| 823 | "toValue": { # To represent a number. # Ends with this number. |
| 824 | "doubleValue": 3.14, # Double value |
| 825 | "int64Value": "A String", # Integer value |
| 826 | }, |
| 827 | }, |
| 828 | "fieldName": "A String", # The dimension name or metric name. Must be a name defined in dimensions or metrics. |
| 829 | "numericFilter": { # Filters for numeric or date values. # A filter for numeric or date values. |
| 830 | "value": { # To represent a number. # A numeric value or a date value. |
| 831 | "doubleValue": 3.14, # Double value |
| 832 | "int64Value": "A String", # Integer value |
| 833 | }, |
| 834 | "operation": "A String", # The operation type for this filter. |
| 835 | }, |
| 836 | "nullFilter": True or False, # A filter for null values. |
| 837 | }, |
| 838 | "andGroup": { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship. |
| 839 | "expressions": [ # A list of filter expressions. |
| 840 | # Object with schema name: FilterExpression |
| 841 | ], |
| 842 | }, |
| 843 | "orGroup": { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship. |
| 844 | "expressions": [ # A list of filter expressions. |
| 845 | # Object with schema name: FilterExpression |
| 846 | ], |
| 847 | }, |
| 848 | "notExpression": # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression. |
| 849 | }, |
| 850 | "dateRanges": [ # 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 "dateRange" can be included in a Pivot's field names; if included, the report compares between date ranges. In a cohort request, this `dateRanges` must be unspecified. |
| 851 | { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges, and the union of the ranges can cover up to 1 year. |
| 852 | "name": "A String", # 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. |
| 853 | "endDate": "A String", # 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's reporting time zone. |
| 854 | "startDate": "A String", # 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's reporting time zone. |
| 855 | }, |
| 856 | ], |
| 857 | "currencyCode": "A String", # A currency code in ISO4217 format, such as "AED", "USD", "JPY". If the field is empty, the report uses the entity's default currency. |
| 858 | "dimensions": [ # The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys. |
| 859 | { # Dimensions are attributes of your data. For example, the dimension City indicates the city, for example, "Paris" or "New York", from which an event originates. Requests are allowed up to 8 dimensions. |
| 860 | "dimensionExpression": { # 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 "country, city": concatenate(country, ", ", city). |
| 861 | "upperCase": { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case. |
| 862 | "dimensionName": "A String", # Name of a dimension. The name must refer back to a name in dimensions field of the request. |
| 863 | }, |
| 864 | "concatenate": { # Used to combine dimension values to a single dimension. # Used to combine dimension values to a single dimension. For example, dimension "country, city": concatenate(country, ", ", city). |
| 865 | "delimiter": "A String", # The delimiter placed between dimension names. Delimiters are often single characters such as "|" or "," 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 = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the response will contain "US,FR,JP". |
| 866 | "dimensionNames": [ # Names of dimensions. The names must refer back to names in the dimensions field of the request. |
| 867 | "A String", |
| 868 | ], |
| 869 | }, |
| 870 | "lowerCase": { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case. |
| 871 | "dimensionName": "A String", # Name of a dimension. The name must refer back to a name in dimensions field of the request. |
| 872 | }, |
| 873 | }, |
| 874 | "name": "A String", # The name of the dimension. |
| 875 | }, |
| 876 | ], |
| 877 | "dimensionFilter": { # 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. |
| 878 | "filter": { # 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. |
| 879 | "stringFilter": { # The filter for string # Strings related filter. |
| 880 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 881 | "matchType": "A String", # The match type for this filter. |
| 882 | "value": "A String", # The string value used for the matching. |
| 883 | }, |
| 884 | "inListFilter": { # The result needs to be in a list of string values. # A filter for in list values. |
| 885 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 886 | "values": [ # The list of string values. Must be non-empty. |
| 887 | "A String", |
| 888 | ], |
| 889 | }, |
| 890 | "betweenFilter": { # To express that the result needs to be between two numbers (inclusive). # A filter for two values. |
| 891 | "fromValue": { # To represent a number. # Begins with this number. |
| 892 | "doubleValue": 3.14, # Double value |
| 893 | "int64Value": "A String", # Integer value |
| 894 | }, |
| 895 | "toValue": { # To represent a number. # Ends with this number. |
| 896 | "doubleValue": 3.14, # Double value |
| 897 | "int64Value": "A String", # Integer value |
| 898 | }, |
| 899 | }, |
| 900 | "fieldName": "A String", # The dimension name or metric name. Must be a name defined in dimensions or metrics. |
| 901 | "numericFilter": { # Filters for numeric or date values. # A filter for numeric or date values. |
| 902 | "value": { # To represent a number. # A numeric value or a date value. |
| 903 | "doubleValue": 3.14, # Double value |
| 904 | "int64Value": "A String", # Integer value |
| 905 | }, |
| 906 | "operation": "A String", # The operation type for this filter. |
| 907 | }, |
| 908 | "nullFilter": True or False, # A filter for null values. |
| 909 | }, |
| 910 | "andGroup": { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship. |
| 911 | "expressions": [ # A list of filter expressions. |
| 912 | # Object with schema name: FilterExpression |
| 913 | ], |
| 914 | }, |
| 915 | "orGroup": { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship. |
| 916 | "expressions": [ # A list of filter expressions. |
| 917 | # Object with schema name: FilterExpression |
| 918 | ], |
| 919 | }, |
| 920 | "notExpression": # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression. |
| 921 | }, |
| 922 | } |
| 923 | |
| 924 | x__xgafv: string, V1 error format. |
| 925 | Allowed values |
| 926 | 1 - v1 error format |
| 927 | 2 - v2 error format |
| 928 | |
| 929 | Returns: |
| 930 | An object of the form: |
| 931 | |
| 932 | { # The response pivot report table corresponding to a pivot request. |
| 933 | "dimensionHeaders": [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows. |
| 934 | { # 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. |
| 935 | "name": "A String", # The dimension's name. |
| 936 | }, |
| 937 | ], |
| 938 | "rows": [ # Rows of dimension value combinations and metric values in the report. |
| 939 | { # Report data for each row. For example if RunReportRequest contains: ```none dimensions { name: "eventName" } dimensions { name: "countryId" } metrics { name: "eventCount" } ``` One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and 15 as the eventCount, would be: ```none dimension_values { name: 'in_app_purchase' name: 'us' } metric_values { int64_value: 15 } ``` |
| 940 | "metricValues": [ # List of requested visible metric values. |
| 941 | { # The value of a metric. |
| 942 | "value": "A String", # Measurement value. See MetricHeader for type. |
| 943 | }, |
| 944 | ], |
| 945 | "dimensionValues": [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. |
| 946 | { # The value of a dimension. |
| 947 | "value": "A String", # Value as a string if the dimension type is a string. |
| 948 | }, |
| 949 | ], |
| 950 | }, |
| 951 | ], |
| 952 | "aggregates": [ # 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 "RESERVED_". |
| 953 | { # Report data for each row. For example if RunReportRequest contains: ```none dimensions { name: "eventName" } dimensions { name: "countryId" } metrics { name: "eventCount" } ``` One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and 15 as the eventCount, would be: ```none dimension_values { name: 'in_app_purchase' name: 'us' } metric_values { int64_value: 15 } ``` |
| 954 | "metricValues": [ # List of requested visible metric values. |
| 955 | { # The value of a metric. |
| 956 | "value": "A String", # Measurement value. See MetricHeader for type. |
| 957 | }, |
| 958 | ], |
| 959 | "dimensionValues": [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. |
| 960 | { # The value of a dimension. |
| 961 | "value": "A String", # Value as a string if the dimension type is a string. |
| 962 | }, |
| 963 | ], |
| 964 | }, |
| 965 | ], |
| 966 | "pivotHeaders": [ # 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: "pivots": [{ "fieldNames": ["country", "city"] }, { "fieldNames": "eventName" }] We will have the following `pivotHeaders` in the response: "pivotHeaders" : [{ "dimensionHeaders": [{ "dimensionValues": [ { "value": "United Kingdom" }, { "value": "London" } ] }, { "dimensionValues": [ { "value": "Japan" }, { "value": "Osaka" } ] }] }, { "dimensionHeaders": [{ "dimensionValues": [{ "value": "session_start" }] }, { "dimensionValues": [{ "value": "scroll" }] }] }] |
| 967 | { # Dimensions' values in a single pivot. |
| 968 | "rowCount": 42, # The cardinality of the pivot as if offset = 0 and limit = -1. The total number of rows for this pivot's fields regardless of how the parameters offset and limit are specified in the request. |
| 969 | "pivotDimensionHeaders": [ # The size is the same as the cardinality of the corresponding dimension combinations. |
| 970 | { # Summarizes dimension values from a row for this pivot. |
| 971 | "dimensionValues": [ # Values of multiple dimensions in a pivot. |
| 972 | { # The value of a dimension. |
| 973 | "value": "A String", # Value as a string if the dimension type is a string. |
| 974 | }, |
| 975 | ], |
| 976 | }, |
| 977 | ], |
| 978 | }, |
| 979 | ], |
| 980 | "propertyQuota": { # 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's quota state including this request. |
| 981 | "serverErrorsPerProjectPerHour": { # Current state for a particular quota group. # Analytics Properties and cloud project pairs can have up to 10 server errors per hour. |
| 982 | "remaining": 42, # Quota remaining after this request. |
| 983 | "consumed": 42, # Quota consumed by this request. |
| 984 | }, |
| 985 | "concurrentRequests": { # Current state for a particular quota group. # Analytics Properties can send up to 10 concurrent requests. |
| 986 | "remaining": 42, # Quota remaining after this request. |
| 987 | "consumed": 42, # Quota consumed by this request. |
| 988 | }, |
| 989 | "tokensPerHour": { # Current state for a particular quota group. # Analytics Properties can use up to 5,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. |
| 990 | "remaining": 42, # Quota remaining after this request. |
| 991 | "consumed": 42, # Quota consumed by this request. |
| 992 | }, |
| 993 | "tokensPerDay": { # Current state for a particular quota group. # Analytics Properties can use up to 25,000 tokens per day. Most requests consume fewer than 10 tokens. |
| 994 | "remaining": 42, # Quota remaining after this request. |
| 995 | "consumed": 42, # Quota consumed by this request. |
| 996 | }, |
| 997 | }, |
| 998 | "metadata": { # Response's metadata carrying additional information about the report content. # Metadata for the report. |
| 999 | "dataLossFromOtherRow": True or False, # If true, indicates some buckets of dimension combinations are rolled into "(other)" row. This can happen for high cardinality reports. |
| 1000 | }, |
| 1001 | "metricHeaders": [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows. |
| 1002 | { # 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. |
| 1003 | "type": "A String", # The metric's data type. |
| 1004 | "name": "A String", # The metric's name. |
| 1005 | }, |
| 1006 | ], |
| 1007 | }</pre> |
| 1008 | </div> |
| 1009 | |
| 1010 | <div class="method"> |
| 1011 | <code class="details" id="runReport">runReport(body=None, x__xgafv=None)</code> |
| 1012 | <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. |
| 1013 | |
| 1014 | Args: |
| 1015 | body: object, The request body. |
| 1016 | The object takes the form of: |
| 1017 | |
| 1018 | { # The request to generate a report. |
| 1019 | "dimensions": [ # The dimensions requested and displayed. |
| 1020 | { # Dimensions are attributes of your data. For example, the dimension City indicates the city, for example, "Paris" or "New York", from which an event originates. Requests are allowed up to 8 dimensions. |
| 1021 | "dimensionExpression": { # 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 "country, city": concatenate(country, ", ", city). |
| 1022 | "upperCase": { # Used to convert a dimension value to a single case. # Used to convert a dimension value to upper case. |
| 1023 | "dimensionName": "A String", # Name of a dimension. The name must refer back to a name in dimensions field of the request. |
| 1024 | }, |
| 1025 | "concatenate": { # Used to combine dimension values to a single dimension. # Used to combine dimension values to a single dimension. For example, dimension "country, city": concatenate(country, ", ", city). |
| 1026 | "delimiter": "A String", # The delimiter placed between dimension names. Delimiters are often single characters such as "|" or "," 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 = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the response will contain "US,FR,JP". |
| 1027 | "dimensionNames": [ # Names of dimensions. The names must refer back to names in the dimensions field of the request. |
| 1028 | "A String", |
| 1029 | ], |
| 1030 | }, |
| 1031 | "lowerCase": { # Used to convert a dimension value to a single case. # Used to convert a dimension value to lower case. |
| 1032 | "dimensionName": "A String", # Name of a dimension. The name must refer back to a name in dimensions field of the request. |
| 1033 | }, |
| 1034 | }, |
| 1035 | "name": "A String", # The name of the dimension. |
| 1036 | }, |
| 1037 | ], |
| 1038 | "offset": "A String", # The row count of the start row. The first row is counted as row 0. |
| 1039 | "metrics": [ # The metrics requested and displayed. |
| 1040 | { # The quantitative measurements of a report. For example, the metric eventCount is the total number of events. Requests are allowed up to 10 metrics. |
| 1041 | "name": "A String", # The name of the metric. |
| 1042 | "expression": "A String", # A mathematical expression for derived metrics. For example, the metric Event count per user is eventCount/totalUsers. |
| 1043 | "invisible": True or False, # Indicates if a metric is invisible. If a metric is invisible, the metric is not in the response, but can be used in filters, order_bys or being referred to in a metric expression. |
| 1044 | }, |
| 1045 | ], |
| 1046 | "metricAggregations": [ # Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to "RESERVED_(MetricAggregation)". |
| 1047 | "A String", |
| 1048 | ], |
| 1049 | "keepEmptyRows": 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. |
| 1050 | "cohortSpec": { # Specification for a cohort report. # Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present. |
| 1051 | "cohortsRange": { # Describes date range for a cohort report. # The data ranges of cohorts. |
| 1052 | "endOffset": 42, # For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset. |
| 1053 | "granularity": "A String", # Reporting date range for each cohort is calculated based on these three fields. |
| 1054 | "startOffset": 42, # For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset. |
| 1055 | }, |
| 1056 | "cohorts": [ # The definition for the cohorts. |
| 1057 | { # 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. |
| 1058 | "dimension": "A String", # The dimension used by cohort. Only supports `firstTouchDate` for retention report. |
| 1059 | "name": "A String", # 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. |
| 1060 | "dateRange": { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges, and the union of the ranges can cover up to 1 year. # 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'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. |
| 1061 | "name": "A String", # 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. |
| 1062 | "endDate": "A String", # 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's reporting time zone. |
| 1063 | "startDate": "A String", # 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's reporting time zone. |
| 1064 | }, |
| 1065 | }, |
| 1066 | ], |
| 1067 | "cohortReportSettings": { # Settings of a cohort report. # Settings of a cohort report. |
| 1068 | "accumulate": True or False, # If true, accumulates the result from first visit day to the end day. Not supported in `RunReportRequest`. |
| 1069 | }, |
| 1070 | }, |
| 1071 | "orderBys": [ # Specifies how rows are ordered in the response. |
| 1072 | { # The sort options. |
| 1073 | "dimension": { # Sorts by dimension values. # Sorts results by a dimension's values. |
| 1074 | "orderType": "A String", # Controls the rule for dimension value ordering. |
| 1075 | "dimensionName": "A String", # A dimension name in the request to order by. |
| 1076 | }, |
| 1077 | "metric": { # Sorts by metric values. # Sorts results by a metric's values. |
| 1078 | "metricName": "A String", # A metric name in the request to order by. |
| 1079 | }, |
| 1080 | "desc": True or False, # If true, sorts by descending order. |
| 1081 | "pivot": { # Sorts by a pivot column group. # Sorts results by a metric's values within a pivot column group. |
| 1082 | "pivotSelections": [ # 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's dimension name and value pair. |
| 1083 | { # A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric's value. For example if pivots = {{"browser", "Chrome"}} and metric_name = "Sessions", 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 ---------|----------|----------------|----------|---------------- |
| 1084 | "dimensionName": "A String", # Must be a dimension name from the request. |
| 1085 | "dimensionValue": "A String", # Order by only when the named dimension is this value. |
| 1086 | }, |
| 1087 | ], |
| 1088 | "metricName": "A String", # In the response to order by, order rows by this column. Must be a metric name from the request. |
| 1089 | }, |
| 1090 | }, |
| 1091 | ], |
| 1092 | "currencyCode": "A String", # A currency code in ISO4217 format, such as "AED", "USD", "JPY". If the field is empty, the report uses the entity's default currency. |
| 1093 | "dateRanges": [ # 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. |
| 1094 | { # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges, and the union of the ranges can cover up to 1 year. |
| 1095 | "name": "A String", # 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. |
| 1096 | "endDate": "A String", # 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's reporting time zone. |
| 1097 | "startDate": "A String", # 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's reporting time zone. |
| 1098 | }, |
| 1099 | ], |
| 1100 | "metricFilter": { # 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. |
| 1101 | "filter": { # 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. |
| 1102 | "stringFilter": { # The filter for string # Strings related filter. |
| 1103 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 1104 | "matchType": "A String", # The match type for this filter. |
| 1105 | "value": "A String", # The string value used for the matching. |
| 1106 | }, |
| 1107 | "inListFilter": { # The result needs to be in a list of string values. # A filter for in list values. |
| 1108 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 1109 | "values": [ # The list of string values. Must be non-empty. |
| 1110 | "A String", |
| 1111 | ], |
| 1112 | }, |
| 1113 | "betweenFilter": { # To express that the result needs to be between two numbers (inclusive). # A filter for two values. |
| 1114 | "fromValue": { # To represent a number. # Begins with this number. |
| 1115 | "doubleValue": 3.14, # Double value |
| 1116 | "int64Value": "A String", # Integer value |
| 1117 | }, |
| 1118 | "toValue": { # To represent a number. # Ends with this number. |
| 1119 | "doubleValue": 3.14, # Double value |
| 1120 | "int64Value": "A String", # Integer value |
| 1121 | }, |
| 1122 | }, |
| 1123 | "fieldName": "A String", # The dimension name or metric name. Must be a name defined in dimensions or metrics. |
| 1124 | "numericFilter": { # Filters for numeric or date values. # A filter for numeric or date values. |
| 1125 | "value": { # To represent a number. # A numeric value or a date value. |
| 1126 | "doubleValue": 3.14, # Double value |
| 1127 | "int64Value": "A String", # Integer value |
| 1128 | }, |
| 1129 | "operation": "A String", # The operation type for this filter. |
| 1130 | }, |
| 1131 | "nullFilter": True or False, # A filter for null values. |
| 1132 | }, |
| 1133 | "andGroup": { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship. |
| 1134 | "expressions": [ # A list of filter expressions. |
| 1135 | # Object with schema name: FilterExpression |
| 1136 | ], |
| 1137 | }, |
| 1138 | "orGroup": { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship. |
| 1139 | "expressions": [ # A list of filter expressions. |
| 1140 | # Object with schema name: FilterExpression |
| 1141 | ], |
| 1142 | }, |
| 1143 | "notExpression": # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression. |
| 1144 | }, |
| 1145 | "entity": { # 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. |
| 1146 | "propertyId": "A String", # A Google Analytics App + Web property id. |
| 1147 | }, |
| 1148 | "returnPropertyQuota": True or False, # Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). |
| 1149 | "dimensionFilter": { # 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. |
| 1150 | "filter": { # 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. |
| 1151 | "stringFilter": { # The filter for string # Strings related filter. |
| 1152 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 1153 | "matchType": "A String", # The match type for this filter. |
| 1154 | "value": "A String", # The string value used for the matching. |
| 1155 | }, |
| 1156 | "inListFilter": { # The result needs to be in a list of string values. # A filter for in list values. |
| 1157 | "caseSensitive": True or False, # If true, the string value is case sensitive. |
| 1158 | "values": [ # The list of string values. Must be non-empty. |
| 1159 | "A String", |
| 1160 | ], |
| 1161 | }, |
| 1162 | "betweenFilter": { # To express that the result needs to be between two numbers (inclusive). # A filter for two values. |
| 1163 | "fromValue": { # To represent a number. # Begins with this number. |
| 1164 | "doubleValue": 3.14, # Double value |
| 1165 | "int64Value": "A String", # Integer value |
| 1166 | }, |
| 1167 | "toValue": { # To represent a number. # Ends with this number. |
| 1168 | "doubleValue": 3.14, # Double value |
| 1169 | "int64Value": "A String", # Integer value |
| 1170 | }, |
| 1171 | }, |
| 1172 | "fieldName": "A String", # The dimension name or metric name. Must be a name defined in dimensions or metrics. |
| 1173 | "numericFilter": { # Filters for numeric or date values. # A filter for numeric or date values. |
| 1174 | "value": { # To represent a number. # A numeric value or a date value. |
| 1175 | "doubleValue": 3.14, # Double value |
| 1176 | "int64Value": "A String", # Integer value |
| 1177 | }, |
| 1178 | "operation": "A String", # The operation type for this filter. |
| 1179 | }, |
| 1180 | "nullFilter": True or False, # A filter for null values. |
| 1181 | }, |
| 1182 | "andGroup": { # A list of filter expressions. # The FilterExpressions in and_group have an AND relationship. |
| 1183 | "expressions": [ # A list of filter expressions. |
| 1184 | # Object with schema name: FilterExpression |
| 1185 | ], |
| 1186 | }, |
| 1187 | "orGroup": { # A list of filter expressions. # The FilterExpressions in or_group have an OR relationship. |
| 1188 | "expressions": [ # A list of filter expressions. |
| 1189 | # Object with schema name: FilterExpression |
| 1190 | ], |
| 1191 | }, |
| 1192 | "notExpression": # Object with schema name: FilterExpression # The FilterExpression is NOT of not_expression. |
| 1193 | }, |
| 1194 | "limit": "A String", # The number of rows to return. If unspecified, 10 rows are returned. If -1, all rows are returned. |
| 1195 | } |
| 1196 | |
| 1197 | x__xgafv: string, V1 error format. |
| 1198 | Allowed values |
| 1199 | 1 - v1 error format |
| 1200 | 2 - v2 error format |
| 1201 | |
| 1202 | Returns: |
| 1203 | An object of the form: |
| 1204 | |
| 1205 | { # The response report table corresponding to a request. |
| 1206 | "metricHeaders": [ # Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows. |
| 1207 | { # 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. |
| 1208 | "type": "A String", # The metric's data type. |
| 1209 | "name": "A String", # The metric's name. |
| 1210 | }, |
| 1211 | ], |
| 1212 | "propertyQuota": { # 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's quota state including this request. |
| 1213 | "serverErrorsPerProjectPerHour": { # Current state for a particular quota group. # Analytics Properties and cloud project pairs can have up to 10 server errors per hour. |
| 1214 | "remaining": 42, # Quota remaining after this request. |
| 1215 | "consumed": 42, # Quota consumed by this request. |
| 1216 | }, |
| 1217 | "concurrentRequests": { # Current state for a particular quota group. # Analytics Properties can send up to 10 concurrent requests. |
| 1218 | "remaining": 42, # Quota remaining after this request. |
| 1219 | "consumed": 42, # Quota consumed by this request. |
| 1220 | }, |
| 1221 | "tokensPerHour": { # Current state for a particular quota group. # Analytics Properties can use up to 5,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. |
| 1222 | "remaining": 42, # Quota remaining after this request. |
| 1223 | "consumed": 42, # Quota consumed by this request. |
| 1224 | }, |
| 1225 | "tokensPerDay": { # Current state for a particular quota group. # Analytics Properties can use up to 25,000 tokens per day. Most requests consume fewer than 10 tokens. |
| 1226 | "remaining": 42, # Quota remaining after this request. |
| 1227 | "consumed": 42, # Quota consumed by this request. |
| 1228 | }, |
| 1229 | }, |
| 1230 | "dimensionHeaders": [ # Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows. |
| 1231 | { # Describes a dimension column in the report. Dimensions requested in a report produce column entries within rows and DimensionHeaders. However, dimensions used exclusively within filters or expressions do not produce columns in a report; correspondingly, those dimensions do not produce headers. |
| 1232 | "name": "A String", # The dimension's name. |
| 1233 | }, |
| 1234 | ], |
| 1235 | "maximums": [ # If requested, the maximum values of metrics. |
| 1236 | { # Report data for each row. For example if RunReportRequest contains: ```none dimensions { name: "eventName" } dimensions { name: "countryId" } metrics { name: "eventCount" } ``` One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and 15 as the eventCount, would be: ```none dimension_values { name: 'in_app_purchase' name: 'us' } metric_values { int64_value: 15 } ``` |
| 1237 | "metricValues": [ # List of requested visible metric values. |
| 1238 | { # The value of a metric. |
| 1239 | "value": "A String", # Measurement value. See MetricHeader for type. |
| 1240 | }, |
| 1241 | ], |
| 1242 | "dimensionValues": [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. |
| 1243 | { # The value of a dimension. |
| 1244 | "value": "A String", # Value as a string if the dimension type is a string. |
| 1245 | }, |
| 1246 | ], |
| 1247 | }, |
| 1248 | ], |
| 1249 | "rows": [ # Rows of dimension value combinations and metric values in the report. |
| 1250 | { # Report data for each row. For example if RunReportRequest contains: ```none dimensions { name: "eventName" } dimensions { name: "countryId" } metrics { name: "eventCount" } ``` One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and 15 as the eventCount, would be: ```none dimension_values { name: 'in_app_purchase' name: 'us' } metric_values { int64_value: 15 } ``` |
| 1251 | "metricValues": [ # List of requested visible metric values. |
| 1252 | { # The value of a metric. |
| 1253 | "value": "A String", # Measurement value. See MetricHeader for type. |
| 1254 | }, |
| 1255 | ], |
| 1256 | "dimensionValues": [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. |
| 1257 | { # The value of a dimension. |
| 1258 | "value": "A String", # Value as a string if the dimension type is a string. |
| 1259 | }, |
| 1260 | ], |
| 1261 | }, |
| 1262 | ], |
| 1263 | "minimums": [ # If requested, the minimum values of metrics. |
| 1264 | { # Report data for each row. For example if RunReportRequest contains: ```none dimensions { name: "eventName" } dimensions { name: "countryId" } metrics { name: "eventCount" } ``` One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and 15 as the eventCount, would be: ```none dimension_values { name: 'in_app_purchase' name: 'us' } metric_values { int64_value: 15 } ``` |
| 1265 | "metricValues": [ # List of requested visible metric values. |
| 1266 | { # The value of a metric. |
| 1267 | "value": "A String", # Measurement value. See MetricHeader for type. |
| 1268 | }, |
| 1269 | ], |
| 1270 | "dimensionValues": [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. |
| 1271 | { # The value of a dimension. |
| 1272 | "value": "A String", # Value as a string if the dimension type is a string. |
| 1273 | }, |
| 1274 | ], |
| 1275 | }, |
| 1276 | ], |
| 1277 | "metadata": { # Response's metadata carrying additional information about the report content. # Metadata for the report. |
| 1278 | "dataLossFromOtherRow": True or False, # If true, indicates some buckets of dimension combinations are rolled into "(other)" row. This can happen for high cardinality reports. |
| 1279 | }, |
| 1280 | "totals": [ # If requested, the totaled values of metrics. |
| 1281 | { # Report data for each row. For example if RunReportRequest contains: ```none dimensions { name: "eventName" } dimensions { name: "countryId" } metrics { name: "eventCount" } ``` One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and 15 as the eventCount, would be: ```none dimension_values { name: 'in_app_purchase' name: 'us' } metric_values { int64_value: 15 } ``` |
| 1282 | "metricValues": [ # List of requested visible metric values. |
| 1283 | { # The value of a metric. |
| 1284 | "value": "A String", # Measurement value. See MetricHeader for type. |
| 1285 | }, |
| 1286 | ], |
| 1287 | "dimensionValues": [ # List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. |
| 1288 | { # The value of a dimension. |
| 1289 | "value": "A String", # Value as a string if the dimension type is a string. |
| 1290 | }, |
| 1291 | ], |
| 1292 | }, |
| 1293 | ], |
| 1294 | "rowCount": 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. |
| 1295 | }</pre> |
| 1296 | </div> |
| 1297 | |
| 1298 | </body></html> |