@google-analytics/data 2.7.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/README.md +40 -19
- package/build/protos/google/analytics/data/v1alpha/analytics_data_api.proto +107 -415
- package/build/protos/google/analytics/data/v1alpha/data.proto +888 -448
- package/build/protos/google/analytics/data/v1beta/data.proto +89 -6
- package/build/protos/protos.d.ts +12012 -9704
- package/build/protos/protos.js +34848 -29013
- package/build/protos/protos.json +3581 -3302
- package/build/src/v1alpha/alpha_analytics_data_client.d.ts +102 -41
- package/build/src/v1alpha/alpha_analytics_data_client.js +26 -390
- package/build/src/v1alpha/alpha_analytics_data_client.js.map +1 -1
- package/build/src/v1alpha/alpha_analytics_data_client_config.json +1 -38
- package/build/src/v1alpha/index.js +2 -1
- package/build/src/v1alpha/index.js.map +1 -1
- package/build/src/v1beta/beta_analytics_data_client.d.ts +409 -16
- package/build/src/v1beta/beta_analytics_data_client.js +29 -381
- package/build/src/v1beta/beta_analytics_data_client.js.map +1 -1
- package/build/src/v1beta/index.js +2 -1
- package/build/src/v1beta/index.js.map +1 -1
- package/package.json +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2022 Google LLC
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -16,6 +16,8 @@ syntax = "proto3";
|
|
|
16
16
|
|
|
17
17
|
package google.analytics.data.v1alpha;
|
|
18
18
|
|
|
19
|
+
import "google/protobuf/duration.proto";
|
|
20
|
+
|
|
19
21
|
option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data";
|
|
20
22
|
option java_multiple_files = true;
|
|
21
23
|
option java_outer_classname = "ReportingApiProto";
|
|
@@ -43,26 +45,19 @@ message DateRange {
|
|
|
43
45
|
string name = 3;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
// The unique identifier of the property whose events are tracked.
|
|
47
|
-
message Entity {
|
|
48
|
-
// A Google Analytics GA4 property id. To learn more, see [where to find your
|
|
49
|
-
// Property
|
|
50
|
-
// ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
|
51
|
-
string property_id = 1;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
48
|
// Dimensions are attributes of your data. For example, the dimension city
|
|
55
49
|
// indicates the city from which an event originates. Dimension values in report
|
|
56
|
-
// responses are strings; for example, city could be "Paris" or "New York".
|
|
57
|
-
// Requests are allowed up to 8 dimensions.
|
|
50
|
+
// responses are strings; for example, the city could be "Paris" or "New York".
|
|
58
51
|
message Dimension {
|
|
59
52
|
// The name of the dimension. See the [API
|
|
60
53
|
// Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
|
|
61
54
|
// for the list of dimension names.
|
|
62
55
|
//
|
|
63
56
|
// If `dimensionExpression` is specified, `name` can be any string that you
|
|
64
|
-
// would like. For example if a
|
|
65
|
-
// and `city`, you could call
|
|
57
|
+
// would like within the allowed character set. For example if a
|
|
58
|
+
// `dimensionExpression` concatenates `country` and `city`, you could call
|
|
59
|
+
// that dimension `countryAndCity`. Dimension names that you choose must match
|
|
60
|
+
// the regular expression `^[a-zA-Z0-9_]$`.
|
|
66
61
|
//
|
|
67
62
|
// Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
|
|
68
63
|
// `dimensionExpression`, and `pivots`.
|
|
@@ -115,35 +110,8 @@ message DimensionExpression {
|
|
|
115
110
|
}
|
|
116
111
|
}
|
|
117
112
|
|
|
118
|
-
//
|
|
119
|
-
//
|
|
120
|
-
// metrics.
|
|
121
|
-
message Metric {
|
|
122
|
-
// The name of the metric. See the [API
|
|
123
|
-
// Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
|
|
124
|
-
// for the list of metric names.
|
|
125
|
-
//
|
|
126
|
-
// If `expression` is specified, `name` can be any string that you would like.
|
|
127
|
-
// For example if `expression` is `screenPageViews/sessions`, you could call
|
|
128
|
-
// that metric's name = `viewsPerSession`.
|
|
129
|
-
//
|
|
130
|
-
// Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
|
|
131
|
-
// `expression`.
|
|
132
|
-
string name = 1;
|
|
133
|
-
|
|
134
|
-
// A mathematical expression for derived metrics. For example, the metric
|
|
135
|
-
// Event count per user is `eventCount/totalUsers`.
|
|
136
|
-
string expression = 2;
|
|
137
|
-
|
|
138
|
-
// Indicates if a metric is invisible in the report response. If a metric is
|
|
139
|
-
// invisible, the metric will not produce a column in the response, but can be
|
|
140
|
-
// used in `metricFilter`, `orderBys`, or a metric `expression`.
|
|
141
|
-
bool invisible = 3;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// To express dimension or metric filters.
|
|
145
|
-
// The fields in the same FilterExpression need to be either all dimensions or
|
|
146
|
-
// all metrics.
|
|
113
|
+
// To express dimension or metric filters. The fields in the same
|
|
114
|
+
// FilterExpression need to be either all dimensions or all metrics.
|
|
147
115
|
message FilterExpression {
|
|
148
116
|
// Specify one type of filter expression for `FilterExpression`.
|
|
149
117
|
oneof expr {
|
|
@@ -156,9 +124,8 @@ message FilterExpression {
|
|
|
156
124
|
// The FilterExpression is NOT of not_expression.
|
|
157
125
|
FilterExpression not_expression = 3;
|
|
158
126
|
|
|
159
|
-
// A primitive filter.
|
|
160
|
-
//
|
|
161
|
-
// dimensions or metrics.
|
|
127
|
+
// A primitive filter. In the same FilterExpression, all of the filter's
|
|
128
|
+
// field names need to be either all dimensions or all metrics.
|
|
162
129
|
Filter filter = 4;
|
|
163
130
|
}
|
|
164
131
|
}
|
|
@@ -171,362 +138,121 @@ message FilterExpressionList {
|
|
|
171
138
|
|
|
172
139
|
// An expression to filter dimension or metric values.
|
|
173
140
|
message Filter {
|
|
174
|
-
// The filter for string
|
|
175
|
-
message StringFilter {
|
|
176
|
-
// The match type of a string filter
|
|
177
|
-
enum MatchType {
|
|
178
|
-
// Unspecified
|
|
179
|
-
MATCH_TYPE_UNSPECIFIED = 0;
|
|
180
|
-
|
|
181
|
-
// Exact match of the string value.
|
|
182
|
-
EXACT = 1;
|
|
183
|
-
|
|
184
|
-
// Begins with the string value.
|
|
185
|
-
BEGINS_WITH = 2;
|
|
186
|
-
|
|
187
|
-
// Ends with the string value.
|
|
188
|
-
ENDS_WITH = 3;
|
|
189
|
-
|
|
190
|
-
// Contains the string value.
|
|
191
|
-
CONTAINS = 4;
|
|
192
|
-
|
|
193
|
-
// Full regular expression match with the string value.
|
|
194
|
-
FULL_REGEXP = 5;
|
|
195
|
-
|
|
196
|
-
// Partial regular expression match with the string value.
|
|
197
|
-
PARTIAL_REGEXP = 6;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// The match type for this filter.
|
|
201
|
-
MatchType match_type = 1;
|
|
202
|
-
|
|
203
|
-
// The string value used for the matching.
|
|
204
|
-
string value = 2;
|
|
205
|
-
|
|
206
|
-
// If true, the string value is case sensitive.
|
|
207
|
-
bool case_sensitive = 3;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
// The result needs to be in a list of string values.
|
|
211
|
-
message InListFilter {
|
|
212
|
-
// The list of string values.
|
|
213
|
-
// Must be non-empty.
|
|
214
|
-
repeated string values = 1;
|
|
215
|
-
|
|
216
|
-
// If true, the string value is case sensitive.
|
|
217
|
-
bool case_sensitive = 2;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
// Filters for numeric or date values.
|
|
221
|
-
message NumericFilter {
|
|
222
|
-
// The operation applied to a numeric filter
|
|
223
|
-
enum Operation {
|
|
224
|
-
// Unspecified.
|
|
225
|
-
OPERATION_UNSPECIFIED = 0;
|
|
226
|
-
|
|
227
|
-
// Equal
|
|
228
|
-
EQUAL = 1;
|
|
229
|
-
|
|
230
|
-
// Less than
|
|
231
|
-
LESS_THAN = 2;
|
|
232
|
-
|
|
233
|
-
// Less than or equal
|
|
234
|
-
LESS_THAN_OR_EQUAL = 3;
|
|
235
|
-
|
|
236
|
-
// Greater than
|
|
237
|
-
GREATER_THAN = 4;
|
|
238
|
-
|
|
239
|
-
// Greater than or equal
|
|
240
|
-
GREATER_THAN_OR_EQUAL = 5;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// The operation type for this filter.
|
|
244
|
-
Operation operation = 1;
|
|
245
|
-
|
|
246
|
-
// A numeric value or a date value.
|
|
247
|
-
NumericValue value = 2;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// To express that the result needs to be between two numbers (inclusive).
|
|
251
|
-
message BetweenFilter {
|
|
252
|
-
// Begins with this number.
|
|
253
|
-
NumericValue from_value = 1;
|
|
254
|
-
|
|
255
|
-
// Ends with this number.
|
|
256
|
-
NumericValue to_value = 2;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
141
|
// The dimension name or metric name. Must be a name defined in dimensions
|
|
260
142
|
// or metrics.
|
|
261
143
|
string field_name = 1;
|
|
262
144
|
|
|
263
145
|
// Specify one type of filter for `Filter`.
|
|
264
146
|
oneof one_filter {
|
|
265
|
-
// A filter for null values. If True, a null dimension value is matched by
|
|
266
|
-
// this filter. Null filter is commonly used inside a NOT filter
|
|
267
|
-
// expression. For example, a NOT expression of a null filter removes rows
|
|
268
|
-
// when a dimension is null.
|
|
269
|
-
bool null_filter = 2;
|
|
270
|
-
|
|
271
147
|
// Strings related filter.
|
|
272
|
-
StringFilter string_filter =
|
|
148
|
+
StringFilter string_filter = 2;
|
|
273
149
|
|
|
274
150
|
// A filter for in list values.
|
|
275
|
-
InListFilter in_list_filter =
|
|
151
|
+
InListFilter in_list_filter = 3;
|
|
276
152
|
|
|
277
153
|
// A filter for numeric or date values.
|
|
278
|
-
NumericFilter numeric_filter =
|
|
154
|
+
NumericFilter numeric_filter = 4;
|
|
279
155
|
|
|
280
|
-
// A filter for two values.
|
|
281
|
-
BetweenFilter between_filter =
|
|
156
|
+
// A filter for between two values.
|
|
157
|
+
BetweenFilter between_filter = 5;
|
|
282
158
|
}
|
|
283
159
|
}
|
|
284
160
|
|
|
285
|
-
// The
|
|
286
|
-
message
|
|
287
|
-
//
|
|
288
|
-
|
|
289
|
-
//
|
|
290
|
-
|
|
291
|
-
}
|
|
161
|
+
// The filter for string
|
|
162
|
+
message StringFilter {
|
|
163
|
+
// The match type of a string filter
|
|
164
|
+
enum MatchType {
|
|
165
|
+
// Unspecified
|
|
166
|
+
MATCH_TYPE_UNSPECIFIED = 0;
|
|
292
167
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
// Rule to order the string dimension values by.
|
|
296
|
-
enum OrderType {
|
|
297
|
-
// Unspecified.
|
|
298
|
-
ORDER_TYPE_UNSPECIFIED = 0;
|
|
299
|
-
|
|
300
|
-
// Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" <
|
|
301
|
-
// "b" < "z".
|
|
302
|
-
ALPHANUMERIC = 1;
|
|
303
|
-
|
|
304
|
-
// Case insensitive alphanumeric sort by lower case Unicode code point.
|
|
305
|
-
// For example, "2" < "A" < "b" < "X" < "z".
|
|
306
|
-
CASE_INSENSITIVE_ALPHANUMERIC = 2;
|
|
307
|
-
|
|
308
|
-
// Dimension values are converted to numbers before sorting. For example
|
|
309
|
-
// in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" <
|
|
310
|
-
// "25". Non-numeric dimension values all have equal ordering value below
|
|
311
|
-
// all numeric values.
|
|
312
|
-
NUMERIC = 3;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
// A dimension name in the request to order by.
|
|
316
|
-
string dimension_name = 1;
|
|
168
|
+
// Exact match of the string value.
|
|
169
|
+
EXACT = 1;
|
|
317
170
|
|
|
318
|
-
//
|
|
319
|
-
|
|
320
|
-
}
|
|
171
|
+
// Begins with the string value.
|
|
172
|
+
BEGINS_WITH = 2;
|
|
321
173
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
// A pair of dimension names and values. Rows with this dimension pivot pair
|
|
325
|
-
// are ordered by the metric's value.
|
|
326
|
-
//
|
|
327
|
-
// For example if pivots = {{"browser", "Chrome"}} and
|
|
328
|
-
// metric_name = "Sessions",
|
|
329
|
-
// then the rows will be sorted based on Sessions in Chrome.
|
|
330
|
-
//
|
|
331
|
-
// ---------|----------|----------------|----------|----------------
|
|
332
|
-
// | Chrome | Chrome | Safari | Safari
|
|
333
|
-
// ---------|----------|----------------|----------|----------------
|
|
334
|
-
// Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions
|
|
335
|
-
// ---------|----------|----------------|----------|----------------
|
|
336
|
-
// US | 2 | 2 | 3 | 1
|
|
337
|
-
// ---------|----------|----------------|----------|----------------
|
|
338
|
-
// Canada | 3 | 1 | 4 | 1
|
|
339
|
-
// ---------|----------|----------------|----------|----------------
|
|
340
|
-
message PivotSelection {
|
|
341
|
-
// Must be a dimension name from the request.
|
|
342
|
-
string dimension_name = 1;
|
|
343
|
-
|
|
344
|
-
// Order by only when the named dimension is this value.
|
|
345
|
-
string dimension_value = 2;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// In the response to order by, order rows by this column. Must be a metric
|
|
349
|
-
// name from the request.
|
|
350
|
-
string metric_name = 1;
|
|
351
|
-
|
|
352
|
-
// Used to select a dimension name and value pivot. If multiple pivot
|
|
353
|
-
// selections are given, the sort occurs on rows where all pivot selection
|
|
354
|
-
// dimension name and value pairs match the row's dimension name and value
|
|
355
|
-
// pair.
|
|
356
|
-
repeated PivotSelection pivot_selections = 2;
|
|
357
|
-
}
|
|
174
|
+
// Ends with the string value.
|
|
175
|
+
ENDS_WITH = 3;
|
|
358
176
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
// Sorts results by a metric's values.
|
|
362
|
-
MetricOrderBy metric = 1;
|
|
177
|
+
// Contains the string value.
|
|
178
|
+
CONTAINS = 4;
|
|
363
179
|
|
|
364
|
-
//
|
|
365
|
-
|
|
180
|
+
// Full match for the regular expression with the string value.
|
|
181
|
+
FULL_REGEXP = 5;
|
|
366
182
|
|
|
367
|
-
//
|
|
368
|
-
|
|
183
|
+
// Partial match for the regular expression with the string value.
|
|
184
|
+
PARTIAL_REGEXP = 6;
|
|
369
185
|
}
|
|
370
186
|
|
|
371
|
-
//
|
|
372
|
-
|
|
187
|
+
// The match type for this filter.
|
|
188
|
+
MatchType match_type = 1;
|
|
189
|
+
|
|
190
|
+
// The string value used for the matching.
|
|
191
|
+
string value = 2;
|
|
192
|
+
|
|
193
|
+
// If true, the string value is case sensitive.
|
|
194
|
+
bool case_sensitive = 3;
|
|
373
195
|
}
|
|
374
196
|
|
|
375
|
-
//
|
|
376
|
-
message
|
|
377
|
-
//
|
|
378
|
-
//
|
|
379
|
-
|
|
380
|
-
// date range from the request.
|
|
381
|
-
repeated string field_names = 1;
|
|
197
|
+
// The result needs to be in a list of string values.
|
|
198
|
+
message InListFilter {
|
|
199
|
+
// The list of string values.
|
|
200
|
+
// Must be non-empty.
|
|
201
|
+
repeated string values = 1;
|
|
382
202
|
|
|
383
|
-
//
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
// Dimensions specified in these OrderBys must be a subset of
|
|
387
|
-
// Pivot.field_names.
|
|
388
|
-
repeated OrderBy order_bys = 2;
|
|
203
|
+
// If true, the string value is case sensitive.
|
|
204
|
+
bool case_sensitive = 2;
|
|
205
|
+
}
|
|
389
206
|
|
|
390
|
-
|
|
391
|
-
|
|
207
|
+
// Filters for numeric or date values.
|
|
208
|
+
message NumericFilter {
|
|
209
|
+
// The operation applied to a numeric filter
|
|
210
|
+
enum Operation {
|
|
211
|
+
// Unspecified.
|
|
212
|
+
OPERATION_UNSPECIFIED = 0;
|
|
392
213
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
int64 limit = 4;
|
|
214
|
+
// Equal
|
|
215
|
+
EQUAL = 1;
|
|
396
216
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
repeated MetricAggregation metric_aggregations = 5;
|
|
400
|
-
}
|
|
217
|
+
// Less than
|
|
218
|
+
LESS_THAN = 2;
|
|
401
219
|
|
|
402
|
-
//
|
|
403
|
-
|
|
404
|
-
// retention for the cohort. For example, you could select the cohort of users
|
|
405
|
-
// that were acquired in the first week of September and follow that cohort for
|
|
406
|
-
// the next six weeks. Selecting the users acquired in the first week of
|
|
407
|
-
// September cohort is specified in the `cohort` object. Following that
|
|
408
|
-
// cohort for the next six weeks is specified in the `cohortsRange` object.
|
|
409
|
-
//
|
|
410
|
-
// The report response could show a weekly time series where say your app has
|
|
411
|
-
// retained 60% of this cohort after three weeks and 25% of this cohort after
|
|
412
|
-
// six weeks. These two percentages can be calculated by the metric
|
|
413
|
-
// `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report.
|
|
414
|
-
message CohortSpec {
|
|
415
|
-
// Defines the selection criteria to group users into cohorts.
|
|
416
|
-
//
|
|
417
|
-
// Most cohort reports define only a single cohort. If multiple cohorts are
|
|
418
|
-
// specified, each cohort can be recognized in the report by their name.
|
|
419
|
-
repeated Cohort cohorts = 1;
|
|
420
|
-
|
|
421
|
-
// Cohort reports follow cohorts over an extended reporting date range. This
|
|
422
|
-
// range specifies an offset duration to follow the cohorts over.
|
|
423
|
-
CohortsRange cohorts_range = 2;
|
|
424
|
-
|
|
425
|
-
// Optional settings for a cohort report.
|
|
426
|
-
CohortReportSettings cohort_report_settings = 3;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
// Defines a cohort selection criteria. A cohort is a group of users who share
|
|
430
|
-
// a common characteristic. For example, users with the same `firstTouchDate`
|
|
431
|
-
// belong to the same cohort.
|
|
432
|
-
message Cohort {
|
|
433
|
-
// Assigns a name to this cohort. The dimension `cohort` is valued to this
|
|
434
|
-
// name in a report response. If set, cannot begin with `cohort_` or
|
|
435
|
-
// `RESERVED_`. If not set, cohorts are named by their zero based index
|
|
436
|
-
// `cohort_0`, `cohort_1`, etc.
|
|
437
|
-
string name = 1;
|
|
220
|
+
// Less than or equal
|
|
221
|
+
LESS_THAN_OR_EQUAL = 3;
|
|
438
222
|
|
|
439
|
-
|
|
440
|
-
|
|
223
|
+
// Greater than
|
|
224
|
+
GREATER_THAN = 4;
|
|
441
225
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
// full date range of event data that is present in a cohort report. In a
|
|
445
|
-
// cohort report, this `dateRange` is extended by the granularity and offset
|
|
446
|
-
// present in the `cohortsRange`; event data for the extended reporting date
|
|
447
|
-
// range is present in a cohort report.
|
|
448
|
-
//
|
|
449
|
-
// In a cohort request, this `dateRange` is required and the `dateRanges` in
|
|
450
|
-
// the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
|
|
451
|
-
//
|
|
452
|
-
// This `dateRange` should generally be aligned with the cohort's granularity.
|
|
453
|
-
// If `CohortsRange` uses daily granularity, this `dateRange` can be a single
|
|
454
|
-
// day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
|
|
455
|
-
// aligned to a week boundary, starting at Sunday and ending Saturday. If
|
|
456
|
-
// `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
|
|
457
|
-
// a month, starting at the first and ending on the last day of the month.
|
|
458
|
-
DateRange date_range = 3;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
// Configures the extended reporting date range for a cohort report. Specifies
|
|
462
|
-
// an offset duration to follow the cohorts over.
|
|
463
|
-
message CohortsRange {
|
|
464
|
-
// The granularity used to interpret the `startOffset` and `endOffset` for the
|
|
465
|
-
// extended reporting date range for a cohort report.
|
|
466
|
-
enum Granularity {
|
|
467
|
-
// Should never be specified.
|
|
468
|
-
GRANULARITY_UNSPECIFIED = 0;
|
|
469
|
-
|
|
470
|
-
// Daily granularity. Commonly used if the cohort's `dateRange` is a single
|
|
471
|
-
// day and the request contains `cohortNthDay`.
|
|
472
|
-
DAILY = 1;
|
|
473
|
-
|
|
474
|
-
// Weekly granularity. Commonly used if the cohort's `dateRange` is a week
|
|
475
|
-
// in duration (starting on Sunday and ending on Saturday) and the request
|
|
476
|
-
// contains `cohortNthWeek`.
|
|
477
|
-
WEEKLY = 2;
|
|
478
|
-
|
|
479
|
-
// Monthly granularity. Commonly used if the cohort's `dateRange` is a month
|
|
480
|
-
// in duration and the request contains `cohortNthMonth`.
|
|
481
|
-
MONTHLY = 3;
|
|
226
|
+
// Greater than or equal
|
|
227
|
+
GREATER_THAN_OR_EQUAL = 5;
|
|
482
228
|
}
|
|
483
229
|
|
|
484
|
-
// The
|
|
485
|
-
|
|
486
|
-
Granularity granularity = 1;
|
|
230
|
+
// The operation type for this filter.
|
|
231
|
+
Operation operation = 1;
|
|
487
232
|
|
|
488
|
-
//
|
|
489
|
-
|
|
490
|
-
// contain data from the acquisition of the cohort forward.
|
|
491
|
-
//
|
|
492
|
-
// If `granularity` is `DAILY`, the `startDate` of the extended reporting date
|
|
493
|
-
// range is `startDate` of the cohort plus `startOffset` days.
|
|
494
|
-
//
|
|
495
|
-
// If `granularity` is `WEEKLY`, the `startDate` of the extended reporting
|
|
496
|
-
// date range is `startDate` of the cohort plus `startOffset * 7` days.
|
|
497
|
-
//
|
|
498
|
-
// If `granularity` is `MONTHLY`, the `startDate` of the extended reporting
|
|
499
|
-
// date range is `startDate` of the cohort plus `startOffset * 30` days.
|
|
500
|
-
int32 start_offset = 2;
|
|
501
|
-
|
|
502
|
-
// `endOffset` specifies the end date of the extended reporting date range
|
|
503
|
-
// for a cohort report. `endOffset` can be any positive integer but is
|
|
504
|
-
// commonly set to 5 to 10 so that reports contain data on the cohort for the
|
|
505
|
-
// next several granularity time periods.
|
|
506
|
-
//
|
|
507
|
-
// If `granularity` is `DAILY`, the `endDate` of the extended reporting date
|
|
508
|
-
// range is `endDate` of the cohort plus `endOffset` days.
|
|
509
|
-
//
|
|
510
|
-
// If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date
|
|
511
|
-
// range is `endDate` of the cohort plus `endOffset * 7` days.
|
|
512
|
-
//
|
|
513
|
-
// If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date
|
|
514
|
-
// range is `endDate` of the cohort plus `endOffset * 30` days.
|
|
515
|
-
int32 end_offset = 3;
|
|
233
|
+
// A numeric value or a date value.
|
|
234
|
+
NumericValue value = 2;
|
|
516
235
|
}
|
|
517
236
|
|
|
518
|
-
//
|
|
519
|
-
message
|
|
520
|
-
//
|
|
521
|
-
|
|
522
|
-
|
|
237
|
+
// To express that the result needs to be between two numbers (inclusive).
|
|
238
|
+
message BetweenFilter {
|
|
239
|
+
// Begins with this number.
|
|
240
|
+
NumericValue from_value = 1;
|
|
241
|
+
|
|
242
|
+
// Ends with this number.
|
|
243
|
+
NumericValue to_value = 2;
|
|
523
244
|
}
|
|
524
245
|
|
|
525
|
-
//
|
|
526
|
-
message
|
|
527
|
-
//
|
|
528
|
-
|
|
529
|
-
|
|
246
|
+
// To represent a number.
|
|
247
|
+
message NumericValue {
|
|
248
|
+
// One of a numeric value
|
|
249
|
+
oneof one_value {
|
|
250
|
+
// Integer value
|
|
251
|
+
int64 int64_value = 1;
|
|
252
|
+
|
|
253
|
+
// Double value
|
|
254
|
+
double double_value = 2;
|
|
255
|
+
}
|
|
530
256
|
}
|
|
531
257
|
|
|
532
258
|
// Describes a dimension column in the report. Dimensions requested in a report
|
|
@@ -550,24 +276,6 @@ message MetricHeader {
|
|
|
550
276
|
MetricType type = 2;
|
|
551
277
|
}
|
|
552
278
|
|
|
553
|
-
// Dimensions' values in a single pivot.
|
|
554
|
-
message PivotHeader {
|
|
555
|
-
// The size is the same as the cardinality of the corresponding dimension
|
|
556
|
-
// combinations.
|
|
557
|
-
repeated PivotDimensionHeader pivot_dimension_headers = 1;
|
|
558
|
-
|
|
559
|
-
// The cardinality of the pivot as if offset = 0 and limit = -1. The total
|
|
560
|
-
// number of rows for this pivot's fields regardless of how the parameters
|
|
561
|
-
// offset and limit are specified in the request.
|
|
562
|
-
int32 row_count = 2;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
// Summarizes dimension values from a row for this pivot.
|
|
566
|
-
message PivotDimensionHeader {
|
|
567
|
-
// Values of multiple dimensions in a pivot.
|
|
568
|
-
repeated DimensionValue dimension_values = 1;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
279
|
// Report data for each row.
|
|
572
280
|
// For example if RunReportRequest contains:
|
|
573
281
|
//
|
|
@@ -632,18 +340,6 @@ message MetricValue {
|
|
|
632
340
|
}
|
|
633
341
|
}
|
|
634
342
|
|
|
635
|
-
// To represent a number.
|
|
636
|
-
message NumericValue {
|
|
637
|
-
// One of a numeric value
|
|
638
|
-
oneof one_value {
|
|
639
|
-
// Integer value
|
|
640
|
-
int64 int64_value = 1;
|
|
641
|
-
|
|
642
|
-
// Double value
|
|
643
|
-
double double_value = 2;
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
|
|
647
343
|
// Current state of all quotas for this Analytics Property. If any quota for a
|
|
648
344
|
// property is exhausted, all requests to that property will return Resource
|
|
649
345
|
// Exhausted errors.
|
|
@@ -653,10 +349,10 @@ message PropertyQuota {
|
|
|
653
349
|
// consume fewer than 10 tokens.
|
|
654
350
|
QuotaStatus tokens_per_day = 1;
|
|
655
351
|
|
|
656
|
-
// Standard Analytics Properties can use up to 5,000 tokens per
|
|
657
|
-
// 360 Properties can use 50,000 tokens per
|
|
658
|
-
// single number of tokens, and that number is deducted from both
|
|
659
|
-
// and daily quotas.
|
|
352
|
+
// Standard Analytics Properties can use up to 5,000 tokens per hour;
|
|
353
|
+
// Analytics 360 Properties can use 50,000 tokens per hour. An API request
|
|
354
|
+
// consumes a single number of tokens, and that number is deducted from both
|
|
355
|
+
// the hourly and daily quotas.
|
|
660
356
|
QuotaStatus tokens_per_hour = 2;
|
|
661
357
|
|
|
662
358
|
// Standard Analytics Properties can send up to 10 concurrent requests;
|
|
@@ -667,6 +363,12 @@ message PropertyQuota {
|
|
|
667
363
|
// server errors per hour; Analytics 360 Properties and cloud project pairs
|
|
668
364
|
// can have up to 50 server errors per hour.
|
|
669
365
|
QuotaStatus server_errors_per_project_per_hour = 4;
|
|
366
|
+
|
|
367
|
+
// Analytics Properties can send up to 120 requests with potentially
|
|
368
|
+
// thresholded dimensions per hour. In a batch request, each report request
|
|
369
|
+
// is individually counted for this quota if the request contains potentially
|
|
370
|
+
// thresholded dimensions.
|
|
371
|
+
QuotaStatus potentially_thresholded_requests_per_hour = 5;
|
|
670
372
|
}
|
|
671
373
|
|
|
672
374
|
// Current state for a particular quota group.
|
|
@@ -678,76 +380,814 @@ message QuotaStatus {
|
|
|
678
380
|
int32 remaining = 2;
|
|
679
381
|
}
|
|
680
382
|
|
|
681
|
-
//
|
|
682
|
-
message
|
|
683
|
-
//
|
|
684
|
-
//
|
|
685
|
-
|
|
383
|
+
// Breakdowns add a dimension to the funnel table sub report response.
|
|
384
|
+
message FunnelBreakdown {
|
|
385
|
+
// The dimension column added to the funnel table sub report response. The
|
|
386
|
+
// breakdown dimension breaks down each funnel step. A valid
|
|
387
|
+
// `breakdownDimension` is required if `funnelBreakdown` is specified.
|
|
388
|
+
Dimension breakdown_dimension = 1;
|
|
389
|
+
|
|
390
|
+
// The maximum number of distinct values of the breakdown dimension to return
|
|
391
|
+
// in the response. A `limit` of `5` is used if limit is not specified. Limit
|
|
392
|
+
// must exceed zero and cannot exceed 15.
|
|
393
|
+
optional int64 limit = 2;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// Next actions state the value for a dimension after the user has achieved
|
|
397
|
+
// a step but before the same user has achieved the next step. For example if
|
|
398
|
+
// the `nextActionDimension` is `eventName`, then `nextActionDimension` in the
|
|
399
|
+
// `i`th funnel step row will return first event after the event that qualified
|
|
400
|
+
// the user into the `i`th funnel step but before the user achieved the `i+1`th
|
|
401
|
+
// funnel step.
|
|
402
|
+
message FunnelNextAction {
|
|
403
|
+
// The dimension column added to the funnel visualization sub report response.
|
|
404
|
+
// The next action dimension returns the next dimension value of this
|
|
405
|
+
// dimension after the user has attained the `i`th funnel step.
|
|
406
|
+
//
|
|
407
|
+
// `nextActionDimension` currently only supports `eventName` and most Page /
|
|
408
|
+
// Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension`
|
|
409
|
+
// cannot be a dimension expression.
|
|
410
|
+
Dimension next_action_dimension = 1;
|
|
411
|
+
|
|
412
|
+
// The maximum number of distinct values of the breakdown dimension to return
|
|
413
|
+
// in the response. A `limit` of `5` is used if limit is not specified. Limit
|
|
414
|
+
// must exceed zero and cannot exceed 5.
|
|
415
|
+
optional int64 limit = 2;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// Configures the funnel in a funnel report request. A funnel reports on users
|
|
419
|
+
// as they pass through a sequence of steps.
|
|
420
|
+
//
|
|
421
|
+
// Funnel exploration lets you visualize the steps your users take to complete a
|
|
422
|
+
// task and quickly see how well they are succeeding or failing at each step.
|
|
423
|
+
// For example, how do prospects become shoppers and then become buyers? How do
|
|
424
|
+
// one time buyers become repeat buyers? With this information, you can improve
|
|
425
|
+
// inefficient or abandoned customer journeys.
|
|
426
|
+
message Funnel {
|
|
427
|
+
// In an open funnel, users can enter the funnel in any step, and in a closed
|
|
428
|
+
// funnel, users must enter the funnel in the first step. Optional. If
|
|
429
|
+
// unspecified, a closed funnel is used.
|
|
430
|
+
bool is_open_funnel = 1;
|
|
431
|
+
|
|
432
|
+
// The sequential steps of this funnel.
|
|
433
|
+
repeated FunnelStep steps = 2;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// Steps define the user journey you want to measure. Steps contain one or
|
|
437
|
+
// more conditions that your users must meet to be included in that step of
|
|
438
|
+
// the funnel journey.
|
|
439
|
+
message FunnelStep {
|
|
440
|
+
// The distinctive name for this step. If unspecified, steps will be named
|
|
441
|
+
// by a 1 based indexed name (i.e. "0. ", "1. ", etc.). This name defines
|
|
442
|
+
// string value returned by the `funnelStepName` dimension. For example,
|
|
443
|
+
// specifying `name = Purchase` in the request's third funnel step will
|
|
444
|
+
// produce `3. Purchase` in the funnel report response.
|
|
445
|
+
string name = 1;
|
|
446
|
+
|
|
447
|
+
// If true, this step must directly follow the previous step. If false,
|
|
448
|
+
// there can be events between the previous step and this step. If
|
|
449
|
+
// unspecified, `isDirectlyFollowedBy` is treated as false.
|
|
450
|
+
bool is_directly_followed_by = 2;
|
|
451
|
+
|
|
452
|
+
// If specified, this step must complete within this duration of the
|
|
453
|
+
// completion of the prior step. `withinDurationFromPriorStep` is inclusive
|
|
454
|
+
// of the endpoint at the microsecond granularity. For example a duration of
|
|
455
|
+
// 5 seconds can be completed at 4.9 or 5.0 seconds, but not 5 seconds and 1
|
|
456
|
+
// microsecond.
|
|
457
|
+
//
|
|
458
|
+
// `withinDurationFromPriorStep` is optional, and if unspecified, steps may
|
|
459
|
+
// be separated by any time duration.
|
|
460
|
+
optional google.protobuf.Duration within_duration_from_prior_step = 3;
|
|
461
|
+
|
|
462
|
+
// The condition that your users must meet to be included in this step of
|
|
463
|
+
// the funnel journey.
|
|
464
|
+
FunnelFilterExpression filter_expression = 4;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
// Funnel sub reports contain the dimension and metric data values. For example,
|
|
468
|
+
// 12 users reached the second step of the funnel.
|
|
469
|
+
message FunnelSubReport {
|
|
470
|
+
// Describes dimension columns. Funnel reports always include the funnel step
|
|
471
|
+
// dimension in sub report responses. Additional dimensions like breakdowns,
|
|
472
|
+
// dates, and next actions may be present in the response if requested.
|
|
473
|
+
repeated DimensionHeader dimension_headers = 1;
|
|
474
|
+
|
|
475
|
+
// Describes metric columns. Funnel reports always include active users in sub
|
|
476
|
+
// report responses. The funnel table includes additional metrics like
|
|
477
|
+
// completion rate, abandonments, and abandonments rate.
|
|
478
|
+
repeated MetricHeader metric_headers = 2;
|
|
479
|
+
|
|
480
|
+
// Rows of dimension value combinations and metric values in the report.
|
|
481
|
+
repeated Row rows = 3;
|
|
482
|
+
|
|
483
|
+
// Metadata for the funnel report.
|
|
484
|
+
FunnelResponseMetadata metadata = 4;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
// User segments are subsets of users who engaged with your site or app. For
|
|
488
|
+
// example, users who have previously purchased; users who added items to their
|
|
489
|
+
// shopping carts, but didn’t complete a purchase.
|
|
490
|
+
message UserSegment {
|
|
491
|
+
// Defines which users are included in this segment. Optional.
|
|
492
|
+
UserSegmentCriteria user_inclusion_criteria = 1;
|
|
686
493
|
|
|
687
|
-
//
|
|
688
|
-
|
|
689
|
-
|
|
494
|
+
// Defines which users are excluded in this segment. Optional.
|
|
495
|
+
UserSegmentExclusion exclusion = 2;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
// A user matches a criteria if the user's events meet the conditions in the
|
|
499
|
+
// criteria.
|
|
500
|
+
message UserSegmentCriteria {
|
|
501
|
+
// A user matches this criteria if the user matches each of these
|
|
502
|
+
// `andConditionGroups` and each of the `andSequenceGroups`.
|
|
503
|
+
// `andConditionGroups` may be empty if `andSequenceGroups` are specified.
|
|
504
|
+
repeated UserSegmentConditionGroup and_condition_groups = 1;
|
|
505
|
+
|
|
506
|
+
// A user matches this criteria if the user matches each of these
|
|
507
|
+
// `andSequenceGroups` and each of the `andConditionGroups`.
|
|
508
|
+
// `andSequenceGroups` may be empty if `andConditionGroups` are specified.
|
|
509
|
+
repeated UserSegmentSequenceGroup and_sequence_groups = 2;
|
|
510
|
+
}
|
|
690
511
|
|
|
691
|
-
|
|
692
|
-
|
|
512
|
+
// Scoping specifies which events are considered when evaluating if a user
|
|
513
|
+
// meets a criteria.
|
|
514
|
+
enum UserCriteriaScoping {
|
|
515
|
+
// Unspecified criteria scoping. Do not specify.
|
|
516
|
+
USER_CRITERIA_SCOPING_UNSPECIFIED = 0;
|
|
693
517
|
|
|
694
|
-
//
|
|
695
|
-
//
|
|
696
|
-
|
|
697
|
-
// available only by `apiName`.
|
|
698
|
-
repeated string deprecated_api_names = 4;
|
|
518
|
+
// If the criteria is satisfied within one event, the user matches the
|
|
519
|
+
// criteria.
|
|
520
|
+
USER_CRITERIA_WITHIN_SAME_EVENT = 1;
|
|
699
521
|
|
|
700
|
-
//
|
|
701
|
-
|
|
522
|
+
// If the criteria is satisfied within one session, the user matches the
|
|
523
|
+
// criteria.
|
|
524
|
+
USER_CRITERIA_WITHIN_SAME_SESSION = 2;
|
|
525
|
+
|
|
526
|
+
// If the criteria is satisfied by any events for the user, the user
|
|
527
|
+
// matches the criteria.
|
|
528
|
+
USER_CRITERIA_ACROSS_ALL_SESSIONS = 3;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
// Conditions tell Analytics what data to include in or exclude from the
|
|
532
|
+
// segment.
|
|
533
|
+
message UserSegmentConditionGroup {
|
|
534
|
+
// Data is included or excluded from the segment based on if it matches
|
|
535
|
+
// the condition group. This scoping defines how many events the
|
|
536
|
+
// `segmentFilterExpression` is evaluated on before the condition group
|
|
537
|
+
// is determined to be matched or not. For example if `conditionScoping =
|
|
538
|
+
// USER_CRITERIA_WITHIN_SAME_SESSION`, the expression is evaluated on all
|
|
539
|
+
// events in a session, and then, the condition group is determined to be
|
|
540
|
+
// matched or not for this user. For example if `conditionScoping =
|
|
541
|
+
// USER_CRITERIA_WITHIN_SAME_EVENT`, the expression is evaluated on a single
|
|
542
|
+
// event, and then, the condition group is determined to be matched or not for
|
|
543
|
+
// this user.
|
|
544
|
+
//
|
|
545
|
+
// Optional. If unspecified, `conditionScoping = ACROSS_ALL_SESSIONS` is
|
|
546
|
+
// used.
|
|
547
|
+
UserCriteriaScoping condition_scoping = 1;
|
|
548
|
+
|
|
549
|
+
// Data is included or excluded from the segment based on if it matches
|
|
550
|
+
// this expression. Expressions express criteria on dimension, metrics,
|
|
551
|
+
// and/or parameters.
|
|
552
|
+
SegmentFilterExpression segment_filter_expression = 2;
|
|
702
553
|
}
|
|
703
554
|
|
|
704
|
-
//
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
//
|
|
708
|
-
|
|
555
|
+
// Define conditions that must occur in a specific order for the user to be
|
|
556
|
+
// a member of the segment.
|
|
557
|
+
message UserSegmentSequenceGroup {
|
|
558
|
+
// All sequence steps must be satisfied in the scoping for the user to
|
|
559
|
+
// match the sequence. For example if `sequenceScoping =
|
|
560
|
+
// USER_CRITERIA_WITHIN_SAME_SESSION`, all sequence steps must complete within
|
|
561
|
+
// one session for the user to match the sequence. `sequenceScoping =
|
|
562
|
+
// USER_CRITERIA_WITHIN_SAME_EVENT` is not supported.
|
|
563
|
+
//
|
|
564
|
+
// Optional. If unspecified, `conditionScoping = ACROSS_ALL_SESSIONS` is
|
|
565
|
+
// used.
|
|
566
|
+
UserCriteriaScoping sequence_scoping = 1;
|
|
567
|
+
|
|
568
|
+
// Defines the time period in which the whole sequence must occur; for
|
|
569
|
+
// example, 30 Minutes. `sequenceMaximumDuration` is inclusive
|
|
570
|
+
// of the endpoint at the microsecond granularity. For example a sequence
|
|
571
|
+
// with a maximum duration of 5 seconds can be completed at 4.9 or 5.0
|
|
572
|
+
// seconds, but not 5 seconds and 1 microsecond.
|
|
573
|
+
//
|
|
574
|
+
// `sequenceMaximumDuration` is optional, and if unspecified, sequences can
|
|
575
|
+
// be completed in any time duration.
|
|
576
|
+
google.protobuf.Duration sequence_maximum_duration = 2;
|
|
577
|
+
|
|
578
|
+
// An ordered sequence of condition steps. A user's events must complete
|
|
579
|
+
// each step in order for the user to match the
|
|
580
|
+
// `UserSegmentSequenceGroup`.
|
|
581
|
+
repeated UserSequenceStep user_sequence_steps = 3;
|
|
582
|
+
}
|
|
709
583
|
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
584
|
+
// A condition that must occur in the specified step order for this user
|
|
585
|
+
// to match the sequence.
|
|
586
|
+
message UserSequenceStep {
|
|
587
|
+
// If true, the event satisfying this step must be the very next event
|
|
588
|
+
// after the event satifying the last step. If false, this step indirectly
|
|
589
|
+
// follows the prior step; for example, there may be events between the
|
|
590
|
+
// prior step and this step. `isDirectlyFollowedBy` must be false for
|
|
591
|
+
// the first step.
|
|
592
|
+
bool is_directly_followed_by = 1;
|
|
593
|
+
|
|
594
|
+
// This sequence step must be satisfied in the scoping for the user to
|
|
595
|
+
// match the sequence. For example if `sequenceScoping =
|
|
596
|
+
// WITHIN_SAME_SESSION`, this sequence steps must complete within one
|
|
597
|
+
// session for the user to match the sequence. `stepScoping =
|
|
598
|
+
// ACROSS_ALL_SESSIONS` is only allowed if the `sequenceScoping =
|
|
599
|
+
// ACROSS_ALL_SESSIONS`.
|
|
600
|
+
//
|
|
601
|
+
// Optional. If unspecified, `stepScoping` uses the same
|
|
602
|
+
// `UserCriteriaScoping` as the `sequenceScoping`.
|
|
603
|
+
UserCriteriaScoping step_scoping = 2;
|
|
604
|
+
|
|
605
|
+
// A user matches this sequence step if their events match this
|
|
606
|
+
// expression. Expressions express criteria on dimension, metrics,
|
|
607
|
+
// and/or parameters.
|
|
608
|
+
SegmentFilterExpression segment_filter_expression = 3;
|
|
609
|
+
}
|
|
713
610
|
|
|
714
|
-
|
|
715
|
-
|
|
611
|
+
// Specifies which users are excluded in this segment.
|
|
612
|
+
message UserSegmentExclusion {
|
|
613
|
+
// Specifies how long an exclusion will last if a user matches the
|
|
614
|
+
// `userExclusionCriteria`.
|
|
615
|
+
//
|
|
616
|
+
// Optional. If unspecified, `userExclusionDuration` of
|
|
617
|
+
// `USER_EXCLUSION_TEMPORARY` is used.
|
|
618
|
+
UserExclusionDuration user_exclusion_duration = 1;
|
|
716
619
|
|
|
717
|
-
//
|
|
718
|
-
//
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
repeated string deprecated_api_names = 4;
|
|
620
|
+
// If a user meets this condition, the user is excluded from membership in
|
|
621
|
+
// the segment for the `userExclusionDuration`.
|
|
622
|
+
UserSegmentCriteria user_exclusion_criteria = 2;
|
|
623
|
+
}
|
|
722
624
|
|
|
723
|
-
|
|
724
|
-
|
|
625
|
+
// Enumerates options for how long an exclusion will last if a user matches
|
|
626
|
+
// the `userExclusionCriteria`.
|
|
627
|
+
enum UserExclusionDuration {
|
|
628
|
+
// Unspecified exclusion duration. Do not specify.
|
|
629
|
+
USER_EXCLUSION_DURATION_UNSPECIFIED = 0;
|
|
725
630
|
|
|
726
|
-
//
|
|
727
|
-
//
|
|
728
|
-
|
|
729
|
-
string expression = 6;
|
|
631
|
+
// Temporarily exclude users from the segment during periods when the
|
|
632
|
+
// user meets the `userExclusionCriteria` condition.
|
|
633
|
+
USER_EXCLUSION_TEMPORARY = 1;
|
|
730
634
|
|
|
731
|
-
//
|
|
732
|
-
|
|
635
|
+
// Permanently exclude users from the segment if the user ever meets the
|
|
636
|
+
// `userExclusionCriteria` condition.
|
|
637
|
+
USER_EXCLUSION_PERMANENT = 2;
|
|
733
638
|
}
|
|
734
639
|
|
|
735
|
-
//
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
640
|
+
// Session segments are subsets of the sessions that occurred on your site or
|
|
641
|
+
// app: for example, all the sessions that originated from a particular
|
|
642
|
+
// advertising campaign.
|
|
643
|
+
message SessionSegment {
|
|
644
|
+
// Defines which sessions are included in this segment. Optional.
|
|
645
|
+
SessionSegmentCriteria session_inclusion_criteria = 1;
|
|
739
646
|
|
|
740
|
-
//
|
|
741
|
-
|
|
647
|
+
// Defines which sessions are excluded in this segment. Optional.
|
|
648
|
+
SessionSegmentExclusion exclusion = 2;
|
|
649
|
+
}
|
|
742
650
|
|
|
743
|
-
|
|
744
|
-
|
|
651
|
+
// A session matches a criteria if the session's events meet the conditions in
|
|
652
|
+
// the criteria.
|
|
653
|
+
message SessionSegmentCriteria {
|
|
654
|
+
// A session matches this criteria if the session matches each of these
|
|
655
|
+
// `andConditionGroups`.
|
|
656
|
+
repeated SessionSegmentConditionGroup and_condition_groups = 1;
|
|
657
|
+
}
|
|
745
658
|
|
|
746
|
-
|
|
747
|
-
|
|
659
|
+
// Scoping specifies which events are considered when evaluating if a
|
|
660
|
+
// session meets a criteria.
|
|
661
|
+
enum SessionCriteriaScoping {
|
|
662
|
+
// Unspecified criteria scoping. Do not specify.
|
|
663
|
+
SESSION_CRITERIA_SCOPING_UNSPECIFIED = 0;
|
|
664
|
+
|
|
665
|
+
// If the criteria is satisfied within one event, the session matches the
|
|
666
|
+
// criteria.
|
|
667
|
+
SESSION_CRITERIA_WITHIN_SAME_EVENT = 1;
|
|
668
|
+
|
|
669
|
+
// If the criteria is satisfied within one session, the session matches
|
|
670
|
+
// the criteria.
|
|
671
|
+
SESSION_CRITERIA_WITHIN_SAME_SESSION = 2;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
// Conditions tell Analytics what data to include in or exclude from the
|
|
675
|
+
// segment.
|
|
676
|
+
message SessionSegmentConditionGroup {
|
|
677
|
+
// Data is included or excluded from the segment based on if it matches
|
|
678
|
+
// the condition group. This scoping defines how many events the
|
|
679
|
+
// `segmentFilterExpression` is evaluated on before the condition group
|
|
680
|
+
// is determined to be matched or not. For example if `conditionScoping =
|
|
681
|
+
// SESSION_CRITERIA_WITHIN_SAME_SESSION`, the expression is evaluated on all
|
|
682
|
+
// events in a session, and then, the condition group is determined to be
|
|
683
|
+
// matched or not for this session. For example if `conditionScoping =
|
|
684
|
+
// SESSION_CRITERIA_WITHIN_SAME_EVENT`, the expression is evaluated on a
|
|
685
|
+
// single event, and then, the condition group is determined to be matched or
|
|
686
|
+
// not for this session.
|
|
687
|
+
//
|
|
688
|
+
// Optional. If unspecified, a `conditionScoping` of `WITHIN_SAME_SESSION`
|
|
689
|
+
// is used.
|
|
690
|
+
SessionCriteriaScoping condition_scoping = 1;
|
|
691
|
+
|
|
692
|
+
// Data is included or excluded from the segment based on if it matches
|
|
693
|
+
// this expression. Expressions express criteria on dimension, metrics,
|
|
694
|
+
// and/or parameters.
|
|
695
|
+
SegmentFilterExpression segment_filter_expression = 2;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
// Specifies which sessions are excluded in this segment.
|
|
699
|
+
message SessionSegmentExclusion {
|
|
700
|
+
// Specifies how long an exclusion will last if a session matches the
|
|
701
|
+
// `sessionExclusionCriteria`.
|
|
702
|
+
//
|
|
703
|
+
// Optional. If unspecified, a `sessionExclusionDuration` of
|
|
704
|
+
// `SESSION_EXCLUSION_TEMPORARY` is used.
|
|
705
|
+
SessionExclusionDuration session_exclusion_duration = 1;
|
|
706
|
+
|
|
707
|
+
// If a session meets this condition, the session is excluded from
|
|
708
|
+
// membership in the segment for the `sessionExclusionDuration`.
|
|
709
|
+
SessionSegmentCriteria session_exclusion_criteria = 2;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
// Enumerates options for how long an exclusion will last if a session
|
|
713
|
+
// matches the `sessionExclusionCriteria`.
|
|
714
|
+
enum SessionExclusionDuration {
|
|
715
|
+
// Unspecified exclusion duration. Do not specify.
|
|
716
|
+
SESSION_EXCLUSION_DURATION_UNSPECIFIED = 0;
|
|
717
|
+
|
|
718
|
+
// Temporarily exclude sessions from the segment during periods when the
|
|
719
|
+
// session meets the `sessionExclusionCriteria` condition.
|
|
720
|
+
SESSION_EXCLUSION_TEMPORARY = 1;
|
|
721
|
+
|
|
722
|
+
// Permanently exclude sessions from the segment if the session ever meets
|
|
723
|
+
// the `sessionExclusionCriteria` condition.
|
|
724
|
+
SESSION_EXCLUSION_PERMANENT = 2;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
// Event segments are subsets of events that were triggered on your site or app.
|
|
728
|
+
// for example, all purchase events made in a particular location; app_exception
|
|
729
|
+
// events that occurred on a specific operating system.
|
|
730
|
+
message EventSegment {
|
|
731
|
+
// Defines which events are included in this segment. Optional.
|
|
732
|
+
EventSegmentCriteria event_inclusion_criteria = 1;
|
|
733
|
+
|
|
734
|
+
// Defines which events are excluded in this segment. Optional.
|
|
735
|
+
EventSegmentExclusion exclusion = 2;
|
|
736
|
+
}
|
|
748
737
|
|
|
749
|
-
|
|
750
|
-
|
|
738
|
+
// An event matches a criteria if the event meet the conditions in the
|
|
739
|
+
// criteria.
|
|
740
|
+
message EventSegmentCriteria {
|
|
741
|
+
// An event matches this criteria if the event matches each of these
|
|
742
|
+
// `andConditionGroups`.
|
|
743
|
+
repeated EventSegmentConditionGroup and_condition_groups = 1;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
// Scoping specifies which events are considered when evaluating if an event
|
|
747
|
+
// meets a criteria.
|
|
748
|
+
enum EventCriteriaScoping {
|
|
749
|
+
// Unspecified criteria scoping. Do not specify.
|
|
750
|
+
EVENT_CRITERIA_SCOPING_UNSPECIFIED = 0;
|
|
751
|
+
|
|
752
|
+
// If the criteria is satisfied within one event, the event matches the
|
|
753
|
+
// criteria.
|
|
754
|
+
EVENT_CRITERIA_WITHIN_SAME_EVENT = 1;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
// Conditions tell Analytics what data to include in or exclude from the
|
|
758
|
+
// segment.
|
|
759
|
+
message EventSegmentConditionGroup {
|
|
760
|
+
// `conditionScoping` should always be `EVENT_CRITERIA_WITHIN_SAME_EVENT`.
|
|
761
|
+
//
|
|
762
|
+
// Optional. If unspecified, a `conditionScoping` of
|
|
763
|
+
// `EVENT_CRITERIA_WITHIN_SAME_EVENT` is used.
|
|
764
|
+
EventCriteriaScoping condition_scoping = 1;
|
|
765
|
+
|
|
766
|
+
// Data is included or excluded from the segment based on if it matches
|
|
767
|
+
// this expression. Expressions express criteria on dimension, metrics,
|
|
768
|
+
// and/or parameters.
|
|
769
|
+
SegmentFilterExpression segment_filter_expression = 2;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
// Specifies which events are excluded in this segment.
|
|
773
|
+
message EventSegmentExclusion {
|
|
774
|
+
// `eventExclusionDuration` should always be `PERMANENTLY_EXCLUDE`.
|
|
775
|
+
//
|
|
776
|
+
// Optional. If unspecified, an `eventExclusionDuration` of
|
|
777
|
+
// `EVENT_EXCLUSION_PERMANENT` is used.
|
|
778
|
+
EventExclusionDuration event_exclusion_duration = 1;
|
|
779
|
+
|
|
780
|
+
// If an event meets this condition, the event is excluded from membership
|
|
781
|
+
// in the segment for the `eventExclusionDuration`.
|
|
782
|
+
EventSegmentCriteria event_exclusion_criteria = 2;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
// Enumerates options for how long an exclusion will last if an event
|
|
786
|
+
// matches the `eventExclusionCriteria`.
|
|
787
|
+
enum EventExclusionDuration {
|
|
788
|
+
// Unspecified exclusion duration. Do not specify.
|
|
789
|
+
EVENT_EXCLUSION_DURATION_UNSPECIFIED = 0;
|
|
790
|
+
|
|
791
|
+
// Permanently exclude events from the segment if the event ever meets
|
|
792
|
+
// the `eventExclusionCriteria` condition.
|
|
793
|
+
EVENT_EXCLUSION_PERMANENT = 1;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
// A segment is a subset of your Analytics data. For example, of your entire set
|
|
797
|
+
// of users, one segment might be users from a particular country or city.
|
|
798
|
+
// Another segment might be users who purchase a particular line of products or
|
|
799
|
+
// who visit a specific part of your site or trigger certain events in your app.
|
|
800
|
+
//
|
|
801
|
+
// To learn more, see [GA4 Segment
|
|
802
|
+
// Builder](https://support.google.com/analytics/answer/9304353).
|
|
803
|
+
message Segment {
|
|
804
|
+
// The name for this segment. If unspecified, segments are named "Segment".
|
|
805
|
+
// This name defines string value returned by the `segment` dimension. The
|
|
806
|
+
// `segment` dimension prefixes segment names by the 1-based index number of
|
|
807
|
+
// the segment in the request (i.e. "1. Segment", "2. Segment", etc.).
|
|
808
|
+
string name = 1;
|
|
809
|
+
|
|
810
|
+
// A segment is specified in one scope.
|
|
811
|
+
oneof one_segment_scope {
|
|
812
|
+
// User segments are subsets of users who engaged with your site or app.
|
|
813
|
+
UserSegment user_segment = 2;
|
|
814
|
+
|
|
815
|
+
// Session segments are subsets of the sessions that occurred on your site
|
|
816
|
+
// or app.
|
|
817
|
+
SessionSegment session_segment = 3;
|
|
818
|
+
|
|
819
|
+
// Event segments are subsets of events that were triggered on your site or
|
|
820
|
+
// app.
|
|
821
|
+
EventSegment event_segment = 4;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
// Expresses combinations of segment filters.
|
|
826
|
+
message SegmentFilterExpression {
|
|
827
|
+
// Specify one type of filter for `SegmentFilterExpression`.
|
|
828
|
+
oneof expr {
|
|
829
|
+
// The SegmentFilterExpression in `andGroup` have an AND relationship.
|
|
830
|
+
SegmentFilterExpressionList and_group = 1;
|
|
831
|
+
|
|
832
|
+
// The SegmentFilterExpression in `orGroup` have an OR relationship.
|
|
833
|
+
SegmentFilterExpressionList or_group = 2;
|
|
834
|
+
|
|
835
|
+
// The SegmentFilterExpression is NOT of `notExpression`.
|
|
836
|
+
SegmentFilterExpression not_expression = 3;
|
|
837
|
+
|
|
838
|
+
// A primitive segment filter.
|
|
839
|
+
SegmentFilter segment_filter = 4;
|
|
840
|
+
|
|
841
|
+
// Creates a filter that matches events of a single event name. If a
|
|
842
|
+
// parameter filter expression is specified, only the subset of events that
|
|
843
|
+
// match both the single event name and the parameter filter expressions
|
|
844
|
+
// match this event filter.
|
|
845
|
+
SegmentEventFilter segment_event_filter = 5;
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
// A list of segment filter expressions.
|
|
850
|
+
message SegmentFilterExpressionList {
|
|
851
|
+
// The list of segment filter expressions
|
|
852
|
+
repeated SegmentFilterExpression expressions = 1;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
// An expression to filter dimension or metric values.
|
|
856
|
+
message SegmentFilter {
|
|
857
|
+
// The dimension name or metric name.
|
|
858
|
+
string field_name = 1;
|
|
859
|
+
|
|
860
|
+
// Specify one type of filter for `Filter`.
|
|
861
|
+
oneof one_filter {
|
|
862
|
+
// Strings related filter.
|
|
863
|
+
StringFilter string_filter = 4;
|
|
864
|
+
|
|
865
|
+
// A filter for in list values.
|
|
866
|
+
InListFilter in_list_filter = 5;
|
|
867
|
+
|
|
868
|
+
// A filter for numeric or date values.
|
|
869
|
+
NumericFilter numeric_filter = 6;
|
|
870
|
+
|
|
871
|
+
// A filter for between two values.
|
|
872
|
+
BetweenFilter between_filter = 7;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
// Specifies the scope for the filter.
|
|
876
|
+
SegmentFilterScoping filter_scoping = 8;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
// Scopings specify how the dimensions & metrics of multiple events
|
|
880
|
+
// should be considered when evaluating a segment filter.
|
|
881
|
+
message SegmentFilterScoping {
|
|
882
|
+
// If `atAnyPointInTime` is true, this filter evaluates to true for all
|
|
883
|
+
// events if it evaluates to true for any event in the date range of the
|
|
884
|
+
// request.
|
|
885
|
+
//
|
|
886
|
+
// This `atAnyPointInTime` parameter does not extend the date range of
|
|
887
|
+
// events in the report. If `atAnyPointInTime` is true, only events within
|
|
888
|
+
// the report's date range are considered when evaluating this filter.
|
|
889
|
+
//
|
|
890
|
+
// This `atAnyPointInTime` is only able to be specified if the criteria
|
|
891
|
+
// scoping is `ACROSS_ALL_SESSIONS` and is not able to be specified in
|
|
892
|
+
// sequences.
|
|
893
|
+
//
|
|
894
|
+
// If the criteria scoping is `ACROSS_ALL_SESSIONS`, `atAnyPointInTime` =
|
|
895
|
+
// false is used if unspecified.
|
|
896
|
+
optional bool at_any_point_in_time = 1;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
// Creates a filter that matches events of a single event name. If a parameter
|
|
900
|
+
// filter expression is specified, only the subset of events that match both the
|
|
901
|
+
// single event name and the parameter filter expressions match this event
|
|
902
|
+
// filter.
|
|
903
|
+
message SegmentEventFilter {
|
|
904
|
+
// This filter matches events of this single event name. Event name is
|
|
905
|
+
// required.
|
|
906
|
+
optional string event_name = 1;
|
|
907
|
+
|
|
908
|
+
// If specified, this filter matches events that match both the single event
|
|
909
|
+
// name and the parameter filter expressions.
|
|
910
|
+
//
|
|
911
|
+
// Inside the parameter filter expression, only parameter filters are
|
|
912
|
+
// available.
|
|
913
|
+
optional SegmentParameterFilterExpression segment_parameter_filter_expression = 2;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
// Expresses combinations of segment filter on parameters.
|
|
917
|
+
message SegmentParameterFilterExpression {
|
|
918
|
+
// Specify one type of filter for `SegmentParameterFilterExpression`.
|
|
919
|
+
oneof expr {
|
|
920
|
+
// The SegmentParameterFilterExpression in `andGroup` have an AND
|
|
921
|
+
// relationship.
|
|
922
|
+
SegmentParameterFilterExpressionList and_group = 1;
|
|
923
|
+
|
|
924
|
+
// The SegmentParameterFilterExpression in `orGroup` have an OR
|
|
925
|
+
// relationship.
|
|
926
|
+
SegmentParameterFilterExpressionList or_group = 2;
|
|
927
|
+
|
|
928
|
+
// The SegmentParameterFilterExpression is NOT of `notExpression`.
|
|
929
|
+
SegmentParameterFilterExpression not_expression = 3;
|
|
930
|
+
|
|
931
|
+
// A primitive segment parameter filter.
|
|
932
|
+
SegmentParameterFilter segment_parameter_filter = 4;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
// A list of segment parameter filter expressions.
|
|
937
|
+
message SegmentParameterFilterExpressionList {
|
|
938
|
+
// The list of segment parameter filter expressions.
|
|
939
|
+
repeated SegmentParameterFilterExpression expressions = 1;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
// An expression to filter parameter values in a segment.
|
|
943
|
+
message SegmentParameterFilter {
|
|
944
|
+
// The field that is being filtered.
|
|
945
|
+
oneof one_parameter {
|
|
946
|
+
// This filter will be evaluated on the specified event parameter. Event
|
|
947
|
+
// parameters are logged as parameters of the event. Event parameters
|
|
948
|
+
// include fields like "firebase_screen" & "currency".
|
|
949
|
+
//
|
|
950
|
+
// Event parameters can only be used in segments & funnels and can only be
|
|
951
|
+
// used in a descendent filter from an EventFilter. In a descendent filter
|
|
952
|
+
// from an EventFilter either event or item parameters should be used.
|
|
953
|
+
string event_parameter_name = 1;
|
|
954
|
+
|
|
955
|
+
// This filter will be evaluated on the specified item parameter. Item
|
|
956
|
+
// parameters are logged as parameters in the item array. Item parameters
|
|
957
|
+
// include fields like "item_name" & "item_category".
|
|
958
|
+
//
|
|
959
|
+
// Item parameters can only be used in segments & funnels and can only be
|
|
960
|
+
// used in a descendent filter from an EventFilter. In a descendent filter
|
|
961
|
+
// from an EventFilter either event or item parameters should be used.
|
|
962
|
+
//
|
|
963
|
+
// Item parameters are only available in ecommerce events. To learn more
|
|
964
|
+
// about ecommerce events, see the [Measure ecommerce]
|
|
965
|
+
// (https://developers.google.com/analytics/devguides/collection/ga4/ecommerce)
|
|
966
|
+
// guide.
|
|
967
|
+
string item_parameter_name = 2;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
// Specify one type of filter.
|
|
971
|
+
oneof one_filter {
|
|
972
|
+
// Strings related filter.
|
|
973
|
+
StringFilter string_filter = 4;
|
|
974
|
+
|
|
975
|
+
// A filter for in list values.
|
|
976
|
+
InListFilter in_list_filter = 5;
|
|
977
|
+
|
|
978
|
+
// A filter for numeric or date values.
|
|
979
|
+
NumericFilter numeric_filter = 6;
|
|
980
|
+
|
|
981
|
+
// A filter for between two values.
|
|
982
|
+
BetweenFilter between_filter = 7;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
// Specifies the scope for the filter.
|
|
986
|
+
SegmentParameterFilterScoping filter_scoping = 8;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
// Scopings specify how multiple events should be considered when evaluating a
|
|
990
|
+
// segment parameter filter.
|
|
991
|
+
message SegmentParameterFilterScoping {
|
|
992
|
+
// Accumulates the parameter over the specified period of days before
|
|
993
|
+
// applying the filter. Only supported if criteria scoping is
|
|
994
|
+
// `ACROSS_ALL_SESSIONS` or `WITHIN_SAME_SESSION`. Only supported if the
|
|
995
|
+
// parameter is `event_count`.
|
|
996
|
+
//
|
|
997
|
+
// For example if `inAnyNDayPeriod` is 3, the event_name is "purchase",
|
|
998
|
+
// the event parameter is "event_count", and the Filter's criteria is
|
|
999
|
+
// greater than 5, this filter will accumulate the event count of purchase
|
|
1000
|
+
// events over every 3 consecutive day period in the report's date range; a
|
|
1001
|
+
// user will pass this Filter's criteria to be included in this segment if
|
|
1002
|
+
// their count of purchase events exceeds 5 in any 3 consecutive day period.
|
|
1003
|
+
// For example, the periods 2021-11-01 to 2021-11-03, 2021-11-02 to
|
|
1004
|
+
// 2021-11-04, 2021-11-03 to 2021-11-05, and etc. will be considered.
|
|
1005
|
+
//
|
|
1006
|
+
// The date range is not extended for the purpose of having a full N day
|
|
1007
|
+
// window near the start of the date range. For example if a report is for
|
|
1008
|
+
// 2021-11-01 to 2021-11-10 and `inAnyNDayPeriod` = 3, the first two day
|
|
1009
|
+
// period will be effectively shortened because no event data outside the
|
|
1010
|
+
// report's date range will be read. For example, the first four periods
|
|
1011
|
+
// will effectively be: 2021-11-01 to 2021-11-01, 2021-11-01 to 2021-11-02,
|
|
1012
|
+
// 2021-11-01 to 2021-11-03, and 2021-11-02 to 2021-11-04.
|
|
1013
|
+
//
|
|
1014
|
+
// `inAnyNDayPeriod` is optional. If not specified, the
|
|
1015
|
+
// `segmentParameterFilter` is applied to each event individually.
|
|
1016
|
+
optional int64 in_any_n_day_period = 1;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
// Expresses combinations of funnel filters.
|
|
1020
|
+
message FunnelFilterExpression {
|
|
1021
|
+
// Specify one type of filter for `FunnelFilterExpression`.
|
|
1022
|
+
oneof expr {
|
|
1023
|
+
// The FunnelFilterExpression in `andGroup` have an AND relationship.
|
|
1024
|
+
FunnelFilterExpressionList and_group = 1;
|
|
1025
|
+
|
|
1026
|
+
// The FunnelFilterExpression in `orGroup` have an OR relationship.
|
|
1027
|
+
FunnelFilterExpressionList or_group = 2;
|
|
1028
|
+
|
|
1029
|
+
// The FunnelFilterExpression is NOT of `notExpression`.
|
|
1030
|
+
FunnelFilterExpression not_expression = 3;
|
|
1031
|
+
|
|
1032
|
+
// A funnel filter for a dimension or metric.
|
|
1033
|
+
FunnelFieldFilter funnel_field_filter = 4;
|
|
1034
|
+
|
|
1035
|
+
// Creates a filter that matches events of a single event name. If a
|
|
1036
|
+
// parameter filter expression is specified, only the subset of events that
|
|
1037
|
+
// match both the single event name and the parameter filter expressions
|
|
1038
|
+
// match this event filter.
|
|
1039
|
+
FunnelEventFilter funnel_event_filter = 5;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
// A list of funnel filter expressions.
|
|
1044
|
+
message FunnelFilterExpressionList {
|
|
1045
|
+
// The list of funnel filter expressions.
|
|
1046
|
+
repeated FunnelFilterExpression expressions = 1;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
// An expression to filter dimension or metric values.
|
|
1050
|
+
message FunnelFieldFilter {
|
|
1051
|
+
// The dimension name or metric name.
|
|
1052
|
+
string field_name = 1;
|
|
1053
|
+
|
|
1054
|
+
// Specify one type of filter.
|
|
1055
|
+
oneof one_filter {
|
|
1056
|
+
// Strings related filter.
|
|
1057
|
+
StringFilter string_filter = 4;
|
|
1058
|
+
|
|
1059
|
+
// A filter for in list values.
|
|
1060
|
+
InListFilter in_list_filter = 5;
|
|
1061
|
+
|
|
1062
|
+
// A filter for numeric or date values.
|
|
1063
|
+
NumericFilter numeric_filter = 6;
|
|
1064
|
+
|
|
1065
|
+
// A filter for between two values.
|
|
1066
|
+
BetweenFilter between_filter = 7;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
// Creates a filter that matches events of a single event name. If a parameter
|
|
1071
|
+
// filter expression is specified, only the subset of events that match both the
|
|
1072
|
+
// single event name and the parameter filter expressions match this event
|
|
1073
|
+
// filter.
|
|
1074
|
+
message FunnelEventFilter {
|
|
1075
|
+
// This filter matches events of this single event name. Event name is
|
|
1076
|
+
// required.
|
|
1077
|
+
optional string event_name = 1;
|
|
1078
|
+
|
|
1079
|
+
// If specified, this filter matches events that match both the single event
|
|
1080
|
+
// name and the parameter filter expressions.
|
|
1081
|
+
//
|
|
1082
|
+
// Inside the parameter filter expression, only parameter filters are
|
|
1083
|
+
// available.
|
|
1084
|
+
optional FunnelParameterFilterExpression funnel_parameter_filter_expression = 2;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
// Expresses combinations of funnel filters on parameters.
|
|
1088
|
+
message FunnelParameterFilterExpression {
|
|
1089
|
+
// Specify one type of filter for `FunnelParameterFilterExpression`.
|
|
1090
|
+
oneof expr {
|
|
1091
|
+
// The FunnelParameterFilterExpression in `andGroup` have an AND
|
|
1092
|
+
// relationship.
|
|
1093
|
+
FunnelParameterFilterExpressionList and_group = 1;
|
|
1094
|
+
|
|
1095
|
+
// The FunnelParameterFilterExpression in `orGroup` have an OR
|
|
1096
|
+
// relationship.
|
|
1097
|
+
FunnelParameterFilterExpressionList or_group = 2;
|
|
1098
|
+
|
|
1099
|
+
// The FunnelParameterFilterExpression is NOT of `notExpression`.
|
|
1100
|
+
FunnelParameterFilterExpression not_expression = 3;
|
|
1101
|
+
|
|
1102
|
+
// A primitive funnel parameter filter.
|
|
1103
|
+
FunnelParameterFilter funnel_parameter_filter = 4;
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
// A list of funnel parameter filter expressions.
|
|
1108
|
+
message FunnelParameterFilterExpressionList {
|
|
1109
|
+
// The list of funnel parameter filter expressions.
|
|
1110
|
+
repeated FunnelParameterFilterExpression expressions = 1;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
// An expression to filter parameter values in a funnel.
|
|
1114
|
+
message FunnelParameterFilter {
|
|
1115
|
+
// The field that is being filtered.
|
|
1116
|
+
oneof one_parameter {
|
|
1117
|
+
// This filter will be evaluated on the specified event parameter. Event
|
|
1118
|
+
// parameters are logged as parameters of the event. Event parameters
|
|
1119
|
+
// include fields like "firebase_screen" & "currency".
|
|
1120
|
+
//
|
|
1121
|
+
// Event parameters can only be used in segments & funnels and can only be
|
|
1122
|
+
// used in a descendent filter from an EventFilter. In a descendent filter
|
|
1123
|
+
// from an EventFilter either event or item parameters should be used.
|
|
1124
|
+
string event_parameter_name = 1;
|
|
1125
|
+
|
|
1126
|
+
// This filter will be evaluated on the specified item parameter. Item
|
|
1127
|
+
// parameters are logged as parameters in the item array. Item parameters
|
|
1128
|
+
// include fields like "item_name" & "item_category".
|
|
1129
|
+
//
|
|
1130
|
+
// Item parameters can only be used in segments & funnels and can only be
|
|
1131
|
+
// used in a descendent filter from an EventFilter. In a descendent filter
|
|
1132
|
+
// from an EventFilter either event or item parameters should be used.
|
|
1133
|
+
//
|
|
1134
|
+
// Item parameters are only available in ecommerce events. To learn more
|
|
1135
|
+
// about ecommerce events, see the [Measure ecommerce]
|
|
1136
|
+
// (https://developers.google.com/analytics/devguides/collection/ga4/ecommerce)
|
|
1137
|
+
// guide.
|
|
1138
|
+
string item_parameter_name = 2;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
// Specify one type of filter.
|
|
1142
|
+
oneof one_filter {
|
|
1143
|
+
// Strings related filter.
|
|
1144
|
+
StringFilter string_filter = 4;
|
|
1145
|
+
|
|
1146
|
+
// A filter for in list values.
|
|
1147
|
+
InListFilter in_list_filter = 5;
|
|
1148
|
+
|
|
1149
|
+
// A filter for numeric or date values.
|
|
1150
|
+
NumericFilter numeric_filter = 6;
|
|
1151
|
+
|
|
1152
|
+
// A filter for between two values.
|
|
1153
|
+
BetweenFilter between_filter = 7;
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
// The funnel report's response metadata carries additional information about
|
|
1158
|
+
// the funnel report.
|
|
1159
|
+
message FunnelResponseMetadata {
|
|
1160
|
+
// If funnel report results are
|
|
1161
|
+
// [sampled](https://support.google.com/analytics/answer/2637192), this
|
|
1162
|
+
// describes what percentage of events were used in this funnel report. One
|
|
1163
|
+
// `samplingMetadatas` is populated for each date range. Each
|
|
1164
|
+
// `samplingMetadatas` corresponds to a date range in order that date ranges
|
|
1165
|
+
// were specified in the request.
|
|
1166
|
+
//
|
|
1167
|
+
// However if the results are not sampled, this field will not be defined.
|
|
1168
|
+
repeated SamplingMetadata sampling_metadatas = 1;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
// If funnel report results are
|
|
1172
|
+
// [sampled](https://support.google.com/analytics/answer/2637192), this
|
|
1173
|
+
// metadata describes what percentage of events were used in this funnel
|
|
1174
|
+
// report for a date range. Sampling is the practice of analyzing a subset of
|
|
1175
|
+
// all data in order to uncover the meaningful information in the larger data
|
|
1176
|
+
// set.
|
|
1177
|
+
message SamplingMetadata {
|
|
1178
|
+
// The total number of events read in this sampled report for a date range.
|
|
1179
|
+
// This is the size of the subset this property's data that was analyzed in
|
|
1180
|
+
// this funnel report.
|
|
1181
|
+
int64 samples_read_count = 1;
|
|
1182
|
+
|
|
1183
|
+
// The total number of events present in this property's data that could
|
|
1184
|
+
// have been analyzed in this funnel report for a date range. Sampling
|
|
1185
|
+
// uncovers the meaningful information about the larger data set, and this
|
|
1186
|
+
// is the size of the larger data set.
|
|
1187
|
+
//
|
|
1188
|
+
// To calculate the percentage of available data that was used in this
|
|
1189
|
+
// funnel report, compute `samplesReadCount/samplingSpaceSize`.
|
|
1190
|
+
int64 sampling_space_size = 2;
|
|
751
1191
|
}
|
|
752
1192
|
|
|
753
1193
|
// A metric's value type.
|