@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.
@@ -52,8 +52,8 @@ message MinuteRange {
52
52
  //
53
53
  // If unspecified, `startMinutesAgo` is defaulted to 29. Standard Analytics
54
54
  // properties can request up to the last 30 minutes of event data
55
- // (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to
56
- // the last 60 minutes of event data (`startMinutesAgo <= 59`).
55
+ // (`startMinutesAgo <= 29`), and Google Analytics 360 properties can request
56
+ // up to the last 60 minutes of event data (`startMinutesAgo <= 59`).
57
57
  optional int32 start_minutes_ago = 1;
58
58
 
59
59
  // The inclusive end minute for the query as a number of minutes before now.
@@ -63,8 +63,8 @@ message MinuteRange {
63
63
  //
64
64
  // If unspecified, `endMinutesAgo` is defaulted to 0. Standard Analytics
65
65
  // properties can request any minute in the last 30 minutes of event data
66
- // (`endMinutesAgo <= 29`), and 360 Analytics properties can request any
67
- // minute in the last 60 minutes of event data (`endMinutesAgo <= 59`).
66
+ // (`endMinutesAgo <= 29`), and Google Analytics 360 properties can request
67
+ // any minute in the last 60 minutes of event data (`endMinutesAgo <= 59`).
68
68
  optional int32 end_minutes_ago = 2;
69
69
 
70
70
  // Assigns a name to this minute range. The dimension `dateRange` is valued to
@@ -87,7 +87,7 @@ message Dimension {
87
87
  // would like within the allowed character set. For example if a
88
88
  // `dimensionExpression` concatenates `country` and `city`, you could call
89
89
  // that dimension `countryAndCity`. Dimension names that you choose must match
90
- // the regular expression "^[a-zA-Z0-9_]$".
90
+ // the regular expression `^[a-zA-Z0-9_]$`.
91
91
  //
92
92
  // Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
93
93
  // `dimensionExpression`, and `pivots`.
@@ -152,7 +152,7 @@ message Metric {
152
152
  // within the allowed character set. For example if `expression` is
153
153
  // `screenPageViews/sessions`, you could call that metric's name =
154
154
  // `viewsPerSession`. Metric names that you choose must match the regular
155
- // expression "^[a-zA-Z0-9_]$".
155
+ // expression `^[a-zA-Z0-9_]$`.
156
156
  //
157
157
  // Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
158
158
  // `expression`.
@@ -555,9 +555,55 @@ message CohortReportSettings {
555
555
 
556
556
  // Response's metadata carrying additional information about the report content.
557
557
  message ResponseMetaData {
558
+ // The schema restrictions actively enforced in creating this report. To learn
559
+ // more, see [Access and data-restriction
560
+ // management](https://support.google.com/analytics/answer/10851388).
561
+ message SchemaRestrictionResponse {
562
+ // A metric actively restricted in creating the report.
563
+ message ActiveMetricRestriction {
564
+ // The name of the restricted metric.
565
+ optional string metric_name = 1;
566
+
567
+ // The reason for this metric's restriction.
568
+ repeated RestrictedMetricType restricted_metric_types = 2;
569
+ }
570
+
571
+ // All restrictions actively enforced in creating the report. For example,
572
+ // `purchaseRevenue` always has the restriction type `REVENUE_DATA`.
573
+ // However, this active response restriction is only populated if the user's
574
+ // custom role disallows access to `REVENUE_DATA`.
575
+ repeated ActiveMetricRestriction active_metric_restrictions = 1;
576
+ }
577
+
558
578
  // If true, indicates some buckets of dimension combinations are rolled into
559
579
  // "(other)" row. This can happen for high cardinality reports.
560
580
  bool data_loss_from_other_row = 3;
581
+
582
+ // Describes the schema restrictions actively enforced in creating this
583
+ // report. To learn more, see [Access and data-restriction
584
+ // management](https://support.google.com/analytics/answer/10851388).
585
+ optional SchemaRestrictionResponse schema_restriction_response = 4;
586
+
587
+ // The currency code used in this report. Intended to be used in formatting
588
+ // currency metrics like `purchaseRevenue` for visualization. If currency_code
589
+ // was specified in the request, this response parameter will echo the request
590
+ // parameter; otherwise, this response parameter is the property's current
591
+ // currency_code.
592
+ //
593
+ // Currency codes are string encodings of currency types from the ISO 4217
594
+ // standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD",
595
+ // "EUR", "JPY". To learn more, see
596
+ // https://support.google.com/analytics/answer/9796179.
597
+ optional string currency_code = 5;
598
+
599
+ // The property's current timezone. Intended to be used to interpret
600
+ // time-based dimensions like `hour` and `minute`. Formatted as strings from
601
+ // the IANA Time Zone database (https://www.iana.org/time-zones); for example
602
+ // "America/New_York" or "Asia/Tokyo".
603
+ optional string time_zone = 6;
604
+
605
+ // If empty reason is specified, the report is empty for this reason.
606
+ optional string empty_reason = 7;
561
607
  }
562
608
 
563
609
  // Describes a dimension column in the report. Dimensions requested in a report
@@ -744,6 +790,20 @@ message DimensionMetadata {
744
790
 
745
791
  // Explains a metric.
746
792
  message MetricMetadata {
793
+ // Justifications for why this metric is blocked.
794
+ enum BlockedReason {
795
+ // Will never be specified in API response.
796
+ BLOCKED_REASON_UNSPECIFIED = 0;
797
+
798
+ // If present, your access is blocked to revenue related metrics for this
799
+ // property, and this metric is revenue related.
800
+ NO_REVENUE_METRICS = 1;
801
+
802
+ // If present, your access is blocked to cost related metrics for this
803
+ // property, and this metric is cost related.
804
+ NO_COST_METRICS = 2;
805
+ }
806
+
747
807
  // A metric name. Useable in [Metric](#Metric)'s `name`. For example,
748
808
  // `eventCount`.
749
809
  string api_name = 1;
@@ -772,6 +832,16 @@ message MetricMetadata {
772
832
  // True if the metric is a custom metric for this property.
773
833
  bool custom_definition = 7;
774
834
 
835
+ // If reasons are specified, your access is blocked to this metric for this
836
+ // property. API requests from you to this property for this metric will
837
+ // succeed; however, the report will contain only zeros for this metric. API
838
+ // requests with metric filters on blocked metrics will fail. If reasons are
839
+ // empty, you have access to this metric.
840
+ //
841
+ // To learn more, see [Access and data-restriction
842
+ // management](https://support.google.com/analytics/answer/10851388).
843
+ repeated BlockedReason blocked_reasons = 8;
844
+
775
845
  // The display name of the category that this metrics belongs to. Similar
776
846
  // dimensions and metrics are categorized together.
777
847
  string category = 10;
@@ -861,6 +931,19 @@ enum MetricType {
861
931
  TYPE_KILOMETERS = 13;
862
932
  }
863
933
 
934
+ // Categories of data that you may be restricted from viewing on certain GA4
935
+ // properties.
936
+ enum RestrictedMetricType {
937
+ // Unspecified type.
938
+ RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0;
939
+
940
+ // Cost metrics such as `adCost`.
941
+ COST_DATA = 1;
942
+
943
+ // Revenue metrics such as `purchaseRevenue`.
944
+ REVENUE_DATA = 2;
945
+ }
946
+
864
947
  // The compatibility types for a single dimension or metric.
865
948
  enum Compatibility {
866
949
  // Unspecified compatibility.