google-analytics-data-v1beta 0.1.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/analytics/data/v1beta/analytics_data/client.rb +200 -68
- data/lib/google/analytics/data/v1beta/analytics_data_api_pb.rb +17 -2
- data/lib/google/analytics/data/v1beta/analytics_data_api_services_pb.rb +12 -1
- data/lib/google/analytics/data/v1beta/data_pb.rb +50 -0
- data/lib/google/analytics/data/v1beta/version.rb +1 -1
- data/proto_docs/google/analytics/data/v1beta/analytics_data_api.rb +66 -4
- data/proto_docs/google/analytics/data/v1beta/data.rb +176 -1
- data/proto_docs/google/api/field_behavior.rb +6 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '059c6b332489b0cbb18e6c74e9ddb315d7f82adb8dbbe4a68df85ee11c183d78'
|
4
|
+
data.tar.gz: a3e25aa05bbed95b21a39fce150a146e86f20c2ec7f4c82473db66c12177ea27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4daa847f618a432dc22512099eca529df77c9e9fa569c160c8482e605a60cfb79d705affda9b2449089247fe5f3b84094e7a916d1a91ccdfc6402e10e892014
|
7
|
+
data.tar.gz: faac7c705db32dcb11fe6c986f7d3b20cc07084b4caef0e7829cbfadbeb0403cf55e98711101d80466b2fe76ca8c3641225417f3be4aab4e13f96a592d9a8d76
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-analytics-data-v1beta
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Analytics::Data::V1beta::AnalyticsData::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `ANALYTICS_DATA_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `ANALYTICS_DATA_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/analytics/data/v1beta"
|
@@ -82,8 +82,8 @@ client = ::Google::Analytics::Data::V1beta::AnalyticsData::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/analytics/data/v1beta"
|
@@ -93,7 +93,7 @@ client = ::Google::Analytics::Data::V1beta::AnalyticsData::Client.new do |config
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/analytics/data/v1beta"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/analytics/data/v1beta"
|
34
34
|
|
35
35
|
client = ::Google::Analytics::Data::V1beta::AnalyticsData::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Analytics::Data::V1beta::RunReportRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.run_report request
|
38
38
|
```
|
39
39
|
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Analytics::Data::V1beta::AnalyticsData::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all AnalyticsData clients
|
47
|
+
# ::Google::Analytics::Data::V1beta::AnalyticsData::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
51
50
|
#
|
52
51
|
# @yield [config] Configure the Client client.
|
53
52
|
# @yieldparam config [Client::Configuration]
|
@@ -67,10 +66,7 @@ module Google
|
|
67
66
|
|
68
67
|
default_config.timeout = 60.0
|
69
68
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 1.0,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [2]
|
69
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [2]
|
74
70
|
}
|
75
71
|
|
76
72
|
default_config.rpcs.run_report.timeout = 60.0
|
@@ -112,19 +108,15 @@ module Google
|
|
112
108
|
##
|
113
109
|
# Create a new AnalyticsData client object.
|
114
110
|
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
# To create a new AnalyticsData client with the default
|
118
|
-
# configuration:
|
119
|
-
#
|
120
|
-
# client = ::Google::Analytics::Data::V1beta::AnalyticsData::Client.new
|
111
|
+
# @example
|
121
112
|
#
|
122
|
-
#
|
123
|
-
#
|
113
|
+
# # Create a client using the default configuration
|
114
|
+
# client = ::Google::Analytics::Data::V1beta::AnalyticsData::Client.new
|
124
115
|
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
#
|
116
|
+
# # Create a client using a custom configuration
|
117
|
+
# client = ::Google::Analytics::Data::V1beta::AnalyticsData::Client.new do |config|
|
118
|
+
# config.timeout = 10.0
|
119
|
+
# end
|
128
120
|
#
|
129
121
|
# @yield [config] Configure the AnalyticsData client.
|
130
122
|
# @yieldparam config [Client::Configuration]
|
@@ -144,14 +136,13 @@ module Google
|
|
144
136
|
|
145
137
|
# Create credentials
|
146
138
|
credentials = @config.credentials
|
147
|
-
# Use self-signed JWT if the
|
139
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
148
140
|
# but only if the default endpoint does not have a region prefix.
|
149
|
-
enable_self_signed_jwt = @config.
|
150
|
-
@config.endpoint == Client.configure.endpoint &&
|
141
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
151
142
|
!@config.endpoint.split(".").first.include?("-")
|
152
143
|
credentials ||= Credentials.default scope: @config.scope,
|
153
144
|
enable_self_signed_jwt: enable_self_signed_jwt
|
154
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
145
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
155
146
|
credentials = Credentials.new credentials, scope: @config.scope
|
156
147
|
end
|
157
148
|
@quota_project_id = @config.quota_project
|
@@ -212,12 +203,13 @@ module Google
|
|
212
203
|
# response rows for both date ranges. In a cohort request, this `dateRanges`
|
213
204
|
# must be unspecified.
|
214
205
|
# @param dimension_filter [::Google::Analytics::Data::V1beta::FilterExpression, ::Hash]
|
215
|
-
#
|
216
|
-
#
|
206
|
+
# Dimension filters allow you to ask for only specific dimension values in
|
207
|
+
# the report. To learn more, see [Fundamentals of Dimension
|
208
|
+
# Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
|
209
|
+
# for examples. Metrics cannot be used in this filter.
|
217
210
|
# @param metric_filter [::Google::Analytics::Data::V1beta::FilterExpression, ::Hash]
|
218
211
|
# The filter clause of metrics. Applied at post aggregation phase, similar to
|
219
|
-
# SQL having-clause.
|
220
|
-
# Dimensions cannot be used in this filter.
|
212
|
+
# SQL having-clause. Dimensions cannot be used in this filter.
|
221
213
|
# @param offset [::Integer]
|
222
214
|
# The row count of the start row. The first row is counted as row 0.
|
223
215
|
#
|
@@ -285,16 +277,20 @@ module Google
|
|
285
277
|
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
286
278
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
287
279
|
|
288
|
-
header_params = {
|
289
|
-
|
290
|
-
|
280
|
+
header_params = {}
|
281
|
+
if request.property
|
282
|
+
header_params["property"] = request.property
|
283
|
+
end
|
284
|
+
|
291
285
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
292
286
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
293
287
|
|
294
288
|
options.apply_defaults timeout: @config.rpcs.run_report.timeout,
|
295
289
|
metadata: metadata,
|
296
290
|
retry_policy: @config.rpcs.run_report.retry_policy
|
297
|
-
|
291
|
+
|
292
|
+
options.apply_defaults timeout: @config.timeout,
|
293
|
+
metadata: @config.metadata,
|
298
294
|
retry_policy: @config.retry_policy
|
299
295
|
|
300
296
|
@analytics_data_stub.call_rpc :run_report, request, options: options do |response, operation|
|
@@ -400,16 +396,20 @@ module Google
|
|
400
396
|
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
401
397
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
402
398
|
|
403
|
-
header_params = {
|
404
|
-
|
405
|
-
|
399
|
+
header_params = {}
|
400
|
+
if request.property
|
401
|
+
header_params["property"] = request.property
|
402
|
+
end
|
403
|
+
|
406
404
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
407
405
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
408
406
|
|
409
407
|
options.apply_defaults timeout: @config.rpcs.run_pivot_report.timeout,
|
410
408
|
metadata: metadata,
|
411
409
|
retry_policy: @config.rpcs.run_pivot_report.retry_policy
|
412
|
-
|
410
|
+
|
411
|
+
options.apply_defaults timeout: @config.timeout,
|
412
|
+
metadata: @config.metadata,
|
413
413
|
retry_policy: @config.retry_policy
|
414
414
|
|
415
415
|
@analytics_data_stub.call_rpc :run_pivot_report, request, options: options do |response, operation|
|
@@ -478,16 +478,20 @@ module Google
|
|
478
478
|
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
479
479
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
480
480
|
|
481
|
-
header_params = {
|
482
|
-
|
483
|
-
|
481
|
+
header_params = {}
|
482
|
+
if request.property
|
483
|
+
header_params["property"] = request.property
|
484
|
+
end
|
485
|
+
|
484
486
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
485
487
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
486
488
|
|
487
489
|
options.apply_defaults timeout: @config.rpcs.batch_run_reports.timeout,
|
488
490
|
metadata: metadata,
|
489
491
|
retry_policy: @config.rpcs.batch_run_reports.retry_policy
|
490
|
-
|
492
|
+
|
493
|
+
options.apply_defaults timeout: @config.timeout,
|
494
|
+
metadata: @config.metadata,
|
491
495
|
retry_policy: @config.retry_policy
|
492
496
|
|
493
497
|
@analytics_data_stub.call_rpc :batch_run_reports, request, options: options do |response, operation|
|
@@ -556,16 +560,20 @@ module Google
|
|
556
560
|
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
557
561
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
558
562
|
|
559
|
-
header_params = {
|
560
|
-
|
561
|
-
|
563
|
+
header_params = {}
|
564
|
+
if request.property
|
565
|
+
header_params["property"] = request.property
|
566
|
+
end
|
567
|
+
|
562
568
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
563
569
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
564
570
|
|
565
571
|
options.apply_defaults timeout: @config.rpcs.batch_run_pivot_reports.timeout,
|
566
572
|
metadata: metadata,
|
567
573
|
retry_policy: @config.rpcs.batch_run_pivot_reports.retry_policy
|
568
|
-
|
574
|
+
|
575
|
+
options.apply_defaults timeout: @config.timeout,
|
576
|
+
metadata: @config.metadata,
|
569
577
|
retry_policy: @config.retry_policy
|
570
578
|
|
571
579
|
@analytics_data_stub.call_rpc :batch_run_pivot_reports, request, options: options do |response, operation|
|
@@ -641,16 +649,20 @@ module Google
|
|
641
649
|
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
642
650
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
643
651
|
|
644
|
-
header_params = {
|
645
|
-
|
646
|
-
|
652
|
+
header_params = {}
|
653
|
+
if request.name
|
654
|
+
header_params["name"] = request.name
|
655
|
+
end
|
656
|
+
|
647
657
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
648
658
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
649
659
|
|
650
660
|
options.apply_defaults timeout: @config.rpcs.get_metadata.timeout,
|
651
661
|
metadata: metadata,
|
652
662
|
retry_policy: @config.rpcs.get_metadata.retry_policy
|
653
|
-
|
663
|
+
|
664
|
+
options.apply_defaults timeout: @config.timeout,
|
665
|
+
metadata: @config.metadata,
|
654
666
|
retry_policy: @config.retry_policy
|
655
667
|
|
656
668
|
@analytics_data_stub.call_rpc :get_metadata, request, options: options do |response, operation|
|
@@ -676,7 +688,7 @@ module Google
|
|
676
688
|
# @param options [::Gapic::CallOptions, ::Hash]
|
677
689
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
678
690
|
#
|
679
|
-
# @overload run_realtime_report(property: nil, dimensions: nil, metrics: nil, dimension_filter: nil, metric_filter: nil, limit: nil, metric_aggregations: nil, order_bys: nil, return_property_quota: nil)
|
691
|
+
# @overload run_realtime_report(property: nil, dimensions: nil, metrics: nil, dimension_filter: nil, metric_filter: nil, limit: nil, metric_aggregations: nil, order_bys: nil, return_property_quota: nil, minute_ranges: nil)
|
680
692
|
# Pass arguments to `run_realtime_report` via keyword arguments. Note that at
|
681
693
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
682
694
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -717,6 +729,12 @@ module Google
|
|
717
729
|
# @param return_property_quota [::Boolean]
|
718
730
|
# Toggles whether to return the current state of this Analytics Property's
|
719
731
|
# Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
732
|
+
# @param minute_ranges [::Array<::Google::Analytics::Data::V1beta::MinuteRange, ::Hash>]
|
733
|
+
# The minute ranges of event data to read. If unspecified, one minute range
|
734
|
+
# for the last 30 minutes will be used. If multiple minute ranges are
|
735
|
+
# requested, each response row will contain a zero based minute range index.
|
736
|
+
# If two minute ranges overlap, the event data for the overlapping minutes is
|
737
|
+
# included in the response rows for both minute ranges.
|
720
738
|
#
|
721
739
|
# @yield [response, operation] Access the result along with the RPC operation
|
722
740
|
# @yieldparam response [::Google::Analytics::Data::V1beta::RunRealtimeReportResponse]
|
@@ -743,16 +761,20 @@ module Google
|
|
743
761
|
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
744
762
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
745
763
|
|
746
|
-
header_params = {
|
747
|
-
|
748
|
-
|
764
|
+
header_params = {}
|
765
|
+
if request.property
|
766
|
+
header_params["property"] = request.property
|
767
|
+
end
|
768
|
+
|
749
769
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
750
770
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
751
771
|
|
752
772
|
options.apply_defaults timeout: @config.rpcs.run_realtime_report.timeout,
|
753
773
|
metadata: metadata,
|
754
774
|
retry_policy: @config.rpcs.run_realtime_report.retry_policy
|
755
|
-
|
775
|
+
|
776
|
+
options.apply_defaults timeout: @config.timeout,
|
777
|
+
metadata: @config.metadata,
|
756
778
|
retry_policy: @config.retry_policy
|
757
779
|
|
758
780
|
@analytics_data_stub.call_rpc :run_realtime_report, request, options: options do |response, operation|
|
@@ -763,6 +785,110 @@ module Google
|
|
763
785
|
raise ::Google::Cloud::Error.from_error(e)
|
764
786
|
end
|
765
787
|
|
788
|
+
##
|
789
|
+
# This compatibility method lists dimensions and metrics that can be added to
|
790
|
+
# a report request and maintain compatibility. This method fails if the
|
791
|
+
# request's dimensions and metrics are incompatible.
|
792
|
+
#
|
793
|
+
# In Google Analytics, reports fail if they request incompatible dimensions
|
794
|
+
# and/or metrics; in that case, you will need to remove dimensions and/or
|
795
|
+
# metrics from the incompatible report until the report is compatible.
|
796
|
+
#
|
797
|
+
# The Realtime and Core reports have different compatibility rules. This
|
798
|
+
# method checks compatibility for Core reports.
|
799
|
+
#
|
800
|
+
# @overload check_compatibility(request, options = nil)
|
801
|
+
# Pass arguments to `check_compatibility` via a request object, either of type
|
802
|
+
# {::Google::Analytics::Data::V1beta::CheckCompatibilityRequest} or an equivalent Hash.
|
803
|
+
#
|
804
|
+
# @param request [::Google::Analytics::Data::V1beta::CheckCompatibilityRequest, ::Hash]
|
805
|
+
# A request object representing the call parameters. Required. To specify no
|
806
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
807
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
808
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
809
|
+
#
|
810
|
+
# @overload check_compatibility(property: nil, dimensions: nil, metrics: nil, dimension_filter: nil, metric_filter: nil, compatibility_filter: nil)
|
811
|
+
# Pass arguments to `check_compatibility` via keyword arguments. Note that at
|
812
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
813
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
814
|
+
#
|
815
|
+
# @param property [::String]
|
816
|
+
# A Google Analytics GA4 property identifier whose events are tracked. To
|
817
|
+
# learn more, see [where to find your Property
|
818
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
819
|
+
# `property` should be the same value as in your `runReport` request.
|
820
|
+
#
|
821
|
+
# Example: properties/1234
|
822
|
+
#
|
823
|
+
# Set the Property ID to 0 for compatibility checking on dimensions and
|
824
|
+
# metrics common to all properties. In this special mode, this method will
|
825
|
+
# not return custom dimensions and metrics.
|
826
|
+
# @param dimensions [::Array<::Google::Analytics::Data::V1beta::Dimension, ::Hash>]
|
827
|
+
# The dimensions in this report. `dimensions` should be the same value as in
|
828
|
+
# your `runReport` request.
|
829
|
+
# @param metrics [::Array<::Google::Analytics::Data::V1beta::Metric, ::Hash>]
|
830
|
+
# The metrics in this report. `metrics` should be the same value as in your
|
831
|
+
# `runReport` request.
|
832
|
+
# @param dimension_filter [::Google::Analytics::Data::V1beta::FilterExpression, ::Hash]
|
833
|
+
# The filter clause of dimensions. `dimensionFilter` should be the same value
|
834
|
+
# as in your `runReport` request.
|
835
|
+
# @param metric_filter [::Google::Analytics::Data::V1beta::FilterExpression, ::Hash]
|
836
|
+
# The filter clause of metrics. `metricFilter` should be the same value as in
|
837
|
+
# your `runReport` request
|
838
|
+
# @param compatibility_filter [::Google::Analytics::Data::V1beta::Compatibility]
|
839
|
+
# Filters the dimensions and metrics in the response to just this
|
840
|
+
# compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”`
|
841
|
+
# to only return compatible dimensions & metrics.
|
842
|
+
#
|
843
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
844
|
+
# @yieldparam response [::Google::Analytics::Data::V1beta::CheckCompatibilityResponse]
|
845
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
846
|
+
#
|
847
|
+
# @return [::Google::Analytics::Data::V1beta::CheckCompatibilityResponse]
|
848
|
+
#
|
849
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
850
|
+
#
|
851
|
+
def check_compatibility request, options = nil
|
852
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
853
|
+
|
854
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1beta::CheckCompatibilityRequest
|
855
|
+
|
856
|
+
# Converts hash and nil to an options object
|
857
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
858
|
+
|
859
|
+
# Customize the options with defaults
|
860
|
+
metadata = @config.rpcs.check_compatibility.metadata.to_h
|
861
|
+
|
862
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
863
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
864
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
865
|
+
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
866
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
867
|
+
|
868
|
+
header_params = {}
|
869
|
+
if request.property
|
870
|
+
header_params["property"] = request.property
|
871
|
+
end
|
872
|
+
|
873
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
874
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
875
|
+
|
876
|
+
options.apply_defaults timeout: @config.rpcs.check_compatibility.timeout,
|
877
|
+
metadata: metadata,
|
878
|
+
retry_policy: @config.rpcs.check_compatibility.retry_policy
|
879
|
+
|
880
|
+
options.apply_defaults timeout: @config.timeout,
|
881
|
+
metadata: @config.metadata,
|
882
|
+
retry_policy: @config.retry_policy
|
883
|
+
|
884
|
+
@analytics_data_stub.call_rpc :check_compatibility, request, options: options do |response, operation|
|
885
|
+
yield response, operation if block_given?
|
886
|
+
return response
|
887
|
+
end
|
888
|
+
rescue ::GRPC::BadStatus => e
|
889
|
+
raise ::Google::Cloud::Error.from_error(e)
|
890
|
+
end
|
891
|
+
|
766
892
|
##
|
767
893
|
# Configuration class for the AnalyticsData API.
|
768
894
|
#
|
@@ -776,22 +902,21 @@ module Google
|
|
776
902
|
# Configuration can be applied globally to all clients, or to a single client
|
777
903
|
# on construction.
|
778
904
|
#
|
779
|
-
#
|
905
|
+
# @example
|
780
906
|
#
|
781
|
-
#
|
782
|
-
# to 20 seconds,
|
907
|
+
# # Modify the global config, setting the timeout for
|
908
|
+
# # run_report to 20 seconds,
|
909
|
+
# # and all remaining timeouts to 10 seconds.
|
910
|
+
# ::Google::Analytics::Data::V1beta::AnalyticsData::Client.configure do |config|
|
911
|
+
# config.timeout = 10.0
|
912
|
+
# config.rpcs.run_report.timeout = 20.0
|
913
|
+
# end
|
783
914
|
#
|
784
|
-
#
|
785
|
-
#
|
786
|
-
#
|
787
|
-
#
|
788
|
-
#
|
789
|
-
# To apply the above configuration only to a new client:
|
790
|
-
#
|
791
|
-
# client = ::Google::Analytics::Data::V1beta::AnalyticsData::Client.new do |config|
|
792
|
-
# config.timeout = 10.0
|
793
|
-
# config.rpcs.run_report.timeout = 20.0
|
794
|
-
# end
|
915
|
+
# # Apply the above configuration only to a new client.
|
916
|
+
# client = ::Google::Analytics::Data::V1beta::AnalyticsData::Client.new do |config|
|
917
|
+
# config.timeout = 10.0
|
918
|
+
# config.rpcs.run_report.timeout = 20.0
|
919
|
+
# end
|
795
920
|
#
|
796
921
|
# @!attribute [rw] endpoint
|
797
922
|
# The hostname or hostname:port of the service endpoint.
|
@@ -929,6 +1054,11 @@ module Google
|
|
929
1054
|
# @return [::Gapic::Config::Method]
|
930
1055
|
#
|
931
1056
|
attr_reader :run_realtime_report
|
1057
|
+
##
|
1058
|
+
# RPC-specific configuration for `check_compatibility`
|
1059
|
+
# @return [::Gapic::Config::Method]
|
1060
|
+
#
|
1061
|
+
attr_reader :check_compatibility
|
932
1062
|
|
933
1063
|
# @private
|
934
1064
|
def initialize parent_rpcs = nil
|
@@ -944,6 +1074,8 @@ module Google
|
|
944
1074
|
@get_metadata = ::Gapic::Config::Method.new get_metadata_config
|
945
1075
|
run_realtime_report_config = parent_rpcs.run_realtime_report if parent_rpcs.respond_to? :run_realtime_report
|
946
1076
|
@run_realtime_report = ::Gapic::Config::Method.new run_realtime_report_config
|
1077
|
+
check_compatibility_config = parent_rpcs.check_compatibility if parent_rpcs.respond_to? :check_compatibility
|
1078
|
+
@check_compatibility = ::Gapic::Config::Method.new check_compatibility_config
|
947
1079
|
|
948
1080
|
yield self if block_given?
|
949
1081
|
end
|
@@ -1,15 +1,27 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/analytics/data/v1beta/analytics_data_api.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/analytics/data/v1beta/data_pb'
|
7
5
|
require 'google/api/annotations_pb'
|
8
6
|
require 'google/api/client_pb'
|
9
7
|
require 'google/api/field_behavior_pb'
|
10
8
|
require 'google/api/resource_pb'
|
9
|
+
require 'google/protobuf'
|
10
|
+
|
11
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
12
|
add_file("google/analytics/data/v1beta/analytics_data_api.proto", :syntax => :proto3) do
|
13
|
+
add_message "google.analytics.data.v1beta.CheckCompatibilityRequest" do
|
14
|
+
optional :property, :string, 1
|
15
|
+
repeated :dimensions, :message, 2, "google.analytics.data.v1beta.Dimension"
|
16
|
+
repeated :metrics, :message, 3, "google.analytics.data.v1beta.Metric"
|
17
|
+
optional :dimension_filter, :message, 4, "google.analytics.data.v1beta.FilterExpression"
|
18
|
+
optional :metric_filter, :message, 5, "google.analytics.data.v1beta.FilterExpression"
|
19
|
+
optional :compatibility_filter, :enum, 6, "google.analytics.data.v1beta.Compatibility"
|
20
|
+
end
|
21
|
+
add_message "google.analytics.data.v1beta.CheckCompatibilityResponse" do
|
22
|
+
repeated :dimension_compatibilities, :message, 1, "google.analytics.data.v1beta.DimensionCompatibility"
|
23
|
+
repeated :metric_compatibilities, :message, 2, "google.analytics.data.v1beta.MetricCompatibility"
|
24
|
+
end
|
13
25
|
add_message "google.analytics.data.v1beta.Metadata" do
|
14
26
|
optional :name, :string, 3
|
15
27
|
repeated :dimensions, :message, 1, "google.analytics.data.v1beta.DimensionMetadata"
|
@@ -95,6 +107,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
95
107
|
repeated :metric_aggregations, :enum, 7, "google.analytics.data.v1beta.MetricAggregation"
|
96
108
|
repeated :order_bys, :message, 8, "google.analytics.data.v1beta.OrderBy"
|
97
109
|
optional :return_property_quota, :bool, 9
|
110
|
+
repeated :minute_ranges, :message, 10, "google.analytics.data.v1beta.MinuteRange"
|
98
111
|
end
|
99
112
|
add_message "google.analytics.data.v1beta.RunRealtimeReportResponse" do
|
100
113
|
repeated :dimension_headers, :message, 1, "google.analytics.data.v1beta.DimensionHeader"
|
@@ -114,6 +127,8 @@ module Google
|
|
114
127
|
module Analytics
|
115
128
|
module Data
|
116
129
|
module V1beta
|
130
|
+
CheckCompatibilityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.CheckCompatibilityRequest").msgclass
|
131
|
+
CheckCompatibilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.CheckCompatibilityResponse").msgclass
|
117
132
|
Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.Metadata").msgclass
|
118
133
|
RunReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.RunReportRequest").msgclass
|
119
134
|
RunReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.RunReportResponse").msgclass
|
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# Google Analytics reporting data service.
|
28
28
|
class Service
|
29
29
|
|
30
|
-
include GRPC::GenericService
|
30
|
+
include ::GRPC::GenericService
|
31
31
|
|
32
32
|
self.marshal_class_method = :encode
|
33
33
|
self.unmarshal_class_method = :decode
|
@@ -68,6 +68,17 @@ module Google
|
|
68
68
|
# event data for your property. These reports show events and usage from the
|
69
69
|
# last 30 minutes.
|
70
70
|
rpc :RunRealtimeReport, ::Google::Analytics::Data::V1beta::RunRealtimeReportRequest, ::Google::Analytics::Data::V1beta::RunRealtimeReportResponse
|
71
|
+
# This compatibility method lists dimensions and metrics that can be added to
|
72
|
+
# a report request and maintain compatibility. This method fails if the
|
73
|
+
# request's dimensions and metrics are incompatible.
|
74
|
+
#
|
75
|
+
# In Google Analytics, reports fail if they request incompatible dimensions
|
76
|
+
# and/or metrics; in that case, you will need to remove dimensions and/or
|
77
|
+
# metrics from the incompatible report until the report is compatible.
|
78
|
+
#
|
79
|
+
# The Realtime and Core reports have different compatibility rules. This
|
80
|
+
# method checks compatibility for Core reports.
|
81
|
+
rpc :CheckCompatibility, ::Google::Analytics::Data::V1beta::CheckCompatibilityRequest, ::Google::Analytics::Data::V1beta::CheckCompatibilityResponse
|
71
82
|
end
|
72
83
|
|
73
84
|
Stub = Service.rpc_stub_class
|
@@ -10,6 +10,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
10
10
|
optional :end_date, :string, 2
|
11
11
|
optional :name, :string, 3
|
12
12
|
end
|
13
|
+
add_message "google.analytics.data.v1beta.MinuteRange" do
|
14
|
+
proto3_optional :start_minutes_ago, :int32, 1
|
15
|
+
proto3_optional :end_minutes_ago, :int32, 2
|
16
|
+
optional :name, :string, 3
|
17
|
+
end
|
13
18
|
add_message "google.analytics.data.v1beta.Dimension" do
|
14
19
|
optional :name, :string, 1
|
15
20
|
optional :dimension_expression, :message, 2, "google.analytics.data.v1beta.DimensionExpression"
|
@@ -149,6 +154,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
149
154
|
end
|
150
155
|
add_message "google.analytics.data.v1beta.ResponseMetaData" do
|
151
156
|
optional :data_loss_from_other_row, :bool, 3
|
157
|
+
proto3_optional :schema_restriction_response, :message, 4, "google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse"
|
158
|
+
proto3_optional :currency_code, :string, 5
|
159
|
+
proto3_optional :time_zone, :string, 6
|
160
|
+
proto3_optional :empty_reason, :string, 7
|
161
|
+
end
|
162
|
+
add_message "google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse" do
|
163
|
+
repeated :active_metric_restrictions, :message, 1, "google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction"
|
164
|
+
end
|
165
|
+
add_message "google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction" do
|
166
|
+
proto3_optional :metric_name, :string, 1
|
167
|
+
repeated :restricted_metric_types, :enum, 2, "google.analytics.data.v1beta.RestrictedMetricType"
|
152
168
|
end
|
153
169
|
add_message "google.analytics.data.v1beta.DimensionHeader" do
|
154
170
|
optional :name, :string, 1
|
@@ -201,6 +217,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
201
217
|
optional :description, :string, 3
|
202
218
|
repeated :deprecated_api_names, :string, 4
|
203
219
|
optional :custom_definition, :bool, 5
|
220
|
+
optional :category, :string, 7
|
204
221
|
end
|
205
222
|
add_message "google.analytics.data.v1beta.MetricMetadata" do
|
206
223
|
optional :api_name, :string, 1
|
@@ -210,6 +227,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
210
227
|
optional :type, :enum, 5, "google.analytics.data.v1beta.MetricType"
|
211
228
|
optional :expression, :string, 6
|
212
229
|
optional :custom_definition, :bool, 7
|
230
|
+
repeated :blocked_reasons, :enum, 8, "google.analytics.data.v1beta.MetricMetadata.BlockedReason"
|
231
|
+
optional :category, :string, 10
|
232
|
+
end
|
233
|
+
add_enum "google.analytics.data.v1beta.MetricMetadata.BlockedReason" do
|
234
|
+
value :BLOCKED_REASON_UNSPECIFIED, 0
|
235
|
+
value :NO_REVENUE_METRICS, 1
|
236
|
+
value :NO_COST_METRICS, 2
|
237
|
+
end
|
238
|
+
add_message "google.analytics.data.v1beta.DimensionCompatibility" do
|
239
|
+
proto3_optional :dimension_metadata, :message, 1, "google.analytics.data.v1beta.DimensionMetadata"
|
240
|
+
proto3_optional :compatibility, :enum, 2, "google.analytics.data.v1beta.Compatibility"
|
241
|
+
end
|
242
|
+
add_message "google.analytics.data.v1beta.MetricCompatibility" do
|
243
|
+
proto3_optional :metric_metadata, :message, 1, "google.analytics.data.v1beta.MetricMetadata"
|
244
|
+
proto3_optional :compatibility, :enum, 2, "google.analytics.data.v1beta.Compatibility"
|
213
245
|
end
|
214
246
|
add_enum "google.analytics.data.v1beta.MetricAggregation" do
|
215
247
|
value :METRIC_AGGREGATION_UNSPECIFIED, 0
|
@@ -233,6 +265,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
233
265
|
value :TYPE_METERS, 12
|
234
266
|
value :TYPE_KILOMETERS, 13
|
235
267
|
end
|
268
|
+
add_enum "google.analytics.data.v1beta.RestrictedMetricType" do
|
269
|
+
value :RESTRICTED_METRIC_TYPE_UNSPECIFIED, 0
|
270
|
+
value :COST_DATA, 1
|
271
|
+
value :REVENUE_DATA, 2
|
272
|
+
end
|
273
|
+
add_enum "google.analytics.data.v1beta.Compatibility" do
|
274
|
+
value :COMPATIBILITY_UNSPECIFIED, 0
|
275
|
+
value :COMPATIBLE, 1
|
276
|
+
value :INCOMPATIBLE, 2
|
277
|
+
end
|
236
278
|
end
|
237
279
|
end
|
238
280
|
|
@@ -241,6 +283,7 @@ module Google
|
|
241
283
|
module Data
|
242
284
|
module V1beta
|
243
285
|
DateRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.DateRange").msgclass
|
286
|
+
MinuteRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MinuteRange").msgclass
|
244
287
|
Dimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.Dimension").msgclass
|
245
288
|
DimensionExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.DimensionExpression").msgclass
|
246
289
|
DimensionExpression::CaseExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.DimensionExpression.CaseExpression").msgclass
|
@@ -268,6 +311,8 @@ module Google
|
|
268
311
|
CohortsRange::Granularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.CohortsRange.Granularity").enummodule
|
269
312
|
CohortReportSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.CohortReportSettings").msgclass
|
270
313
|
ResponseMetaData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.ResponseMetaData").msgclass
|
314
|
+
ResponseMetaData::SchemaRestrictionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse").msgclass
|
315
|
+
ResponseMetaData::SchemaRestrictionResponse::ActiveMetricRestriction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction").msgclass
|
271
316
|
DimensionHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.DimensionHeader").msgclass
|
272
317
|
MetricHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricHeader").msgclass
|
273
318
|
PivotHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.PivotHeader").msgclass
|
@@ -280,8 +325,13 @@ module Google
|
|
280
325
|
QuotaStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.QuotaStatus").msgclass
|
281
326
|
DimensionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.DimensionMetadata").msgclass
|
282
327
|
MetricMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricMetadata").msgclass
|
328
|
+
MetricMetadata::BlockedReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricMetadata.BlockedReason").enummodule
|
329
|
+
DimensionCompatibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.DimensionCompatibility").msgclass
|
330
|
+
MetricCompatibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricCompatibility").msgclass
|
283
331
|
MetricAggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricAggregation").enummodule
|
284
332
|
MetricType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricType").enummodule
|
333
|
+
RestrictedMetricType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.RestrictedMetricType").enummodule
|
334
|
+
Compatibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.Compatibility").enummodule
|
285
335
|
end
|
286
336
|
end
|
287
337
|
end
|
@@ -21,6 +21,60 @@ module Google
|
|
21
21
|
module Analytics
|
22
22
|
module Data
|
23
23
|
module V1beta
|
24
|
+
# The request for compatibility information for a report's dimensions and
|
25
|
+
# metrics. Check compatibility provides a preview of the compatibility of a
|
26
|
+
# report; fields shared with the `runReport` request should be the same values
|
27
|
+
# as in your `runReport` request.
|
28
|
+
# @!attribute [rw] property
|
29
|
+
# @return [::String]
|
30
|
+
# A Google Analytics GA4 property identifier whose events are tracked. To
|
31
|
+
# learn more, see [where to find your Property
|
32
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
33
|
+
# `property` should be the same value as in your `runReport` request.
|
34
|
+
#
|
35
|
+
# Example: properties/1234
|
36
|
+
#
|
37
|
+
# Set the Property ID to 0 for compatibility checking on dimensions and
|
38
|
+
# metrics common to all properties. In this special mode, this method will
|
39
|
+
# not return custom dimensions and metrics.
|
40
|
+
# @!attribute [rw] dimensions
|
41
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::Dimension>]
|
42
|
+
# The dimensions in this report. `dimensions` should be the same value as in
|
43
|
+
# your `runReport` request.
|
44
|
+
# @!attribute [rw] metrics
|
45
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::Metric>]
|
46
|
+
# The metrics in this report. `metrics` should be the same value as in your
|
47
|
+
# `runReport` request.
|
48
|
+
# @!attribute [rw] dimension_filter
|
49
|
+
# @return [::Google::Analytics::Data::V1beta::FilterExpression]
|
50
|
+
# The filter clause of dimensions. `dimensionFilter` should be the same value
|
51
|
+
# as in your `runReport` request.
|
52
|
+
# @!attribute [rw] metric_filter
|
53
|
+
# @return [::Google::Analytics::Data::V1beta::FilterExpression]
|
54
|
+
# The filter clause of metrics. `metricFilter` should be the same value as in
|
55
|
+
# your `runReport` request
|
56
|
+
# @!attribute [rw] compatibility_filter
|
57
|
+
# @return [::Google::Analytics::Data::V1beta::Compatibility]
|
58
|
+
# Filters the dimensions and metrics in the response to just this
|
59
|
+
# compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”`
|
60
|
+
# to only return compatible dimensions & metrics.
|
61
|
+
class CheckCompatibilityRequest
|
62
|
+
include ::Google::Protobuf::MessageExts
|
63
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
64
|
+
end
|
65
|
+
|
66
|
+
# The compatibility response with the compatibility of each dimension & metric.
|
67
|
+
# @!attribute [rw] dimension_compatibilities
|
68
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::DimensionCompatibility>]
|
69
|
+
# The compatibility of each dimension.
|
70
|
+
# @!attribute [rw] metric_compatibilities
|
71
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::MetricCompatibility>]
|
72
|
+
# The compatibility of each metric.
|
73
|
+
class CheckCompatibilityResponse
|
74
|
+
include ::Google::Protobuf::MessageExts
|
75
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
76
|
+
end
|
77
|
+
|
24
78
|
# The dimensions and metrics currently accepted in reporting methods.
|
25
79
|
# @!attribute [rw] name
|
26
80
|
# @return [::String]
|
@@ -62,13 +116,14 @@ module Google
|
|
62
116
|
# must be unspecified.
|
63
117
|
# @!attribute [rw] dimension_filter
|
64
118
|
# @return [::Google::Analytics::Data::V1beta::FilterExpression]
|
65
|
-
#
|
66
|
-
#
|
119
|
+
# Dimension filters allow you to ask for only specific dimension values in
|
120
|
+
# the report. To learn more, see [Fundamentals of Dimension
|
121
|
+
# Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
|
122
|
+
# for examples. Metrics cannot be used in this filter.
|
67
123
|
# @!attribute [rw] metric_filter
|
68
124
|
# @return [::Google::Analytics::Data::V1beta::FilterExpression]
|
69
125
|
# The filter clause of metrics. Applied at post aggregation phase, similar to
|
70
|
-
# SQL having-clause.
|
71
|
-
# Dimensions cannot be used in this filter.
|
126
|
+
# SQL having-clause. Dimensions cannot be used in this filter.
|
72
127
|
# @!attribute [rw] offset
|
73
128
|
# @return [::Integer]
|
74
129
|
# The row count of the start row. The first row is counted as row 0.
|
@@ -441,6 +496,13 @@ module Google
|
|
441
496
|
# @return [::Boolean]
|
442
497
|
# Toggles whether to return the current state of this Analytics Property's
|
443
498
|
# Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
499
|
+
# @!attribute [rw] minute_ranges
|
500
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::MinuteRange>]
|
501
|
+
# The minute ranges of event data to read. If unspecified, one minute range
|
502
|
+
# for the last 30 minutes will be used. If multiple minute ranges are
|
503
|
+
# requested, each response row will contain a zero based minute range index.
|
504
|
+
# If two minute ranges overlap, the event data for the overlapping minutes is
|
505
|
+
# included in the response rows for both minute ranges.
|
444
506
|
class RunRealtimeReportRequest
|
445
507
|
include ::Google::Protobuf::MessageExts
|
446
508
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -46,10 +46,44 @@ module Google
|
|
46
46
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
47
47
|
end
|
48
48
|
|
49
|
+
# A contiguous set of minutes: startMinutesAgo, startMinutesAgo + 1, ...,
|
50
|
+
# endMinutesAgo. Requests are allowed up to 2 minute ranges.
|
51
|
+
# @!attribute [rw] start_minutes_ago
|
52
|
+
# @return [::Integer]
|
53
|
+
# The inclusive start minute for the query as a number of minutes before now.
|
54
|
+
# For example, `"startMinutesAgo": 29` specifies the report should include
|
55
|
+
# event data from 29 minutes ago and after. Cannot be after `endMinutesAgo`.
|
56
|
+
#
|
57
|
+
# If unspecified, `startMinutesAgo` is defaulted to 29. Standard Analytics
|
58
|
+
# properties can request up to the last 30 minutes of event data
|
59
|
+
# (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to
|
60
|
+
# the last 60 minutes of event data (`startMinutesAgo <= 59`).
|
61
|
+
# @!attribute [rw] end_minutes_ago
|
62
|
+
# @return [::Integer]
|
63
|
+
# The inclusive end minute for the query as a number of minutes before now.
|
64
|
+
# Cannot be before `startMinutesAgo`. For example, `"endMinutesAgo": 15`
|
65
|
+
# specifies the report should include event data from prior to 15 minutes
|
66
|
+
# ago.
|
67
|
+
#
|
68
|
+
# If unspecified, `endMinutesAgo` is defaulted to 0. Standard Analytics
|
69
|
+
# properties can request any minute in the last 30 minutes of event data
|
70
|
+
# (`endMinutesAgo <= 29`), and 360 Analytics properties can request any
|
71
|
+
# minute in the last 60 minutes of event data (`endMinutesAgo <= 59`).
|
72
|
+
# @!attribute [rw] name
|
73
|
+
# @return [::String]
|
74
|
+
# Assigns a name to this minute range. The dimension `dateRange` is valued to
|
75
|
+
# this name in a report response. If set, cannot begin with `date_range_` or
|
76
|
+
# `RESERVED_`. If not set, minute ranges are named by their zero based index
|
77
|
+
# in the request: `date_range_0`, `date_range_1`, etc.
|
78
|
+
class MinuteRange
|
79
|
+
include ::Google::Protobuf::MessageExts
|
80
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
81
|
+
end
|
82
|
+
|
49
83
|
# Dimensions are attributes of your data. For example, the dimension city
|
50
84
|
# indicates the city from which an event originates. Dimension values in report
|
51
85
|
# responses are strings; for example, city could be "Paris" or "New York".
|
52
|
-
# Requests are allowed up to
|
86
|
+
# Requests are allowed up to 9 dimensions.
|
53
87
|
# @!attribute [rw] name
|
54
88
|
# @return [::String]
|
55
89
|
# The name of the dimension. See the [API
|
@@ -584,9 +618,61 @@ module Google
|
|
584
618
|
# @return [::Boolean]
|
585
619
|
# If true, indicates some buckets of dimension combinations are rolled into
|
586
620
|
# "(other)" row. This can happen for high cardinality reports.
|
621
|
+
# @!attribute [rw] schema_restriction_response
|
622
|
+
# @return [::Google::Analytics::Data::V1beta::ResponseMetaData::SchemaRestrictionResponse]
|
623
|
+
# Describes the schema restrictions actively enforced in creating this
|
624
|
+
# report. To learn more, see [Access and data-restriction
|
625
|
+
# management](https://support.google.com/analytics/answer/10851388).
|
626
|
+
# @!attribute [rw] currency_code
|
627
|
+
# @return [::String]
|
628
|
+
# The currency code used in this report. Intended to be used in formatting
|
629
|
+
# currency metrics like `purchaseRevenue` for visualization. If currency_code
|
630
|
+
# was specified in the request, this response parameter will echo the request
|
631
|
+
# parameter; otherwise, this response parameter is the property's current
|
632
|
+
# currency_code.
|
633
|
+
#
|
634
|
+
# Currency codes are string encodings of currency types from the ISO 4217
|
635
|
+
# standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD",
|
636
|
+
# "EUR", "JPY". To learn more, see
|
637
|
+
# https://support.google.com/analytics/answer/9796179.
|
638
|
+
# @!attribute [rw] time_zone
|
639
|
+
# @return [::String]
|
640
|
+
# The property's current timezone. Intended to be used to interpret
|
641
|
+
# time-based dimensions like `hour` and `minute`. Formatted as strings from
|
642
|
+
# the IANA Time Zone database (https://www.iana.org/time-zones); for example
|
643
|
+
# "America/New_York" or "Asia/Tokyo".
|
644
|
+
# @!attribute [rw] empty_reason
|
645
|
+
# @return [::String]
|
646
|
+
# If empty reason is specified, the report is empty for this reason.
|
587
647
|
class ResponseMetaData
|
588
648
|
include ::Google::Protobuf::MessageExts
|
589
649
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
650
|
+
|
651
|
+
# The schema restrictions actively enforced in creating this report. To learn
|
652
|
+
# more, see [Access and data-restriction
|
653
|
+
# management](https://support.google.com/analytics/answer/10851388).
|
654
|
+
# @!attribute [rw] active_metric_restrictions
|
655
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::ResponseMetaData::SchemaRestrictionResponse::ActiveMetricRestriction>]
|
656
|
+
# All restrictions actively enforced in creating the report. For example,
|
657
|
+
# `purchaseRevenue` always has the restriction type `REVENUE_DATA`.
|
658
|
+
# However, this active response restriction is only populated if the user's
|
659
|
+
# custom role disallows access to `REVENUE_DATA`.
|
660
|
+
class SchemaRestrictionResponse
|
661
|
+
include ::Google::Protobuf::MessageExts
|
662
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
663
|
+
|
664
|
+
# A metric actively restricted in creating the report.
|
665
|
+
# @!attribute [rw] metric_name
|
666
|
+
# @return [::String]
|
667
|
+
# The name of the restricted metric.
|
668
|
+
# @!attribute [rw] restricted_metric_types
|
669
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::RestrictedMetricType>]
|
670
|
+
# The reason for this metric's restriction.
|
671
|
+
class ActiveMetricRestriction
|
672
|
+
include ::Google::Protobuf::MessageExts
|
673
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
674
|
+
end
|
675
|
+
end
|
590
676
|
end
|
591
677
|
|
592
678
|
# Describes a dimension column in the report. Dimensions requested in a report
|
@@ -786,6 +872,10 @@ module Google
|
|
786
872
|
# @!attribute [rw] custom_definition
|
787
873
|
# @return [::Boolean]
|
788
874
|
# True if the dimension is a custom dimension for this property.
|
875
|
+
# @!attribute [rw] category
|
876
|
+
# @return [::String]
|
877
|
+
# The display name of the category that this dimension belongs to. Similar
|
878
|
+
# dimensions and metrics are categorized together.
|
789
879
|
class DimensionMetadata
|
790
880
|
include ::Google::Protobuf::MessageExts
|
791
881
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -820,9 +910,67 @@ module Google
|
|
820
910
|
# @!attribute [rw] custom_definition
|
821
911
|
# @return [::Boolean]
|
822
912
|
# True if the metric is a custom metric for this property.
|
913
|
+
# @!attribute [rw] blocked_reasons
|
914
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::MetricMetadata::BlockedReason>]
|
915
|
+
# If reasons are specified, your access is blocked to this metric for this
|
916
|
+
# property. API requests from you to this property for this metric will
|
917
|
+
# succeed; however, the report will contain only zeros for this metric. API
|
918
|
+
# requests with metric filters on blocked metrics will fail. If reasons are
|
919
|
+
# empty, you have access to this metric.
|
920
|
+
#
|
921
|
+
# To learn more, see [Access and data-restriction
|
922
|
+
# management](https://support.google.com/analytics/answer/10851388).
|
923
|
+
# @!attribute [rw] category
|
924
|
+
# @return [::String]
|
925
|
+
# The display name of the category that this metrics belongs to. Similar
|
926
|
+
# dimensions and metrics are categorized together.
|
823
927
|
class MetricMetadata
|
824
928
|
include ::Google::Protobuf::MessageExts
|
825
929
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
930
|
+
|
931
|
+
# Justifications for why this metric is blocked.
|
932
|
+
module BlockedReason
|
933
|
+
# Will never be specified in API response.
|
934
|
+
BLOCKED_REASON_UNSPECIFIED = 0
|
935
|
+
|
936
|
+
# If present, your access is blocked to revenue related metrics for this
|
937
|
+
# property, and this metric is revenue related.
|
938
|
+
NO_REVENUE_METRICS = 1
|
939
|
+
|
940
|
+
# If present, your access is blocked to cost related metrics for this
|
941
|
+
# property, and this metric is cost related.
|
942
|
+
NO_COST_METRICS = 2
|
943
|
+
end
|
944
|
+
end
|
945
|
+
|
946
|
+
# The compatibility for a single dimension.
|
947
|
+
# @!attribute [rw] dimension_metadata
|
948
|
+
# @return [::Google::Analytics::Data::V1beta::DimensionMetadata]
|
949
|
+
# The dimension metadata contains the API name for this compatibility
|
950
|
+
# information. The dimension metadata also contains other helpful information
|
951
|
+
# like the UI name and description.
|
952
|
+
# @!attribute [rw] compatibility
|
953
|
+
# @return [::Google::Analytics::Data::V1beta::Compatibility]
|
954
|
+
# The compatibility of this dimension. If the compatibility is COMPATIBLE,
|
955
|
+
# this dimension can be successfully added to the report.
|
956
|
+
class DimensionCompatibility
|
957
|
+
include ::Google::Protobuf::MessageExts
|
958
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
959
|
+
end
|
960
|
+
|
961
|
+
# The compatibility for a single metric.
|
962
|
+
# @!attribute [rw] metric_metadata
|
963
|
+
# @return [::Google::Analytics::Data::V1beta::MetricMetadata]
|
964
|
+
# The metric metadata contains the API name for this compatibility
|
965
|
+
# information. The metric metadata also contains other helpful information
|
966
|
+
# like the UI name and description.
|
967
|
+
# @!attribute [rw] compatibility
|
968
|
+
# @return [::Google::Analytics::Data::V1beta::Compatibility]
|
969
|
+
# The compatibility of this metric. If the compatibility is COMPATIBLE,
|
970
|
+
# this metric can be successfully added to the report.
|
971
|
+
class MetricCompatibility
|
972
|
+
include ::Google::Protobuf::MessageExts
|
973
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
826
974
|
end
|
827
975
|
|
828
976
|
# Represents aggregation of metrics.
|
@@ -884,6 +1032,33 @@ module Google
|
|
884
1032
|
# A length in kilometers; a special floating point type.
|
885
1033
|
TYPE_KILOMETERS = 13
|
886
1034
|
end
|
1035
|
+
|
1036
|
+
# Categories of data that you may be restricted from viewing on certain GA4
|
1037
|
+
# properties.
|
1038
|
+
module RestrictedMetricType
|
1039
|
+
# Unspecified type.
|
1040
|
+
RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0
|
1041
|
+
|
1042
|
+
# Cost metrics such as `adCost`.
|
1043
|
+
COST_DATA = 1
|
1044
|
+
|
1045
|
+
# Revenue metrics such as `purchaseRevenue`.
|
1046
|
+
REVENUE_DATA = 2
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
# The compatibility types for a single dimension or metric.
|
1050
|
+
module Compatibility
|
1051
|
+
# Unspecified compatibility.
|
1052
|
+
COMPATIBILITY_UNSPECIFIED = 0
|
1053
|
+
|
1054
|
+
# The dimension or metric is compatible. This dimension or metric can be
|
1055
|
+
# successfully added to a report.
|
1056
|
+
COMPATIBLE = 1
|
1057
|
+
|
1058
|
+
# The dimension or metric is incompatible. This dimension or metric cannot be
|
1059
|
+
# successfully added to a report.
|
1060
|
+
INCOMPATIBLE = 2
|
1061
|
+
end
|
887
1062
|
end
|
888
1063
|
end
|
889
1064
|
end
|
@@ -60,6 +60,12 @@ module Google
|
|
60
60
|
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-analytics-data-v1beta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|