1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage google.analytics.data.v1beta; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workeroption go_package = "google.golang.org/genproto/googleapis/analytics/data/v1beta;data"; 20*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 21*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "ReportingApiProto"; 22*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.analytics.data.v1beta"; 23*d5c09012SAndroid Build Coastguard Worker 24*d5c09012SAndroid Build Coastguard Worker// A contiguous set of days: `startDate`, `startDate + 1`, ..., `endDate`. 25*d5c09012SAndroid Build Coastguard Worker// Requests are allowed up to 4 date ranges. 26*d5c09012SAndroid Build Coastguard Workermessage DateRange { 27*d5c09012SAndroid Build Coastguard Worker // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot 28*d5c09012SAndroid Build Coastguard Worker // be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also 29*d5c09012SAndroid Build Coastguard Worker // accepted, and in that case, the date is inferred based on the property's 30*d5c09012SAndroid Build Coastguard Worker // reporting time zone. 31*d5c09012SAndroid Build Coastguard Worker string start_date = 1; 32*d5c09012SAndroid Build Coastguard Worker 33*d5c09012SAndroid Build Coastguard Worker // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot 34*d5c09012SAndroid Build Coastguard Worker // be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is 35*d5c09012SAndroid Build Coastguard Worker // also accepted, and in that case, the date is inferred based on the 36*d5c09012SAndroid Build Coastguard Worker // property's reporting time zone. 37*d5c09012SAndroid Build Coastguard Worker string end_date = 2; 38*d5c09012SAndroid Build Coastguard Worker 39*d5c09012SAndroid Build Coastguard Worker // Assigns a name to this date range. The dimension `dateRange` is valued to 40*d5c09012SAndroid Build Coastguard Worker // this name in a report response. If set, cannot begin with `date_range_` or 41*d5c09012SAndroid Build Coastguard Worker // `RESERVED_`. If not set, date ranges are named by their zero based index in 42*d5c09012SAndroid Build Coastguard Worker // the request: `date_range_0`, `date_range_1`, etc. 43*d5c09012SAndroid Build Coastguard Worker string name = 3; 44*d5c09012SAndroid Build Coastguard Worker} 45*d5c09012SAndroid Build Coastguard Worker 46*d5c09012SAndroid Build Coastguard Worker// A contiguous set of minutes: `startMinutesAgo`, `startMinutesAgo + 1`, ..., 47*d5c09012SAndroid Build Coastguard Worker// `endMinutesAgo`. Requests are allowed up to 2 minute ranges. 48*d5c09012SAndroid Build Coastguard Workermessage MinuteRange { 49*d5c09012SAndroid Build Coastguard Worker // The inclusive start minute for the query as a number of minutes before now. 50*d5c09012SAndroid Build Coastguard Worker // For example, `"startMinutesAgo": 29` specifies the report should include 51*d5c09012SAndroid Build Coastguard Worker // event data from 29 minutes ago and after. Cannot be after `endMinutesAgo`. 52*d5c09012SAndroid Build Coastguard Worker // 53*d5c09012SAndroid Build Coastguard Worker // If unspecified, `startMinutesAgo` is defaulted to 29. Standard Analytics 54*d5c09012SAndroid Build Coastguard Worker // properties can request up to the last 30 minutes of event data 55*d5c09012SAndroid Build Coastguard Worker // (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to 56*d5c09012SAndroid Build Coastguard Worker // the last 60 minutes of event data (`startMinutesAgo <= 59`). 57*d5c09012SAndroid Build Coastguard Worker optional int32 start_minutes_ago = 1; 58*d5c09012SAndroid Build Coastguard Worker 59*d5c09012SAndroid Build Coastguard Worker // The inclusive end minute for the query as a number of minutes before now. 60*d5c09012SAndroid Build Coastguard Worker // Cannot be before `startMinutesAgo`. For example, `"endMinutesAgo": 15` 61*d5c09012SAndroid Build Coastguard Worker // specifies the report should include event data from prior to 15 minutes 62*d5c09012SAndroid Build Coastguard Worker // ago. 63*d5c09012SAndroid Build Coastguard Worker // 64*d5c09012SAndroid Build Coastguard Worker // If unspecified, `endMinutesAgo` is defaulted to 0. Standard Analytics 65*d5c09012SAndroid Build Coastguard Worker // properties can request any minute in the last 30 minutes of event data 66*d5c09012SAndroid Build Coastguard Worker // (`endMinutesAgo <= 29`), and 360 Analytics properties can request any 67*d5c09012SAndroid Build Coastguard Worker // minute in the last 60 minutes of event data (`endMinutesAgo <= 59`). 68*d5c09012SAndroid Build Coastguard Worker optional int32 end_minutes_ago = 2; 69*d5c09012SAndroid Build Coastguard Worker 70*d5c09012SAndroid Build Coastguard Worker // Assigns a name to this minute range. The dimension `dateRange` is valued to 71*d5c09012SAndroid Build Coastguard Worker // this name in a report response. If set, cannot begin with `date_range_` or 72*d5c09012SAndroid Build Coastguard Worker // `RESERVED_`. If not set, minute ranges are named by their zero based index 73*d5c09012SAndroid Build Coastguard Worker // in the request: `date_range_0`, `date_range_1`, etc. 74*d5c09012SAndroid Build Coastguard Worker string name = 3; 75*d5c09012SAndroid Build Coastguard Worker} 76*d5c09012SAndroid Build Coastguard Worker 77*d5c09012SAndroid Build Coastguard Worker// Dimensions are attributes of your data. For example, the dimension city 78*d5c09012SAndroid Build Coastguard Worker// indicates the city from which an event originates. Dimension values in report 79*d5c09012SAndroid Build Coastguard Worker// responses are strings; for example, the city could be "Paris" or "New York". 80*d5c09012SAndroid Build Coastguard Worker// Requests are allowed up to 9 dimensions. 81*d5c09012SAndroid Build Coastguard Workermessage Dimension { 82*d5c09012SAndroid Build Coastguard Worker // The name of the dimension. See the [API 83*d5c09012SAndroid Build Coastguard Worker // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) 84*d5c09012SAndroid Build Coastguard Worker // for the list of dimension names supported by core reporting methods such 85*d5c09012SAndroid Build Coastguard Worker // as `runReport` and `batchRunReports`. See 86*d5c09012SAndroid Build Coastguard Worker // [Realtime 87*d5c09012SAndroid Build Coastguard Worker // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions) 88*d5c09012SAndroid Build Coastguard Worker // for the list of dimension names supported by the `runRealtimeReport` 89*d5c09012SAndroid Build Coastguard Worker // method. See 90*d5c09012SAndroid Build Coastguard Worker // [Funnel 91*d5c09012SAndroid Build Coastguard Worker // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions) 92*d5c09012SAndroid Build Coastguard Worker // for the list of dimension names supported by the `runFunnelReport` 93*d5c09012SAndroid Build Coastguard Worker // method. 94*d5c09012SAndroid Build Coastguard Worker // 95*d5c09012SAndroid Build Coastguard Worker // If `dimensionExpression` is specified, `name` can be any string that you 96*d5c09012SAndroid Build Coastguard Worker // would like within the allowed character set. For example if a 97*d5c09012SAndroid Build Coastguard Worker // `dimensionExpression` concatenates `country` and `city`, you could call 98*d5c09012SAndroid Build Coastguard Worker // that dimension `countryAndCity`. Dimension names that you choose must match 99*d5c09012SAndroid Build Coastguard Worker // the regular expression `^[a-zA-Z0-9_]$`. 100*d5c09012SAndroid Build Coastguard Worker // 101*d5c09012SAndroid Build Coastguard Worker // Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, 102*d5c09012SAndroid Build Coastguard Worker // `dimensionExpression`, and `pivots`. 103*d5c09012SAndroid Build Coastguard Worker string name = 1; 104*d5c09012SAndroid Build Coastguard Worker 105*d5c09012SAndroid Build Coastguard Worker // One dimension can be the result of an expression of multiple dimensions. 106*d5c09012SAndroid Build Coastguard Worker // For example, dimension "country, city": concatenate(country, ", ", city). 107*d5c09012SAndroid Build Coastguard Worker DimensionExpression dimension_expression = 2; 108*d5c09012SAndroid Build Coastguard Worker} 109*d5c09012SAndroid Build Coastguard Worker 110*d5c09012SAndroid Build Coastguard Worker// Used to express a dimension which is the result of a formula of multiple 111*d5c09012SAndroid Build Coastguard Worker// dimensions. Example usages: 112*d5c09012SAndroid Build Coastguard Worker// 1) lower_case(dimension) 113*d5c09012SAndroid Build Coastguard Worker// 2) concatenate(dimension1, symbol, dimension2). 114*d5c09012SAndroid Build Coastguard Workermessage DimensionExpression { 115*d5c09012SAndroid Build Coastguard Worker // Used to convert a dimension value to a single case. 116*d5c09012SAndroid Build Coastguard Worker message CaseExpression { 117*d5c09012SAndroid Build Coastguard Worker // Name of a dimension. The name must refer back to a name in dimensions 118*d5c09012SAndroid Build Coastguard Worker // field of the request. 119*d5c09012SAndroid Build Coastguard Worker string dimension_name = 1; 120*d5c09012SAndroid Build Coastguard Worker } 121*d5c09012SAndroid Build Coastguard Worker 122*d5c09012SAndroid Build Coastguard Worker // Used to combine dimension values to a single dimension. 123*d5c09012SAndroid Build Coastguard Worker message ConcatenateExpression { 124*d5c09012SAndroid Build Coastguard Worker // Names of dimensions. The names must refer back to names in the dimensions 125*d5c09012SAndroid Build Coastguard Worker // field of the request. 126*d5c09012SAndroid Build Coastguard Worker repeated string dimension_names = 1; 127*d5c09012SAndroid Build Coastguard Worker 128*d5c09012SAndroid Build Coastguard Worker // The delimiter placed between dimension names. 129*d5c09012SAndroid Build Coastguard Worker // 130*d5c09012SAndroid Build Coastguard Worker // Delimiters are often single characters such as "|" or "," but can be 131*d5c09012SAndroid Build Coastguard Worker // longer strings. If a dimension value contains the delimiter, both will be 132*d5c09012SAndroid Build Coastguard Worker // present in response with no distinction. For example if dimension 1 value 133*d5c09012SAndroid Build Coastguard Worker // = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the 134*d5c09012SAndroid Build Coastguard Worker // response will contain "US,FR,JP". 135*d5c09012SAndroid Build Coastguard Worker string delimiter = 2; 136*d5c09012SAndroid Build Coastguard Worker } 137*d5c09012SAndroid Build Coastguard Worker 138*d5c09012SAndroid Build Coastguard Worker // Specify one type of dimension expression for `DimensionExpression`. 139*d5c09012SAndroid Build Coastguard Worker oneof one_expression { 140*d5c09012SAndroid Build Coastguard Worker // Used to convert a dimension value to lower case. 141*d5c09012SAndroid Build Coastguard Worker CaseExpression lower_case = 4; 142*d5c09012SAndroid Build Coastguard Worker 143*d5c09012SAndroid Build Coastguard Worker // Used to convert a dimension value to upper case. 144*d5c09012SAndroid Build Coastguard Worker CaseExpression upper_case = 5; 145*d5c09012SAndroid Build Coastguard Worker 146*d5c09012SAndroid Build Coastguard Worker // Used to combine dimension values to a single dimension. 147*d5c09012SAndroid Build Coastguard Worker // For example, dimension "country, city": concatenate(country, ", ", city). 148*d5c09012SAndroid Build Coastguard Worker ConcatenateExpression concatenate = 6; 149*d5c09012SAndroid Build Coastguard Worker } 150*d5c09012SAndroid Build Coastguard Worker} 151*d5c09012SAndroid Build Coastguard Worker 152*d5c09012SAndroid Build Coastguard Worker// The quantitative measurements of a report. For example, the metric 153*d5c09012SAndroid Build Coastguard Worker// `eventCount` is the total number of events. Requests are allowed up to 10 154*d5c09012SAndroid Build Coastguard Worker// metrics. 155*d5c09012SAndroid Build Coastguard Workermessage Metric { 156*d5c09012SAndroid Build Coastguard Worker // The name of the metric. See the [API 157*d5c09012SAndroid Build Coastguard Worker // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) 158*d5c09012SAndroid Build Coastguard Worker // for the list of metric names supported by core reporting methods such 159*d5c09012SAndroid Build Coastguard Worker // as `runReport` and `batchRunReports`. See 160*d5c09012SAndroid Build Coastguard Worker // [Realtime 161*d5c09012SAndroid Build Coastguard Worker // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics) 162*d5c09012SAndroid Build Coastguard Worker // for the list of metric names supported by the `runRealtimeReport` 163*d5c09012SAndroid Build Coastguard Worker // method. See 164*d5c09012SAndroid Build Coastguard Worker // [Funnel 165*d5c09012SAndroid Build Coastguard Worker // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics) 166*d5c09012SAndroid Build Coastguard Worker // for the list of metric names supported by the `runFunnelReport` 167*d5c09012SAndroid Build Coastguard Worker // method. 168*d5c09012SAndroid Build Coastguard Worker // 169*d5c09012SAndroid Build Coastguard Worker // If `expression` is specified, `name` can be any string that you would like 170*d5c09012SAndroid Build Coastguard Worker // within the allowed character set. For example if `expression` is 171*d5c09012SAndroid Build Coastguard Worker // `screenPageViews/sessions`, you could call that metric's name = 172*d5c09012SAndroid Build Coastguard Worker // `viewsPerSession`. Metric names that you choose must match the regular 173*d5c09012SAndroid Build Coastguard Worker // expression `^[a-zA-Z0-9_]$`. 174*d5c09012SAndroid Build Coastguard Worker // 175*d5c09012SAndroid Build Coastguard Worker // Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric 176*d5c09012SAndroid Build Coastguard Worker // `expression`. 177*d5c09012SAndroid Build Coastguard Worker string name = 1; 178*d5c09012SAndroid Build Coastguard Worker 179*d5c09012SAndroid Build Coastguard Worker // A mathematical expression for derived metrics. For example, the metric 180*d5c09012SAndroid Build Coastguard Worker // Event count per user is `eventCount/totalUsers`. 181*d5c09012SAndroid Build Coastguard Worker string expression = 2; 182*d5c09012SAndroid Build Coastguard Worker 183*d5c09012SAndroid Build Coastguard Worker // Indicates if a metric is invisible in the report response. If a metric is 184*d5c09012SAndroid Build Coastguard Worker // invisible, the metric will not produce a column in the response, but can be 185*d5c09012SAndroid Build Coastguard Worker // used in `metricFilter`, `orderBys`, or a metric `expression`. 186*d5c09012SAndroid Build Coastguard Worker bool invisible = 3; 187*d5c09012SAndroid Build Coastguard Worker} 188*d5c09012SAndroid Build Coastguard Worker 189*d5c09012SAndroid Build Coastguard Worker// To express dimension or metric filters. The fields in the same 190*d5c09012SAndroid Build Coastguard Worker// FilterExpression need to be either all dimensions or all metrics. 191*d5c09012SAndroid Build Coastguard Workermessage FilterExpression { 192*d5c09012SAndroid Build Coastguard Worker // Specify one type of filter expression for `FilterExpression`. 193*d5c09012SAndroid Build Coastguard Worker oneof expr { 194*d5c09012SAndroid Build Coastguard Worker // The FilterExpressions in and_group have an AND relationship. 195*d5c09012SAndroid Build Coastguard Worker FilterExpressionList and_group = 1; 196*d5c09012SAndroid Build Coastguard Worker 197*d5c09012SAndroid Build Coastguard Worker // The FilterExpressions in or_group have an OR relationship. 198*d5c09012SAndroid Build Coastguard Worker FilterExpressionList or_group = 2; 199*d5c09012SAndroid Build Coastguard Worker 200*d5c09012SAndroid Build Coastguard Worker // The FilterExpression is NOT of not_expression. 201*d5c09012SAndroid Build Coastguard Worker FilterExpression not_expression = 3; 202*d5c09012SAndroid Build Coastguard Worker 203*d5c09012SAndroid Build Coastguard Worker // A primitive filter. In the same FilterExpression, all of the filter's 204*d5c09012SAndroid Build Coastguard Worker // field names need to be either all dimensions or all metrics. 205*d5c09012SAndroid Build Coastguard Worker Filter filter = 4; 206*d5c09012SAndroid Build Coastguard Worker } 207*d5c09012SAndroid Build Coastguard Worker} 208*d5c09012SAndroid Build Coastguard Worker 209*d5c09012SAndroid Build Coastguard Worker// A list of filter expressions. 210*d5c09012SAndroid Build Coastguard Workermessage FilterExpressionList { 211*d5c09012SAndroid Build Coastguard Worker // A list of filter expressions. 212*d5c09012SAndroid Build Coastguard Worker repeated FilterExpression expressions = 1; 213*d5c09012SAndroid Build Coastguard Worker} 214*d5c09012SAndroid Build Coastguard Worker 215*d5c09012SAndroid Build Coastguard Worker// An expression to filter dimension or metric values. 216*d5c09012SAndroid Build Coastguard Workermessage Filter { 217*d5c09012SAndroid Build Coastguard Worker // The filter for string 218*d5c09012SAndroid Build Coastguard Worker message StringFilter { 219*d5c09012SAndroid Build Coastguard Worker // The match type of a string filter 220*d5c09012SAndroid Build Coastguard Worker enum MatchType { 221*d5c09012SAndroid Build Coastguard Worker // Unspecified 222*d5c09012SAndroid Build Coastguard Worker MATCH_TYPE_UNSPECIFIED = 0; 223*d5c09012SAndroid Build Coastguard Worker 224*d5c09012SAndroid Build Coastguard Worker // Exact match of the string value. 225*d5c09012SAndroid Build Coastguard Worker EXACT = 1; 226*d5c09012SAndroid Build Coastguard Worker 227*d5c09012SAndroid Build Coastguard Worker // Begins with the string value. 228*d5c09012SAndroid Build Coastguard Worker BEGINS_WITH = 2; 229*d5c09012SAndroid Build Coastguard Worker 230*d5c09012SAndroid Build Coastguard Worker // Ends with the string value. 231*d5c09012SAndroid Build Coastguard Worker ENDS_WITH = 3; 232*d5c09012SAndroid Build Coastguard Worker 233*d5c09012SAndroid Build Coastguard Worker // Contains the string value. 234*d5c09012SAndroid Build Coastguard Worker CONTAINS = 4; 235*d5c09012SAndroid Build Coastguard Worker 236*d5c09012SAndroid Build Coastguard Worker // Full match for the regular expression with the string value. 237*d5c09012SAndroid Build Coastguard Worker FULL_REGEXP = 5; 238*d5c09012SAndroid Build Coastguard Worker 239*d5c09012SAndroid Build Coastguard Worker // Partial match for the regular expression with the string value. 240*d5c09012SAndroid Build Coastguard Worker PARTIAL_REGEXP = 6; 241*d5c09012SAndroid Build Coastguard Worker } 242*d5c09012SAndroid Build Coastguard Worker 243*d5c09012SAndroid Build Coastguard Worker // The match type for this filter. 244*d5c09012SAndroid Build Coastguard Worker MatchType match_type = 1; 245*d5c09012SAndroid Build Coastguard Worker 246*d5c09012SAndroid Build Coastguard Worker // The string value used for the matching. 247*d5c09012SAndroid Build Coastguard Worker string value = 2; 248*d5c09012SAndroid Build Coastguard Worker 249*d5c09012SAndroid Build Coastguard Worker // If true, the string value is case sensitive. 250*d5c09012SAndroid Build Coastguard Worker bool case_sensitive = 3; 251*d5c09012SAndroid Build Coastguard Worker } 252*d5c09012SAndroid Build Coastguard Worker 253*d5c09012SAndroid Build Coastguard Worker // The result needs to be in a list of string values. 254*d5c09012SAndroid Build Coastguard Worker message InListFilter { 255*d5c09012SAndroid Build Coastguard Worker // The list of string values. 256*d5c09012SAndroid Build Coastguard Worker // Must be non-empty. 257*d5c09012SAndroid Build Coastguard Worker repeated string values = 1; 258*d5c09012SAndroid Build Coastguard Worker 259*d5c09012SAndroid Build Coastguard Worker // If true, the string value is case sensitive. 260*d5c09012SAndroid Build Coastguard Worker bool case_sensitive = 2; 261*d5c09012SAndroid Build Coastguard Worker } 262*d5c09012SAndroid Build Coastguard Worker 263*d5c09012SAndroid Build Coastguard Worker // Filters for numeric or date values. 264*d5c09012SAndroid Build Coastguard Worker message NumericFilter { 265*d5c09012SAndroid Build Coastguard Worker // The operation applied to a numeric filter 266*d5c09012SAndroid Build Coastguard Worker enum Operation { 267*d5c09012SAndroid Build Coastguard Worker // Unspecified. 268*d5c09012SAndroid Build Coastguard Worker OPERATION_UNSPECIFIED = 0; 269*d5c09012SAndroid Build Coastguard Worker 270*d5c09012SAndroid Build Coastguard Worker // Equal 271*d5c09012SAndroid Build Coastguard Worker EQUAL = 1; 272*d5c09012SAndroid Build Coastguard Worker 273*d5c09012SAndroid Build Coastguard Worker // Less than 274*d5c09012SAndroid Build Coastguard Worker LESS_THAN = 2; 275*d5c09012SAndroid Build Coastguard Worker 276*d5c09012SAndroid Build Coastguard Worker // Less than or equal 277*d5c09012SAndroid Build Coastguard Worker LESS_THAN_OR_EQUAL = 3; 278*d5c09012SAndroid Build Coastguard Worker 279*d5c09012SAndroid Build Coastguard Worker // Greater than 280*d5c09012SAndroid Build Coastguard Worker GREATER_THAN = 4; 281*d5c09012SAndroid Build Coastguard Worker 282*d5c09012SAndroid Build Coastguard Worker // Greater than or equal 283*d5c09012SAndroid Build Coastguard Worker GREATER_THAN_OR_EQUAL = 5; 284*d5c09012SAndroid Build Coastguard Worker } 285*d5c09012SAndroid Build Coastguard Worker 286*d5c09012SAndroid Build Coastguard Worker // The operation type for this filter. 287*d5c09012SAndroid Build Coastguard Worker Operation operation = 1; 288*d5c09012SAndroid Build Coastguard Worker 289*d5c09012SAndroid Build Coastguard Worker // A numeric value or a date value. 290*d5c09012SAndroid Build Coastguard Worker NumericValue value = 2; 291*d5c09012SAndroid Build Coastguard Worker } 292*d5c09012SAndroid Build Coastguard Worker 293*d5c09012SAndroid Build Coastguard Worker // To express that the result needs to be between two numbers (inclusive). 294*d5c09012SAndroid Build Coastguard Worker message BetweenFilter { 295*d5c09012SAndroid Build Coastguard Worker // Begins with this number. 296*d5c09012SAndroid Build Coastguard Worker NumericValue from_value = 1; 297*d5c09012SAndroid Build Coastguard Worker 298*d5c09012SAndroid Build Coastguard Worker // Ends with this number. 299*d5c09012SAndroid Build Coastguard Worker NumericValue to_value = 2; 300*d5c09012SAndroid Build Coastguard Worker } 301*d5c09012SAndroid Build Coastguard Worker 302*d5c09012SAndroid Build Coastguard Worker // The dimension name or metric name. 303*d5c09012SAndroid Build Coastguard Worker // 304*d5c09012SAndroid Build Coastguard Worker // In most methods, dimensions & metrics can be used for the first time in 305*d5c09012SAndroid Build Coastguard Worker // this field. However in a RunPivotReportRequest, this field must be 306*d5c09012SAndroid Build Coastguard Worker // additionally specified by name in the RunPivotReportRequest's dimensions or 307*d5c09012SAndroid Build Coastguard Worker // metrics. 308*d5c09012SAndroid Build Coastguard Worker string field_name = 1; 309*d5c09012SAndroid Build Coastguard Worker 310*d5c09012SAndroid Build Coastguard Worker // Specify one type of filter for `Filter`. 311*d5c09012SAndroid Build Coastguard Worker oneof one_filter { 312*d5c09012SAndroid Build Coastguard Worker // Strings related filter. 313*d5c09012SAndroid Build Coastguard Worker StringFilter string_filter = 3; 314*d5c09012SAndroid Build Coastguard Worker 315*d5c09012SAndroid Build Coastguard Worker // A filter for in list values. 316*d5c09012SAndroid Build Coastguard Worker InListFilter in_list_filter = 4; 317*d5c09012SAndroid Build Coastguard Worker 318*d5c09012SAndroid Build Coastguard Worker // A filter for numeric or date values. 319*d5c09012SAndroid Build Coastguard Worker NumericFilter numeric_filter = 5; 320*d5c09012SAndroid Build Coastguard Worker 321*d5c09012SAndroid Build Coastguard Worker // A filter for two values. 322*d5c09012SAndroid Build Coastguard Worker BetweenFilter between_filter = 6; 323*d5c09012SAndroid Build Coastguard Worker } 324*d5c09012SAndroid Build Coastguard Worker} 325*d5c09012SAndroid Build Coastguard Worker 326*d5c09012SAndroid Build Coastguard Worker// Order bys define how rows will be sorted in the response. For example, 327*d5c09012SAndroid Build Coastguard Worker// ordering rows by descending event count is one ordering, and ordering rows by 328*d5c09012SAndroid Build Coastguard Worker// the event name string is a different ordering. 329*d5c09012SAndroid Build Coastguard Workermessage OrderBy { 330*d5c09012SAndroid Build Coastguard Worker // Sorts by metric values. 331*d5c09012SAndroid Build Coastguard Worker message MetricOrderBy { 332*d5c09012SAndroid Build Coastguard Worker // A metric name in the request to order by. 333*d5c09012SAndroid Build Coastguard Worker string metric_name = 1; 334*d5c09012SAndroid Build Coastguard Worker } 335*d5c09012SAndroid Build Coastguard Worker 336*d5c09012SAndroid Build Coastguard Worker // Sorts by dimension values. 337*d5c09012SAndroid Build Coastguard Worker message DimensionOrderBy { 338*d5c09012SAndroid Build Coastguard Worker // Rule to order the string dimension values by. 339*d5c09012SAndroid Build Coastguard Worker enum OrderType { 340*d5c09012SAndroid Build Coastguard Worker // Unspecified. 341*d5c09012SAndroid Build Coastguard Worker ORDER_TYPE_UNSPECIFIED = 0; 342*d5c09012SAndroid Build Coastguard Worker 343*d5c09012SAndroid Build Coastguard Worker // Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < 344*d5c09012SAndroid Build Coastguard Worker // "b" < "z". 345*d5c09012SAndroid Build Coastguard Worker ALPHANUMERIC = 1; 346*d5c09012SAndroid Build Coastguard Worker 347*d5c09012SAndroid Build Coastguard Worker // Case insensitive alphanumeric sort by lower case Unicode code point. 348*d5c09012SAndroid Build Coastguard Worker // For example, "2" < "A" < "b" < "X" < "z". 349*d5c09012SAndroid Build Coastguard Worker CASE_INSENSITIVE_ALPHANUMERIC = 2; 350*d5c09012SAndroid Build Coastguard Worker 351*d5c09012SAndroid Build Coastguard Worker // Dimension values are converted to numbers before sorting. For example 352*d5c09012SAndroid Build Coastguard Worker // in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < 353*d5c09012SAndroid Build Coastguard Worker // "25". Non-numeric dimension values all have equal ordering value below 354*d5c09012SAndroid Build Coastguard Worker // all numeric values. 355*d5c09012SAndroid Build Coastguard Worker NUMERIC = 3; 356*d5c09012SAndroid Build Coastguard Worker } 357*d5c09012SAndroid Build Coastguard Worker 358*d5c09012SAndroid Build Coastguard Worker // A dimension name in the request to order by. 359*d5c09012SAndroid Build Coastguard Worker string dimension_name = 1; 360*d5c09012SAndroid Build Coastguard Worker 361*d5c09012SAndroid Build Coastguard Worker // Controls the rule for dimension value ordering. 362*d5c09012SAndroid Build Coastguard Worker OrderType order_type = 2; 363*d5c09012SAndroid Build Coastguard Worker } 364*d5c09012SAndroid Build Coastguard Worker 365*d5c09012SAndroid Build Coastguard Worker // Sorts by a pivot column group. 366*d5c09012SAndroid Build Coastguard Worker message PivotOrderBy { 367*d5c09012SAndroid Build Coastguard Worker // A pair of dimension names and values. Rows with this dimension pivot pair 368*d5c09012SAndroid Build Coastguard Worker // are ordered by the metric's value. 369*d5c09012SAndroid Build Coastguard Worker // 370*d5c09012SAndroid Build Coastguard Worker // For example if pivots = {{"browser", "Chrome"}} and 371*d5c09012SAndroid Build Coastguard Worker // metric_name = "Sessions", 372*d5c09012SAndroid Build Coastguard Worker // then the rows will be sorted based on Sessions in Chrome. 373*d5c09012SAndroid Build Coastguard Worker // 374*d5c09012SAndroid Build Coastguard Worker // ---------|----------|----------------|----------|---------------- 375*d5c09012SAndroid Build Coastguard Worker // | Chrome | Chrome | Safari | Safari 376*d5c09012SAndroid Build Coastguard Worker // ---------|----------|----------------|----------|---------------- 377*d5c09012SAndroid Build Coastguard Worker // Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions 378*d5c09012SAndroid Build Coastguard Worker // ---------|----------|----------------|----------|---------------- 379*d5c09012SAndroid Build Coastguard Worker // US | 2 | 2 | 3 | 1 380*d5c09012SAndroid Build Coastguard Worker // ---------|----------|----------------|----------|---------------- 381*d5c09012SAndroid Build Coastguard Worker // Canada | 3 | 1 | 4 | 1 382*d5c09012SAndroid Build Coastguard Worker // ---------|----------|----------------|----------|---------------- 383*d5c09012SAndroid Build Coastguard Worker message PivotSelection { 384*d5c09012SAndroid Build Coastguard Worker // Must be a dimension name from the request. 385*d5c09012SAndroid Build Coastguard Worker string dimension_name = 1; 386*d5c09012SAndroid Build Coastguard Worker 387*d5c09012SAndroid Build Coastguard Worker // Order by only when the named dimension is this value. 388*d5c09012SAndroid Build Coastguard Worker string dimension_value = 2; 389*d5c09012SAndroid Build Coastguard Worker } 390*d5c09012SAndroid Build Coastguard Worker 391*d5c09012SAndroid Build Coastguard Worker // In the response to order by, order rows by this column. Must be a metric 392*d5c09012SAndroid Build Coastguard Worker // name from the request. 393*d5c09012SAndroid Build Coastguard Worker string metric_name = 1; 394*d5c09012SAndroid Build Coastguard Worker 395*d5c09012SAndroid Build Coastguard Worker // Used to select a dimension name and value pivot. If multiple pivot 396*d5c09012SAndroid Build Coastguard Worker // selections are given, the sort occurs on rows where all pivot selection 397*d5c09012SAndroid Build Coastguard Worker // dimension name and value pairs match the row's dimension name and value 398*d5c09012SAndroid Build Coastguard Worker // pair. 399*d5c09012SAndroid Build Coastguard Worker repeated PivotSelection pivot_selections = 2; 400*d5c09012SAndroid Build Coastguard Worker } 401*d5c09012SAndroid Build Coastguard Worker 402*d5c09012SAndroid Build Coastguard Worker // Specify one type of order by for `OrderBy`. 403*d5c09012SAndroid Build Coastguard Worker oneof one_order_by { 404*d5c09012SAndroid Build Coastguard Worker // Sorts results by a metric's values. 405*d5c09012SAndroid Build Coastguard Worker MetricOrderBy metric = 1; 406*d5c09012SAndroid Build Coastguard Worker 407*d5c09012SAndroid Build Coastguard Worker // Sorts results by a dimension's values. 408*d5c09012SAndroid Build Coastguard Worker DimensionOrderBy dimension = 2; 409*d5c09012SAndroid Build Coastguard Worker 410*d5c09012SAndroid Build Coastguard Worker // Sorts results by a metric's values within a pivot column group. 411*d5c09012SAndroid Build Coastguard Worker PivotOrderBy pivot = 3; 412*d5c09012SAndroid Build Coastguard Worker } 413*d5c09012SAndroid Build Coastguard Worker 414*d5c09012SAndroid Build Coastguard Worker // If true, sorts by descending order. 415*d5c09012SAndroid Build Coastguard Worker bool desc = 4; 416*d5c09012SAndroid Build Coastguard Worker} 417*d5c09012SAndroid Build Coastguard Worker 418*d5c09012SAndroid Build Coastguard Worker// Describes the visible dimension columns and rows in the report response. 419*d5c09012SAndroid Build Coastguard Workermessage Pivot { 420*d5c09012SAndroid Build Coastguard Worker // Dimension names for visible columns in the report response. Including 421*d5c09012SAndroid Build Coastguard Worker // "dateRange" produces a date range column; for each row in the response, 422*d5c09012SAndroid Build Coastguard Worker // dimension values in the date range column will indicate the corresponding 423*d5c09012SAndroid Build Coastguard Worker // date range from the request. 424*d5c09012SAndroid Build Coastguard Worker repeated string field_names = 1; 425*d5c09012SAndroid Build Coastguard Worker 426*d5c09012SAndroid Build Coastguard Worker // Specifies how dimensions are ordered in the pivot. In the first Pivot, the 427*d5c09012SAndroid Build Coastguard Worker // OrderBys determine Row and PivotDimensionHeader ordering; in subsequent 428*d5c09012SAndroid Build Coastguard Worker // Pivots, the OrderBys determine only PivotDimensionHeader ordering. 429*d5c09012SAndroid Build Coastguard Worker // Dimensions specified in these OrderBys must be a subset of 430*d5c09012SAndroid Build Coastguard Worker // Pivot.field_names. 431*d5c09012SAndroid Build Coastguard Worker repeated OrderBy order_bys = 2; 432*d5c09012SAndroid Build Coastguard Worker 433*d5c09012SAndroid Build Coastguard Worker // The row count of the start row. The first row is counted as row 0. 434*d5c09012SAndroid Build Coastguard Worker int64 offset = 3; 435*d5c09012SAndroid Build Coastguard Worker 436*d5c09012SAndroid Build Coastguard Worker // The number of unique combinations of dimension values to return in this 437*d5c09012SAndroid Build Coastguard Worker // pivot. The `limit` parameter is required. A `limit` of 10,000 is common for 438*d5c09012SAndroid Build Coastguard Worker // single pivot requests. 439*d5c09012SAndroid Build Coastguard Worker // 440*d5c09012SAndroid Build Coastguard Worker // The product of the `limit` for each `pivot` in a `RunPivotReportRequest` 441*d5c09012SAndroid Build Coastguard Worker // must not exceed 250,000. For example, a two pivot request with `limit: 442*d5c09012SAndroid Build Coastguard Worker // 1000` in each pivot will fail because the product is `1,000,000`. 443*d5c09012SAndroid Build Coastguard Worker int64 limit = 4; 444*d5c09012SAndroid Build Coastguard Worker 445*d5c09012SAndroid Build Coastguard Worker // Aggregate the metrics by dimensions in this pivot using the specified 446*d5c09012SAndroid Build Coastguard Worker // metric_aggregations. 447*d5c09012SAndroid Build Coastguard Worker repeated MetricAggregation metric_aggregations = 5; 448*d5c09012SAndroid Build Coastguard Worker} 449*d5c09012SAndroid Build Coastguard Worker 450*d5c09012SAndroid Build Coastguard Worker// The specification of cohorts for a cohort report. 451*d5c09012SAndroid Build Coastguard Worker// 452*d5c09012SAndroid Build Coastguard Worker// Cohort reports create a time series of user retention for the cohort. For 453*d5c09012SAndroid Build Coastguard Worker// example, you could select the cohort of users that were acquired in the first 454*d5c09012SAndroid Build Coastguard Worker// week of September and follow that cohort for the next six weeks. Selecting 455*d5c09012SAndroid Build Coastguard Worker// the users acquired in the first week of September cohort is specified in the 456*d5c09012SAndroid Build Coastguard Worker// `cohort` object. Following that cohort for the next six weeks is specified in 457*d5c09012SAndroid Build Coastguard Worker// the `cohortsRange` object. 458*d5c09012SAndroid Build Coastguard Worker// 459*d5c09012SAndroid Build Coastguard Worker// For examples, see [Cohort Report 460*d5c09012SAndroid Build Coastguard Worker// Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). 461*d5c09012SAndroid Build Coastguard Worker// 462*d5c09012SAndroid Build Coastguard Worker// The report response could show a weekly time series where say your app has 463*d5c09012SAndroid Build Coastguard Worker// retained 60% of this cohort after three weeks and 25% of this cohort after 464*d5c09012SAndroid Build Coastguard Worker// six weeks. These two percentages can be calculated by the metric 465*d5c09012SAndroid Build Coastguard Worker// `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report. 466*d5c09012SAndroid Build Coastguard Workermessage CohortSpec { 467*d5c09012SAndroid Build Coastguard Worker // Defines the selection criteria to group users into cohorts. 468*d5c09012SAndroid Build Coastguard Worker // 469*d5c09012SAndroid Build Coastguard Worker // Most cohort reports define only a single cohort. If multiple cohorts are 470*d5c09012SAndroid Build Coastguard Worker // specified, each cohort can be recognized in the report by their name. 471*d5c09012SAndroid Build Coastguard Worker repeated Cohort cohorts = 1; 472*d5c09012SAndroid Build Coastguard Worker 473*d5c09012SAndroid Build Coastguard Worker // Cohort reports follow cohorts over an extended reporting date range. This 474*d5c09012SAndroid Build Coastguard Worker // range specifies an offset duration to follow the cohorts over. 475*d5c09012SAndroid Build Coastguard Worker CohortsRange cohorts_range = 2; 476*d5c09012SAndroid Build Coastguard Worker 477*d5c09012SAndroid Build Coastguard Worker // Optional settings for a cohort report. 478*d5c09012SAndroid Build Coastguard Worker CohortReportSettings cohort_report_settings = 3; 479*d5c09012SAndroid Build Coastguard Worker} 480*d5c09012SAndroid Build Coastguard Worker 481*d5c09012SAndroid Build Coastguard Worker// Defines a cohort selection criteria. A cohort is a group of users who share 482*d5c09012SAndroid Build Coastguard Worker// a common characteristic. For example, users with the same `firstSessionDate` 483*d5c09012SAndroid Build Coastguard Worker// belong to the same cohort. 484*d5c09012SAndroid Build Coastguard Workermessage Cohort { 485*d5c09012SAndroid Build Coastguard Worker // Assigns a name to this cohort. The dimension `cohort` is valued to this 486*d5c09012SAndroid Build Coastguard Worker // name in a report response. If set, cannot begin with `cohort_` or 487*d5c09012SAndroid Build Coastguard Worker // `RESERVED_`. If not set, cohorts are named by their zero based index 488*d5c09012SAndroid Build Coastguard Worker // `cohort_0`, `cohort_1`, etc. 489*d5c09012SAndroid Build Coastguard Worker string name = 1; 490*d5c09012SAndroid Build Coastguard Worker 491*d5c09012SAndroid Build Coastguard Worker // Dimension used by the cohort. Required and only supports 492*d5c09012SAndroid Build Coastguard Worker // `firstSessionDate`. 493*d5c09012SAndroid Build Coastguard Worker string dimension = 2; 494*d5c09012SAndroid Build Coastguard Worker 495*d5c09012SAndroid Build Coastguard Worker // The cohort selects users whose first touch date is between start date and 496*d5c09012SAndroid Build Coastguard Worker // end date defined in the `dateRange`. This `dateRange` does not specify the 497*d5c09012SAndroid Build Coastguard Worker // full date range of event data that is present in a cohort report. In a 498*d5c09012SAndroid Build Coastguard Worker // cohort report, this `dateRange` is extended by the granularity and offset 499*d5c09012SAndroid Build Coastguard Worker // present in the `cohortsRange`; event data for the extended reporting date 500*d5c09012SAndroid Build Coastguard Worker // range is present in a cohort report. 501*d5c09012SAndroid Build Coastguard Worker // 502*d5c09012SAndroid Build Coastguard Worker // In a cohort request, this `dateRange` is required and the `dateRanges` in 503*d5c09012SAndroid Build Coastguard Worker // the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. 504*d5c09012SAndroid Build Coastguard Worker // 505*d5c09012SAndroid Build Coastguard Worker // This `dateRange` should generally be aligned with the cohort's granularity. 506*d5c09012SAndroid Build Coastguard Worker // If `CohortsRange` uses daily granularity, this `dateRange` can be a single 507*d5c09012SAndroid Build Coastguard Worker // day. If `CohortsRange` uses weekly granularity, this `dateRange` can be 508*d5c09012SAndroid Build Coastguard Worker // aligned to a week boundary, starting at Sunday and ending Saturday. If 509*d5c09012SAndroid Build Coastguard Worker // `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to 510*d5c09012SAndroid Build Coastguard Worker // a month, starting at the first and ending on the last day of the month. 511*d5c09012SAndroid Build Coastguard Worker DateRange date_range = 3; 512*d5c09012SAndroid Build Coastguard Worker} 513*d5c09012SAndroid Build Coastguard Worker 514*d5c09012SAndroid Build Coastguard Worker// Configures the extended reporting date range for a cohort report. Specifies 515*d5c09012SAndroid Build Coastguard Worker// an offset duration to follow the cohorts over. 516*d5c09012SAndroid Build Coastguard Workermessage CohortsRange { 517*d5c09012SAndroid Build Coastguard Worker // The granularity used to interpret the `startOffset` and `endOffset` for the 518*d5c09012SAndroid Build Coastguard Worker // extended reporting date range for a cohort report. 519*d5c09012SAndroid Build Coastguard Worker enum Granularity { 520*d5c09012SAndroid Build Coastguard Worker // Should never be specified. 521*d5c09012SAndroid Build Coastguard Worker GRANULARITY_UNSPECIFIED = 0; 522*d5c09012SAndroid Build Coastguard Worker 523*d5c09012SAndroid Build Coastguard Worker // Daily granularity. Commonly used if the cohort's `dateRange` is a single 524*d5c09012SAndroid Build Coastguard Worker // day and the request contains `cohortNthDay`. 525*d5c09012SAndroid Build Coastguard Worker DAILY = 1; 526*d5c09012SAndroid Build Coastguard Worker 527*d5c09012SAndroid Build Coastguard Worker // Weekly granularity. Commonly used if the cohort's `dateRange` is a week 528*d5c09012SAndroid Build Coastguard Worker // in duration (starting on Sunday and ending on Saturday) and the request 529*d5c09012SAndroid Build Coastguard Worker // contains `cohortNthWeek`. 530*d5c09012SAndroid Build Coastguard Worker WEEKLY = 2; 531*d5c09012SAndroid Build Coastguard Worker 532*d5c09012SAndroid Build Coastguard Worker // Monthly granularity. Commonly used if the cohort's `dateRange` is a month 533*d5c09012SAndroid Build Coastguard Worker // in duration and the request contains `cohortNthMonth`. 534*d5c09012SAndroid Build Coastguard Worker MONTHLY = 3; 535*d5c09012SAndroid Build Coastguard Worker } 536*d5c09012SAndroid Build Coastguard Worker 537*d5c09012SAndroid Build Coastguard Worker // Required. The granularity used to interpret the `startOffset` and 538*d5c09012SAndroid Build Coastguard Worker // `endOffset` for the extended reporting date range for a cohort report. 539*d5c09012SAndroid Build Coastguard Worker Granularity granularity = 1; 540*d5c09012SAndroid Build Coastguard Worker 541*d5c09012SAndroid Build Coastguard Worker // `startOffset` specifies the start date of the extended reporting date range 542*d5c09012SAndroid Build Coastguard Worker // for a cohort report. `startOffset` is commonly set to 0 so that reports 543*d5c09012SAndroid Build Coastguard Worker // contain data from the acquisition of the cohort forward. 544*d5c09012SAndroid Build Coastguard Worker // 545*d5c09012SAndroid Build Coastguard Worker // If `granularity` is `DAILY`, the `startDate` of the extended reporting date 546*d5c09012SAndroid Build Coastguard Worker // range is `startDate` of the cohort plus `startOffset` days. 547*d5c09012SAndroid Build Coastguard Worker // 548*d5c09012SAndroid Build Coastguard Worker // If `granularity` is `WEEKLY`, the `startDate` of the extended reporting 549*d5c09012SAndroid Build Coastguard Worker // date range is `startDate` of the cohort plus `startOffset * 7` days. 550*d5c09012SAndroid Build Coastguard Worker // 551*d5c09012SAndroid Build Coastguard Worker // If `granularity` is `MONTHLY`, the `startDate` of the extended reporting 552*d5c09012SAndroid Build Coastguard Worker // date range is `startDate` of the cohort plus `startOffset * 30` days. 553*d5c09012SAndroid Build Coastguard Worker int32 start_offset = 2; 554*d5c09012SAndroid Build Coastguard Worker 555*d5c09012SAndroid Build Coastguard Worker // Required. `endOffset` specifies the end date of the extended reporting date 556*d5c09012SAndroid Build Coastguard Worker // range for a cohort report. `endOffset` can be any positive integer but is 557*d5c09012SAndroid Build Coastguard Worker // commonly set to 5 to 10 so that reports contain data on the cohort for the 558*d5c09012SAndroid Build Coastguard Worker // next several granularity time periods. 559*d5c09012SAndroid Build Coastguard Worker // 560*d5c09012SAndroid Build Coastguard Worker // If `granularity` is `DAILY`, the `endDate` of the extended reporting date 561*d5c09012SAndroid Build Coastguard Worker // range is `endDate` of the cohort plus `endOffset` days. 562*d5c09012SAndroid Build Coastguard Worker // 563*d5c09012SAndroid Build Coastguard Worker // If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date 564*d5c09012SAndroid Build Coastguard Worker // range is `endDate` of the cohort plus `endOffset * 7` days. 565*d5c09012SAndroid Build Coastguard Worker // 566*d5c09012SAndroid Build Coastguard Worker // If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date 567*d5c09012SAndroid Build Coastguard Worker // range is `endDate` of the cohort plus `endOffset * 30` days. 568*d5c09012SAndroid Build Coastguard Worker int32 end_offset = 3; 569*d5c09012SAndroid Build Coastguard Worker} 570*d5c09012SAndroid Build Coastguard Worker 571*d5c09012SAndroid Build Coastguard Worker// Optional settings of a cohort report. 572*d5c09012SAndroid Build Coastguard Workermessage CohortReportSettings { 573*d5c09012SAndroid Build Coastguard Worker // If true, accumulates the result from first touch day to the end day. Not 574*d5c09012SAndroid Build Coastguard Worker // supported in `RunReportRequest`. 575*d5c09012SAndroid Build Coastguard Worker bool accumulate = 1; 576*d5c09012SAndroid Build Coastguard Worker} 577*d5c09012SAndroid Build Coastguard Worker 578*d5c09012SAndroid Build Coastguard Worker// Response's metadata carrying additional information about the report content. 579*d5c09012SAndroid Build Coastguard Workermessage ResponseMetaData { 580*d5c09012SAndroid Build Coastguard Worker // The schema restrictions actively enforced in creating this report. To learn 581*d5c09012SAndroid Build Coastguard Worker // more, see [Access and data-restriction 582*d5c09012SAndroid Build Coastguard Worker // management](https://support.google.com/analytics/answer/10851388). 583*d5c09012SAndroid Build Coastguard Worker message SchemaRestrictionResponse { 584*d5c09012SAndroid Build Coastguard Worker // A metric actively restricted in creating the report. 585*d5c09012SAndroid Build Coastguard Worker message ActiveMetricRestriction { 586*d5c09012SAndroid Build Coastguard Worker // The name of the restricted metric. 587*d5c09012SAndroid Build Coastguard Worker optional string metric_name = 1; 588*d5c09012SAndroid Build Coastguard Worker 589*d5c09012SAndroid Build Coastguard Worker // The reason for this metric's restriction. 590*d5c09012SAndroid Build Coastguard Worker repeated RestrictedMetricType restricted_metric_types = 2; 591*d5c09012SAndroid Build Coastguard Worker } 592*d5c09012SAndroid Build Coastguard Worker 593*d5c09012SAndroid Build Coastguard Worker // All restrictions actively enforced in creating the report. For example, 594*d5c09012SAndroid Build Coastguard Worker // `purchaseRevenue` always has the restriction type `REVENUE_DATA`. 595*d5c09012SAndroid Build Coastguard Worker // However, this active response restriction is only populated if the user's 596*d5c09012SAndroid Build Coastguard Worker // custom role disallows access to `REVENUE_DATA`. 597*d5c09012SAndroid Build Coastguard Worker repeated ActiveMetricRestriction active_metric_restrictions = 1; 598*d5c09012SAndroid Build Coastguard Worker } 599*d5c09012SAndroid Build Coastguard Worker 600*d5c09012SAndroid Build Coastguard Worker // If true, indicates some buckets of dimension combinations are rolled into 601*d5c09012SAndroid Build Coastguard Worker // "(other)" row. This can happen for high cardinality reports. 602*d5c09012SAndroid Build Coastguard Worker // 603*d5c09012SAndroid Build Coastguard Worker // The metadata parameter dataLossFromOtherRow is populated based on the 604*d5c09012SAndroid Build Coastguard Worker // aggregated data table used in the report. The parameter will be accurately 605*d5c09012SAndroid Build Coastguard Worker // populated regardless of the filters and limits in the report. 606*d5c09012SAndroid Build Coastguard Worker // 607*d5c09012SAndroid Build Coastguard Worker // For example, the (other) row could be dropped from the report because the 608*d5c09012SAndroid Build Coastguard Worker // request contains a filter on sessionSource = google. This parameter will 609*d5c09012SAndroid Build Coastguard Worker // still be populated if data loss from other row was present in the input 610*d5c09012SAndroid Build Coastguard Worker // aggregate data used to generate this report. 611*d5c09012SAndroid Build Coastguard Worker // 612*d5c09012SAndroid Build Coastguard Worker // To learn more, see [About the (other) row and data 613*d5c09012SAndroid Build Coastguard Worker // sampling](https://support.google.com/analytics/answer/13208658#reports). 614*d5c09012SAndroid Build Coastguard Worker bool data_loss_from_other_row = 3; 615*d5c09012SAndroid Build Coastguard Worker 616*d5c09012SAndroid Build Coastguard Worker // Describes the schema restrictions actively enforced in creating this 617*d5c09012SAndroid Build Coastguard Worker // report. To learn more, see [Access and data-restriction 618*d5c09012SAndroid Build Coastguard Worker // management](https://support.google.com/analytics/answer/10851388). 619*d5c09012SAndroid Build Coastguard Worker optional SchemaRestrictionResponse schema_restriction_response = 4; 620*d5c09012SAndroid Build Coastguard Worker 621*d5c09012SAndroid Build Coastguard Worker // The currency code used in this report. Intended to be used in formatting 622*d5c09012SAndroid Build Coastguard Worker // currency metrics like `purchaseRevenue` for visualization. If currency_code 623*d5c09012SAndroid Build Coastguard Worker // was specified in the request, this response parameter will echo the request 624*d5c09012SAndroid Build Coastguard Worker // parameter; otherwise, this response parameter is the property's current 625*d5c09012SAndroid Build Coastguard Worker // currency_code. 626*d5c09012SAndroid Build Coastguard Worker // 627*d5c09012SAndroid Build Coastguard Worker // Currency codes are string encodings of currency types from the ISO 4217 628*d5c09012SAndroid Build Coastguard Worker // standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD", 629*d5c09012SAndroid Build Coastguard Worker // "EUR", "JPY". To learn more, see 630*d5c09012SAndroid Build Coastguard Worker // https://support.google.com/analytics/answer/9796179. 631*d5c09012SAndroid Build Coastguard Worker optional string currency_code = 5; 632*d5c09012SAndroid Build Coastguard Worker 633*d5c09012SAndroid Build Coastguard Worker // The property's current timezone. Intended to be used to interpret 634*d5c09012SAndroid Build Coastguard Worker // time-based dimensions like `hour` and `minute`. Formatted as strings from 635*d5c09012SAndroid Build Coastguard Worker // the IANA Time Zone database (https://www.iana.org/time-zones); for example 636*d5c09012SAndroid Build Coastguard Worker // "America/New_York" or "Asia/Tokyo". 637*d5c09012SAndroid Build Coastguard Worker optional string time_zone = 6; 638*d5c09012SAndroid Build Coastguard Worker 639*d5c09012SAndroid Build Coastguard Worker // If empty reason is specified, the report is empty for this reason. 640*d5c09012SAndroid Build Coastguard Worker optional string empty_reason = 7; 641*d5c09012SAndroid Build Coastguard Worker 642*d5c09012SAndroid Build Coastguard Worker // If `subjectToThresholding` is true, this report is subject to thresholding 643*d5c09012SAndroid Build Coastguard Worker // and only returns data that meets the minimum aggregation thresholds. It is 644*d5c09012SAndroid Build Coastguard Worker // possible for a request to be subject to thresholding thresholding and no 645*d5c09012SAndroid Build Coastguard Worker // data is absent from the report, and this happens when all data is above the 646*d5c09012SAndroid Build Coastguard Worker // thresholds. To learn more, see [Data 647*d5c09012SAndroid Build Coastguard Worker // thresholds](https://support.google.com/analytics/answer/9383630). 648*d5c09012SAndroid Build Coastguard Worker optional bool subject_to_thresholding = 8; 649*d5c09012SAndroid Build Coastguard Worker 650*d5c09012SAndroid Build Coastguard Worker // If this report results is 651*d5c09012SAndroid Build Coastguard Worker // [sampled](https://support.google.com/analytics/answer/13331292), this 652*d5c09012SAndroid Build Coastguard Worker // describes the percentage of events used in this report. One 653*d5c09012SAndroid Build Coastguard Worker // `samplingMetadatas` is populated for each date range. Each 654*d5c09012SAndroid Build Coastguard Worker // `samplingMetadatas` corresponds to a date range in order that date ranges 655*d5c09012SAndroid Build Coastguard Worker // were specified in the request. 656*d5c09012SAndroid Build Coastguard Worker // 657*d5c09012SAndroid Build Coastguard Worker // However if the results are not sampled, this field will not be defined. 658*d5c09012SAndroid Build Coastguard Worker repeated SamplingMetadata sampling_metadatas = 9; 659*d5c09012SAndroid Build Coastguard Worker} 660*d5c09012SAndroid Build Coastguard Worker 661*d5c09012SAndroid Build Coastguard Worker// If this report results is 662*d5c09012SAndroid Build Coastguard Worker// [sampled](https://support.google.com/analytics/answer/13331292), this 663*d5c09012SAndroid Build Coastguard Worker// describes the percentage of events used in this report. Sampling is the 664*d5c09012SAndroid Build Coastguard Worker// practice of analyzing a subset of all data in order to uncover the meaningful 665*d5c09012SAndroid Build Coastguard Worker// information in the larger data set. 666*d5c09012SAndroid Build Coastguard Workermessage SamplingMetadata { 667*d5c09012SAndroid Build Coastguard Worker // The total number of events read in this sampled report for a date range. 668*d5c09012SAndroid Build Coastguard Worker // This is the size of the subset this property's data that was analyzed in 669*d5c09012SAndroid Build Coastguard Worker // this report. 670*d5c09012SAndroid Build Coastguard Worker int64 samples_read_count = 1; 671*d5c09012SAndroid Build Coastguard Worker 672*d5c09012SAndroid Build Coastguard Worker // The total number of events present in this property's data that could 673*d5c09012SAndroid Build Coastguard Worker // have been analyzed in this report for a date range. Sampling 674*d5c09012SAndroid Build Coastguard Worker // uncovers the meaningful information about the larger data set, and this 675*d5c09012SAndroid Build Coastguard Worker // is the size of the larger data set. 676*d5c09012SAndroid Build Coastguard Worker // 677*d5c09012SAndroid Build Coastguard Worker // To calculate the percentage of available data that was used in this 678*d5c09012SAndroid Build Coastguard Worker // report, compute `samplesReadCount/samplingSpaceSize`. 679*d5c09012SAndroid Build Coastguard Worker int64 sampling_space_size = 2; 680*d5c09012SAndroid Build Coastguard Worker} 681*d5c09012SAndroid Build Coastguard Worker 682*d5c09012SAndroid Build Coastguard Worker// Describes a dimension column in the report. Dimensions requested in a report 683*d5c09012SAndroid Build Coastguard Worker// produce column entries within rows and DimensionHeaders. However, dimensions 684*d5c09012SAndroid Build Coastguard Worker// used exclusively within filters or expressions do not produce columns in a 685*d5c09012SAndroid Build Coastguard Worker// report; correspondingly, those dimensions do not produce headers. 686*d5c09012SAndroid Build Coastguard Workermessage DimensionHeader { 687*d5c09012SAndroid Build Coastguard Worker // The dimension's name. 688*d5c09012SAndroid Build Coastguard Worker string name = 1; 689*d5c09012SAndroid Build Coastguard Worker} 690*d5c09012SAndroid Build Coastguard Worker 691*d5c09012SAndroid Build Coastguard Worker// Describes a metric column in the report. Visible metrics requested in a 692*d5c09012SAndroid Build Coastguard Worker// report produce column entries within rows and MetricHeaders. However, 693*d5c09012SAndroid Build Coastguard Worker// metrics used exclusively within filters or expressions do not produce columns 694*d5c09012SAndroid Build Coastguard Worker// in a report; correspondingly, those metrics do not produce headers. 695*d5c09012SAndroid Build Coastguard Workermessage MetricHeader { 696*d5c09012SAndroid Build Coastguard Worker // The metric's name. 697*d5c09012SAndroid Build Coastguard Worker string name = 1; 698*d5c09012SAndroid Build Coastguard Worker 699*d5c09012SAndroid Build Coastguard Worker // The metric's data type. 700*d5c09012SAndroid Build Coastguard Worker MetricType type = 2; 701*d5c09012SAndroid Build Coastguard Worker} 702*d5c09012SAndroid Build Coastguard Worker 703*d5c09012SAndroid Build Coastguard Worker// Dimensions' values in a single pivot. 704*d5c09012SAndroid Build Coastguard Workermessage PivotHeader { 705*d5c09012SAndroid Build Coastguard Worker // The size is the same as the cardinality of the corresponding dimension 706*d5c09012SAndroid Build Coastguard Worker // combinations. 707*d5c09012SAndroid Build Coastguard Worker repeated PivotDimensionHeader pivot_dimension_headers = 1; 708*d5c09012SAndroid Build Coastguard Worker 709*d5c09012SAndroid Build Coastguard Worker // The cardinality of the pivot. The total number of rows for this pivot's 710*d5c09012SAndroid Build Coastguard Worker // fields regardless of how the parameters `offset` and `limit` are specified 711*d5c09012SAndroid Build Coastguard Worker // in the request. 712*d5c09012SAndroid Build Coastguard Worker int32 row_count = 2; 713*d5c09012SAndroid Build Coastguard Worker} 714*d5c09012SAndroid Build Coastguard Worker 715*d5c09012SAndroid Build Coastguard Worker// Summarizes dimension values from a row for this pivot. 716*d5c09012SAndroid Build Coastguard Workermessage PivotDimensionHeader { 717*d5c09012SAndroid Build Coastguard Worker // Values of multiple dimensions in a pivot. 718*d5c09012SAndroid Build Coastguard Worker repeated DimensionValue dimension_values = 1; 719*d5c09012SAndroid Build Coastguard Worker} 720*d5c09012SAndroid Build Coastguard Worker 721*d5c09012SAndroid Build Coastguard Worker// Report data for each row. 722*d5c09012SAndroid Build Coastguard Worker// For example if RunReportRequest contains: 723*d5c09012SAndroid Build Coastguard Worker// 724*d5c09012SAndroid Build Coastguard Worker// ```none 725*d5c09012SAndroid Build Coastguard Worker// "dimensions": [ 726*d5c09012SAndroid Build Coastguard Worker// { 727*d5c09012SAndroid Build Coastguard Worker// "name": "eventName" 728*d5c09012SAndroid Build Coastguard Worker// }, 729*d5c09012SAndroid Build Coastguard Worker// { 730*d5c09012SAndroid Build Coastguard Worker// "name": "countryId" 731*d5c09012SAndroid Build Coastguard Worker// } 732*d5c09012SAndroid Build Coastguard Worker// ], 733*d5c09012SAndroid Build Coastguard Worker// "metrics": [ 734*d5c09012SAndroid Build Coastguard Worker// { 735*d5c09012SAndroid Build Coastguard Worker// "name": "eventCount" 736*d5c09012SAndroid Build Coastguard Worker// } 737*d5c09012SAndroid Build Coastguard Worker// ] 738*d5c09012SAndroid Build Coastguard Worker// ``` 739*d5c09012SAndroid Build Coastguard Worker// 740*d5c09012SAndroid Build Coastguard Worker// One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and 741*d5c09012SAndroid Build Coastguard Worker// 15 as the eventCount, would be: 742*d5c09012SAndroid Build Coastguard Worker// 743*d5c09012SAndroid Build Coastguard Worker// ```none 744*d5c09012SAndroid Build Coastguard Worker// "dimensionValues": [ 745*d5c09012SAndroid Build Coastguard Worker// { 746*d5c09012SAndroid Build Coastguard Worker// "value": "in_app_purchase" 747*d5c09012SAndroid Build Coastguard Worker// }, 748*d5c09012SAndroid Build Coastguard Worker// { 749*d5c09012SAndroid Build Coastguard Worker// "value": "JP" 750*d5c09012SAndroid Build Coastguard Worker// } 751*d5c09012SAndroid Build Coastguard Worker// ], 752*d5c09012SAndroid Build Coastguard Worker// "metricValues": [ 753*d5c09012SAndroid Build Coastguard Worker// { 754*d5c09012SAndroid Build Coastguard Worker// "value": "15" 755*d5c09012SAndroid Build Coastguard Worker// } 756*d5c09012SAndroid Build Coastguard Worker// ] 757*d5c09012SAndroid Build Coastguard Worker// ``` 758*d5c09012SAndroid Build Coastguard Workermessage Row { 759*d5c09012SAndroid Build Coastguard Worker // List of requested dimension values. In a PivotReport, dimension_values 760*d5c09012SAndroid Build Coastguard Worker // are only listed for dimensions included in a pivot. 761*d5c09012SAndroid Build Coastguard Worker repeated DimensionValue dimension_values = 1; 762*d5c09012SAndroid Build Coastguard Worker 763*d5c09012SAndroid Build Coastguard Worker // List of requested visible metric values. 764*d5c09012SAndroid Build Coastguard Worker repeated MetricValue metric_values = 2; 765*d5c09012SAndroid Build Coastguard Worker} 766*d5c09012SAndroid Build Coastguard Worker 767*d5c09012SAndroid Build Coastguard Worker// The value of a dimension. 768*d5c09012SAndroid Build Coastguard Workermessage DimensionValue { 769*d5c09012SAndroid Build Coastguard Worker // One kind of dimension value 770*d5c09012SAndroid Build Coastguard Worker oneof one_value { 771*d5c09012SAndroid Build Coastguard Worker // Value as a string if the dimension type is a string. 772*d5c09012SAndroid Build Coastguard Worker string value = 1; 773*d5c09012SAndroid Build Coastguard Worker } 774*d5c09012SAndroid Build Coastguard Worker} 775*d5c09012SAndroid Build Coastguard Worker 776*d5c09012SAndroid Build Coastguard Worker// The value of a metric. 777*d5c09012SAndroid Build Coastguard Workermessage MetricValue { 778*d5c09012SAndroid Build Coastguard Worker // One of metric value 779*d5c09012SAndroid Build Coastguard Worker oneof one_value { 780*d5c09012SAndroid Build Coastguard Worker // Measurement value. See MetricHeader for type. 781*d5c09012SAndroid Build Coastguard Worker string value = 4; 782*d5c09012SAndroid Build Coastguard Worker } 783*d5c09012SAndroid Build Coastguard Worker} 784*d5c09012SAndroid Build Coastguard Worker 785*d5c09012SAndroid Build Coastguard Worker// To represent a number. 786*d5c09012SAndroid Build Coastguard Workermessage NumericValue { 787*d5c09012SAndroid Build Coastguard Worker // One of a numeric value 788*d5c09012SAndroid Build Coastguard Worker oneof one_value { 789*d5c09012SAndroid Build Coastguard Worker // Integer value 790*d5c09012SAndroid Build Coastguard Worker int64 int64_value = 1; 791*d5c09012SAndroid Build Coastguard Worker 792*d5c09012SAndroid Build Coastguard Worker // Double value 793*d5c09012SAndroid Build Coastguard Worker double double_value = 2; 794*d5c09012SAndroid Build Coastguard Worker } 795*d5c09012SAndroid Build Coastguard Worker} 796*d5c09012SAndroid Build Coastguard Worker 797*d5c09012SAndroid Build Coastguard Worker// Current state of all quotas for this Analytics Property. If any quota for a 798*d5c09012SAndroid Build Coastguard Worker// property is exhausted, all requests to that property will return Resource 799*d5c09012SAndroid Build Coastguard Worker// Exhausted errors. 800*d5c09012SAndroid Build Coastguard Workermessage PropertyQuota { 801*d5c09012SAndroid Build Coastguard Worker // Standard Analytics Properties can use up to 200,000 tokens per day; 802*d5c09012SAndroid Build Coastguard Worker // Analytics 360 Properties can use 2,000,000 tokens per day. Most requests 803*d5c09012SAndroid Build Coastguard Worker // consume fewer than 10 tokens. 804*d5c09012SAndroid Build Coastguard Worker QuotaStatus tokens_per_day = 1; 805*d5c09012SAndroid Build Coastguard Worker 806*d5c09012SAndroid Build Coastguard Worker // Standard Analytics Properties can use up to 40,000 tokens per hour; 807*d5c09012SAndroid Build Coastguard Worker // Analytics 360 Properties can use 400,000 tokens per hour. An API request 808*d5c09012SAndroid Build Coastguard Worker // consumes a single number of tokens, and that number is deducted from all of 809*d5c09012SAndroid Build Coastguard Worker // the hourly, daily, and per project hourly quotas. 810*d5c09012SAndroid Build Coastguard Worker QuotaStatus tokens_per_hour = 2; 811*d5c09012SAndroid Build Coastguard Worker 812*d5c09012SAndroid Build Coastguard Worker // Standard Analytics Properties can send up to 10 concurrent requests; 813*d5c09012SAndroid Build Coastguard Worker // Analytics 360 Properties can use up to 50 concurrent requests. 814*d5c09012SAndroid Build Coastguard Worker QuotaStatus concurrent_requests = 3; 815*d5c09012SAndroid Build Coastguard Worker 816*d5c09012SAndroid Build Coastguard Worker // Standard Analytics Properties and cloud project pairs can have up to 10 817*d5c09012SAndroid Build Coastguard Worker // server errors per hour; Analytics 360 Properties and cloud project pairs 818*d5c09012SAndroid Build Coastguard Worker // can have up to 50 server errors per hour. 819*d5c09012SAndroid Build Coastguard Worker QuotaStatus server_errors_per_project_per_hour = 4; 820*d5c09012SAndroid Build Coastguard Worker 821*d5c09012SAndroid Build Coastguard Worker // Analytics Properties can send up to 120 requests with potentially 822*d5c09012SAndroid Build Coastguard Worker // thresholded dimensions per hour. In a batch request, each report request 823*d5c09012SAndroid Build Coastguard Worker // is individually counted for this quota if the request contains potentially 824*d5c09012SAndroid Build Coastguard Worker // thresholded dimensions. 825*d5c09012SAndroid Build Coastguard Worker QuotaStatus potentially_thresholded_requests_per_hour = 5; 826*d5c09012SAndroid Build Coastguard Worker 827*d5c09012SAndroid Build Coastguard Worker // Analytics Properties can use up to 35% of their tokens per project per 828*d5c09012SAndroid Build Coastguard Worker // hour. This amounts to standard Analytics Properties can use up to 14,000 829*d5c09012SAndroid Build Coastguard Worker // tokens per project per hour, and Analytics 360 Properties can use 140,000 830*d5c09012SAndroid Build Coastguard Worker // tokens per project per hour. An API request consumes a single number of 831*d5c09012SAndroid Build Coastguard Worker // tokens, and that number is deducted from all of the hourly, daily, and per 832*d5c09012SAndroid Build Coastguard Worker // project hourly quotas. 833*d5c09012SAndroid Build Coastguard Worker QuotaStatus tokens_per_project_per_hour = 6; 834*d5c09012SAndroid Build Coastguard Worker} 835*d5c09012SAndroid Build Coastguard Worker 836*d5c09012SAndroid Build Coastguard Worker// Current state for a particular quota group. 837*d5c09012SAndroid Build Coastguard Workermessage QuotaStatus { 838*d5c09012SAndroid Build Coastguard Worker // Quota consumed by this request. 839*d5c09012SAndroid Build Coastguard Worker optional int32 consumed = 1; 840*d5c09012SAndroid Build Coastguard Worker 841*d5c09012SAndroid Build Coastguard Worker // Quota remaining after this request. 842*d5c09012SAndroid Build Coastguard Worker optional int32 remaining = 2; 843*d5c09012SAndroid Build Coastguard Worker} 844*d5c09012SAndroid Build Coastguard Worker 845*d5c09012SAndroid Build Coastguard Worker// Explains a dimension. 846*d5c09012SAndroid Build Coastguard Workermessage DimensionMetadata { 847*d5c09012SAndroid Build Coastguard Worker // This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For 848*d5c09012SAndroid Build Coastguard Worker // example, `eventName`. 849*d5c09012SAndroid Build Coastguard Worker string api_name = 1; 850*d5c09012SAndroid Build Coastguard Worker 851*d5c09012SAndroid Build Coastguard Worker // This dimension's name within the Google Analytics user interface. For 852*d5c09012SAndroid Build Coastguard Worker // example, `Event name`. 853*d5c09012SAndroid Build Coastguard Worker string ui_name = 2; 854*d5c09012SAndroid Build Coastguard Worker 855*d5c09012SAndroid Build Coastguard Worker // Description of how this dimension is used and calculated. 856*d5c09012SAndroid Build Coastguard Worker string description = 3; 857*d5c09012SAndroid Build Coastguard Worker 858*d5c09012SAndroid Build Coastguard Worker // Still usable but deprecated names for this dimension. If populated, this 859*d5c09012SAndroid Build Coastguard Worker // dimension is available by either `apiName` or one of `deprecatedApiNames` 860*d5c09012SAndroid Build Coastguard Worker // for a period of time. After the deprecation period, the dimension will be 861*d5c09012SAndroid Build Coastguard Worker // available only by `apiName`. 862*d5c09012SAndroid Build Coastguard Worker repeated string deprecated_api_names = 4; 863*d5c09012SAndroid Build Coastguard Worker 864*d5c09012SAndroid Build Coastguard Worker // True if the dimension is a custom dimension for this property. 865*d5c09012SAndroid Build Coastguard Worker bool custom_definition = 5; 866*d5c09012SAndroid Build Coastguard Worker 867*d5c09012SAndroid Build Coastguard Worker // The display name of the category that this dimension belongs to. Similar 868*d5c09012SAndroid Build Coastguard Worker // dimensions and metrics are categorized together. 869*d5c09012SAndroid Build Coastguard Worker string category = 7; 870*d5c09012SAndroid Build Coastguard Worker} 871*d5c09012SAndroid Build Coastguard Worker 872*d5c09012SAndroid Build Coastguard Worker// Explains a metric. 873*d5c09012SAndroid Build Coastguard Workermessage MetricMetadata { 874*d5c09012SAndroid Build Coastguard Worker // Justifications for why this metric is blocked. 875*d5c09012SAndroid Build Coastguard Worker enum BlockedReason { 876*d5c09012SAndroid Build Coastguard Worker // Will never be specified in API response. 877*d5c09012SAndroid Build Coastguard Worker BLOCKED_REASON_UNSPECIFIED = 0; 878*d5c09012SAndroid Build Coastguard Worker 879*d5c09012SAndroid Build Coastguard Worker // If present, your access is blocked to revenue related metrics for this 880*d5c09012SAndroid Build Coastguard Worker // property, and this metric is revenue related. 881*d5c09012SAndroid Build Coastguard Worker NO_REVENUE_METRICS = 1; 882*d5c09012SAndroid Build Coastguard Worker 883*d5c09012SAndroid Build Coastguard Worker // If present, your access is blocked to cost related metrics for this 884*d5c09012SAndroid Build Coastguard Worker // property, and this metric is cost related. 885*d5c09012SAndroid Build Coastguard Worker NO_COST_METRICS = 2; 886*d5c09012SAndroid Build Coastguard Worker } 887*d5c09012SAndroid Build Coastguard Worker 888*d5c09012SAndroid Build Coastguard Worker // A metric name. Useable in [Metric](#Metric)'s `name`. For example, 889*d5c09012SAndroid Build Coastguard Worker // `eventCount`. 890*d5c09012SAndroid Build Coastguard Worker string api_name = 1; 891*d5c09012SAndroid Build Coastguard Worker 892*d5c09012SAndroid Build Coastguard Worker // This metric's name within the Google Analytics user interface. For example, 893*d5c09012SAndroid Build Coastguard Worker // `Event count`. 894*d5c09012SAndroid Build Coastguard Worker string ui_name = 2; 895*d5c09012SAndroid Build Coastguard Worker 896*d5c09012SAndroid Build Coastguard Worker // Description of how this metric is used and calculated. 897*d5c09012SAndroid Build Coastguard Worker string description = 3; 898*d5c09012SAndroid Build Coastguard Worker 899*d5c09012SAndroid Build Coastguard Worker // Still usable but deprecated names for this metric. If populated, this 900*d5c09012SAndroid Build Coastguard Worker // metric is available by either `apiName` or one of `deprecatedApiNames` 901*d5c09012SAndroid Build Coastguard Worker // for a period of time. After the deprecation period, the metric will be 902*d5c09012SAndroid Build Coastguard Worker // available only by `apiName`. 903*d5c09012SAndroid Build Coastguard Worker repeated string deprecated_api_names = 4; 904*d5c09012SAndroid Build Coastguard Worker 905*d5c09012SAndroid Build Coastguard Worker // The type of this metric. 906*d5c09012SAndroid Build Coastguard Worker MetricType type = 5; 907*d5c09012SAndroid Build Coastguard Worker 908*d5c09012SAndroid Build Coastguard Worker // The mathematical expression for this derived metric. Can be used in 909*d5c09012SAndroid Build Coastguard Worker // [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics 910*d5c09012SAndroid Build Coastguard Worker // are not expressions, and for non-expressions, this field is empty. 911*d5c09012SAndroid Build Coastguard Worker string expression = 6; 912*d5c09012SAndroid Build Coastguard Worker 913*d5c09012SAndroid Build Coastguard Worker // True if the metric is a custom metric for this property. 914*d5c09012SAndroid Build Coastguard Worker bool custom_definition = 7; 915*d5c09012SAndroid Build Coastguard Worker 916*d5c09012SAndroid Build Coastguard Worker // If reasons are specified, your access is blocked to this metric for this 917*d5c09012SAndroid Build Coastguard Worker // property. API requests from you to this property for this metric will 918*d5c09012SAndroid Build Coastguard Worker // succeed; however, the report will contain only zeros for this metric. API 919*d5c09012SAndroid Build Coastguard Worker // requests with metric filters on blocked metrics will fail. If reasons are 920*d5c09012SAndroid Build Coastguard Worker // empty, you have access to this metric. 921*d5c09012SAndroid Build Coastguard Worker // 922*d5c09012SAndroid Build Coastguard Worker // To learn more, see [Access and data-restriction 923*d5c09012SAndroid Build Coastguard Worker // management](https://support.google.com/analytics/answer/10851388). 924*d5c09012SAndroid Build Coastguard Worker repeated BlockedReason blocked_reasons = 8; 925*d5c09012SAndroid Build Coastguard Worker 926*d5c09012SAndroid Build Coastguard Worker // The display name of the category that this metrics belongs to. Similar 927*d5c09012SAndroid Build Coastguard Worker // dimensions and metrics are categorized together. 928*d5c09012SAndroid Build Coastguard Worker string category = 10; 929*d5c09012SAndroid Build Coastguard Worker} 930*d5c09012SAndroid Build Coastguard Worker 931*d5c09012SAndroid Build Coastguard Worker// The compatibility for a single dimension. 932*d5c09012SAndroid Build Coastguard Workermessage DimensionCompatibility { 933*d5c09012SAndroid Build Coastguard Worker // The dimension metadata contains the API name for this compatibility 934*d5c09012SAndroid Build Coastguard Worker // information. The dimension metadata also contains other helpful information 935*d5c09012SAndroid Build Coastguard Worker // like the UI name and description. 936*d5c09012SAndroid Build Coastguard Worker optional DimensionMetadata dimension_metadata = 1; 937*d5c09012SAndroid Build Coastguard Worker 938*d5c09012SAndroid Build Coastguard Worker // The compatibility of this dimension. If the compatibility is COMPATIBLE, 939*d5c09012SAndroid Build Coastguard Worker // this dimension can be successfully added to the report. 940*d5c09012SAndroid Build Coastguard Worker optional Compatibility compatibility = 2; 941*d5c09012SAndroid Build Coastguard Worker} 942*d5c09012SAndroid Build Coastguard Worker 943*d5c09012SAndroid Build Coastguard Worker// The compatibility for a single metric. 944*d5c09012SAndroid Build Coastguard Workermessage MetricCompatibility { 945*d5c09012SAndroid Build Coastguard Worker // The metric metadata contains the API name for this compatibility 946*d5c09012SAndroid Build Coastguard Worker // information. The metric metadata also contains other helpful information 947*d5c09012SAndroid Build Coastguard Worker // like the UI name and description. 948*d5c09012SAndroid Build Coastguard Worker optional MetricMetadata metric_metadata = 1; 949*d5c09012SAndroid Build Coastguard Worker 950*d5c09012SAndroid Build Coastguard Worker // The compatibility of this metric. If the compatibility is COMPATIBLE, 951*d5c09012SAndroid Build Coastguard Worker // this metric can be successfully added to the report. 952*d5c09012SAndroid Build Coastguard Worker optional Compatibility compatibility = 2; 953*d5c09012SAndroid Build Coastguard Worker} 954*d5c09012SAndroid Build Coastguard Worker 955*d5c09012SAndroid Build Coastguard Worker// Represents aggregation of metrics. 956*d5c09012SAndroid Build Coastguard Workerenum MetricAggregation { 957*d5c09012SAndroid Build Coastguard Worker // Unspecified operator. 958*d5c09012SAndroid Build Coastguard Worker METRIC_AGGREGATION_UNSPECIFIED = 0; 959*d5c09012SAndroid Build Coastguard Worker 960*d5c09012SAndroid Build Coastguard Worker // SUM operator. 961*d5c09012SAndroid Build Coastguard Worker TOTAL = 1; 962*d5c09012SAndroid Build Coastguard Worker 963*d5c09012SAndroid Build Coastguard Worker // Minimum operator. 964*d5c09012SAndroid Build Coastguard Worker MINIMUM = 5; 965*d5c09012SAndroid Build Coastguard Worker 966*d5c09012SAndroid Build Coastguard Worker // Maximum operator. 967*d5c09012SAndroid Build Coastguard Worker MAXIMUM = 6; 968*d5c09012SAndroid Build Coastguard Worker 969*d5c09012SAndroid Build Coastguard Worker // Count operator. 970*d5c09012SAndroid Build Coastguard Worker COUNT = 4; 971*d5c09012SAndroid Build Coastguard Worker} 972*d5c09012SAndroid Build Coastguard Worker 973*d5c09012SAndroid Build Coastguard Worker// A metric's value type. 974*d5c09012SAndroid Build Coastguard Workerenum MetricType { 975*d5c09012SAndroid Build Coastguard Worker // Unspecified type. 976*d5c09012SAndroid Build Coastguard Worker METRIC_TYPE_UNSPECIFIED = 0; 977*d5c09012SAndroid Build Coastguard Worker 978*d5c09012SAndroid Build Coastguard Worker // Integer type. 979*d5c09012SAndroid Build Coastguard Worker TYPE_INTEGER = 1; 980*d5c09012SAndroid Build Coastguard Worker 981*d5c09012SAndroid Build Coastguard Worker // Floating point type. 982*d5c09012SAndroid Build Coastguard Worker TYPE_FLOAT = 2; 983*d5c09012SAndroid Build Coastguard Worker 984*d5c09012SAndroid Build Coastguard Worker // A duration of seconds; a special floating point type. 985*d5c09012SAndroid Build Coastguard Worker TYPE_SECONDS = 4; 986*d5c09012SAndroid Build Coastguard Worker 987*d5c09012SAndroid Build Coastguard Worker // A duration in milliseconds; a special floating point type. 988*d5c09012SAndroid Build Coastguard Worker TYPE_MILLISECONDS = 5; 989*d5c09012SAndroid Build Coastguard Worker 990*d5c09012SAndroid Build Coastguard Worker // A duration in minutes; a special floating point type. 991*d5c09012SAndroid Build Coastguard Worker TYPE_MINUTES = 6; 992*d5c09012SAndroid Build Coastguard Worker 993*d5c09012SAndroid Build Coastguard Worker // A duration in hours; a special floating point type. 994*d5c09012SAndroid Build Coastguard Worker TYPE_HOURS = 7; 995*d5c09012SAndroid Build Coastguard Worker 996*d5c09012SAndroid Build Coastguard Worker // A custom metric of standard type; a special floating point type. 997*d5c09012SAndroid Build Coastguard Worker TYPE_STANDARD = 8; 998*d5c09012SAndroid Build Coastguard Worker 999*d5c09012SAndroid Build Coastguard Worker // An amount of money; a special floating point type. 1000*d5c09012SAndroid Build Coastguard Worker TYPE_CURRENCY = 9; 1001*d5c09012SAndroid Build Coastguard Worker 1002*d5c09012SAndroid Build Coastguard Worker // A length in feet; a special floating point type. 1003*d5c09012SAndroid Build Coastguard Worker TYPE_FEET = 10; 1004*d5c09012SAndroid Build Coastguard Worker 1005*d5c09012SAndroid Build Coastguard Worker // A length in miles; a special floating point type. 1006*d5c09012SAndroid Build Coastguard Worker TYPE_MILES = 11; 1007*d5c09012SAndroid Build Coastguard Worker 1008*d5c09012SAndroid Build Coastguard Worker // A length in meters; a special floating point type. 1009*d5c09012SAndroid Build Coastguard Worker TYPE_METERS = 12; 1010*d5c09012SAndroid Build Coastguard Worker 1011*d5c09012SAndroid Build Coastguard Worker // A length in kilometers; a special floating point type. 1012*d5c09012SAndroid Build Coastguard Worker TYPE_KILOMETERS = 13; 1013*d5c09012SAndroid Build Coastguard Worker} 1014*d5c09012SAndroid Build Coastguard Worker 1015*d5c09012SAndroid Build Coastguard Worker// Categories of data that you may be restricted from viewing on certain GA4 1016*d5c09012SAndroid Build Coastguard Worker// properties. 1017*d5c09012SAndroid Build Coastguard Workerenum RestrictedMetricType { 1018*d5c09012SAndroid Build Coastguard Worker // Unspecified type. 1019*d5c09012SAndroid Build Coastguard Worker RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; 1020*d5c09012SAndroid Build Coastguard Worker 1021*d5c09012SAndroid Build Coastguard Worker // Cost metrics such as `adCost`. 1022*d5c09012SAndroid Build Coastguard Worker COST_DATA = 1; 1023*d5c09012SAndroid Build Coastguard Worker 1024*d5c09012SAndroid Build Coastguard Worker // Revenue metrics such as `purchaseRevenue`. 1025*d5c09012SAndroid Build Coastguard Worker REVENUE_DATA = 2; 1026*d5c09012SAndroid Build Coastguard Worker} 1027*d5c09012SAndroid Build Coastguard Worker 1028*d5c09012SAndroid Build Coastguard Worker// The compatibility types for a single dimension or metric. 1029*d5c09012SAndroid Build Coastguard Workerenum Compatibility { 1030*d5c09012SAndroid Build Coastguard Worker // Unspecified compatibility. 1031*d5c09012SAndroid Build Coastguard Worker COMPATIBILITY_UNSPECIFIED = 0; 1032*d5c09012SAndroid Build Coastguard Worker 1033*d5c09012SAndroid Build Coastguard Worker // The dimension or metric is compatible. This dimension or metric can be 1034*d5c09012SAndroid Build Coastguard Worker // successfully added to a report. 1035*d5c09012SAndroid Build Coastguard Worker COMPATIBLE = 1; 1036*d5c09012SAndroid Build Coastguard Worker 1037*d5c09012SAndroid Build Coastguard Worker // The dimension or metric is incompatible. This dimension or metric cannot be 1038*d5c09012SAndroid Build Coastguard Worker // successfully added to a report. 1039*d5c09012SAndroid Build Coastguard Worker INCOMPATIBLE = 2; 1040*d5c09012SAndroid Build Coastguard Worker} 1041