google-analytics-data-v1alpha 0.4.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +188 -190
- data/README.md +66 -2
- data/lib/google/analytics/data/v1alpha.rb +3 -0
- data/lib/google/analytics/data/v1alpha/analytics_data/client.rb +35 -81
- data/lib/google/analytics/data/v1alpha/analytics_data_api_pb.rb +0 -8
- data/lib/google/analytics/data/v1alpha/analytics_data_api_services_pb.rb +1 -8
- data/lib/google/analytics/data/v1alpha/data_pb.rb +6 -4
- data/lib/google/analytics/data/v1alpha/version.rb +1 -1
- data/proto_docs/google/analytics/data/v1alpha/analytics_data_api.rb +17 -20
- data/proto_docs/google/analytics/data/v1alpha/data.rb +96 -45
- data/proto_docs/google/api/field_behavior.rb +6 -0
- metadata +9 -7
@@ -60,7 +60,7 @@ module Google
|
|
60
60
|
parent_config = while namespace.any?
|
61
61
|
parent_name = namespace.join "::"
|
62
62
|
parent_const = const_get parent_name
|
63
|
-
break parent_const.configure if parent_const
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
64
64
|
namespace.pop
|
65
65
|
end
|
66
66
|
default_config = Client::Configuration.new parent_config
|
@@ -68,9 +68,9 @@ module Google
|
|
68
68
|
default_config.timeout = 60.0
|
69
69
|
default_config.retry_policy = {
|
70
70
|
initial_delay: 1.0,
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
max_delay: 60.0,
|
72
|
+
multiplier: 1.3,
|
73
|
+
retry_codes: [2]
|
74
74
|
}
|
75
75
|
|
76
76
|
default_config.rpcs.run_report.timeout = 60.0
|
@@ -142,7 +142,13 @@ module Google
|
|
142
142
|
|
143
143
|
# Create credentials
|
144
144
|
credentials = @config.credentials
|
145
|
-
|
145
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
146
|
+
# but only if the default endpoint does not have a region prefix.
|
147
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
148
|
+
@config.endpoint == Client.configure.endpoint &&
|
149
|
+
!@config.endpoint.split(".").first.include?("-")
|
150
|
+
credentials ||= Credentials.default scope: @config.scope,
|
151
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
146
152
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
147
153
|
credentials = Credentials.new credentials, scope: @config.scope
|
148
154
|
end
|
@@ -199,9 +205,15 @@ module Google
|
|
199
205
|
# must be unspecified.
|
200
206
|
# @param offset [::Integer]
|
201
207
|
# The row count of the start row. The first row is counted as row 0.
|
208
|
+
#
|
209
|
+
# To learn more about this pagination parameter, see
|
210
|
+
# [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
|
202
211
|
# @param limit [::Integer]
|
203
212
|
# The number of rows to return. If unspecified, 10 rows are returned. If
|
204
213
|
# -1, all rows are returned.
|
214
|
+
#
|
215
|
+
# To learn more about this pagination parameter, see
|
216
|
+
# [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
|
205
217
|
# @param metric_aggregations [::Array<::Google::Analytics::Data::V1alpha::MetricAggregation>]
|
206
218
|
# Aggregation of metrics. Aggregated metric values will be shown in rows
|
207
219
|
# where the dimension_values are set to "RESERVED_(MetricAggregation)".
|
@@ -502,67 +514,10 @@ module Google
|
|
502
514
|
raise ::Google::Cloud::Error.from_error(e)
|
503
515
|
end
|
504
516
|
|
505
|
-
##
|
506
|
-
# Returns metadata for dimensions and metrics available in reporting methods.
|
507
|
-
# Used to explore the dimensions and metrics. Dimensions and metrics will be
|
508
|
-
# mostly added over time, but renames and deletions may occur.
|
509
|
-
#
|
510
|
-
# This method returns Universal Metadata. Universal Metadata are dimensions
|
511
|
-
# and metrics applicable to any property such as `country` and `totalUsers`.
|
512
|
-
#
|
513
|
-
# @overload get_universal_metadata(request, options = nil)
|
514
|
-
# Pass arguments to `get_universal_metadata` via a request object, either of type
|
515
|
-
# {::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest} or an equivalent Hash.
|
516
|
-
#
|
517
|
-
# @param request [::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest, ::Hash]
|
518
|
-
# A request object representing the call parameters. Required. To specify no
|
519
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
520
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
521
|
-
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
522
|
-
#
|
523
|
-
# @yield [response, operation] Access the result along with the RPC operation
|
524
|
-
# @yieldparam response [::Google::Analytics::Data::V1alpha::UniversalMetadata]
|
525
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
526
|
-
#
|
527
|
-
# @return [::Google::Analytics::Data::V1alpha::UniversalMetadata]
|
528
|
-
#
|
529
|
-
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
530
|
-
#
|
531
|
-
def get_universal_metadata request, options = nil
|
532
|
-
raise ::ArgumentError, "request must be provided" if request.nil?
|
533
|
-
|
534
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest
|
535
|
-
|
536
|
-
# Converts hash and nil to an options object
|
537
|
-
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
538
|
-
|
539
|
-
# Customize the options with defaults
|
540
|
-
metadata = @config.rpcs.get_universal_metadata.metadata.to_h
|
541
|
-
|
542
|
-
# Set x-goog-api-client and x-goog-user-project headers
|
543
|
-
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
544
|
-
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
545
|
-
gapic_version: ::Google::Analytics::Data::V1alpha::VERSION
|
546
|
-
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
547
|
-
|
548
|
-
options.apply_defaults timeout: @config.rpcs.get_universal_metadata.timeout,
|
549
|
-
metadata: metadata,
|
550
|
-
retry_policy: @config.rpcs.get_universal_metadata.retry_policy
|
551
|
-
options.apply_defaults metadata: @config.metadata,
|
552
|
-
retry_policy: @config.retry_policy
|
553
|
-
|
554
|
-
@analytics_data_stub.call_rpc :get_universal_metadata, request, options: options do |response, operation|
|
555
|
-
yield response, operation if block_given?
|
556
|
-
return response
|
557
|
-
end
|
558
|
-
rescue ::GRPC::BadStatus => e
|
559
|
-
raise ::Google::Cloud::Error.from_error(e)
|
560
|
-
end
|
561
|
-
|
562
517
|
##
|
563
518
|
# Returns metadata for dimensions and metrics available in reporting methods.
|
564
519
|
# Used to explore the dimensions and metrics. In this method, a Google
|
565
|
-
# Analytics
|
520
|
+
# Analytics GA4 Property Identifier is specified in the request, and
|
566
521
|
# the metadata response includes Custom dimensions and metrics as well as
|
567
522
|
# Universal metadata.
|
568
523
|
#
|
@@ -589,10 +544,16 @@ module Google
|
|
589
544
|
# @param name [::String]
|
590
545
|
# Required. The resource name of the metadata to retrieve. This name field is
|
591
546
|
# specified in the URL path and not URL parameters. Property is a numeric
|
592
|
-
# Google Analytics
|
547
|
+
# Google Analytics GA4 Property identifier. To learn more, see [where to find
|
548
|
+
# your Property
|
549
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
593
550
|
#
|
594
551
|
# Example: properties/1234/metadata
|
595
552
|
#
|
553
|
+
# Set the Property ID to 0 for dimensions and metrics common to all
|
554
|
+
# properties. In this special mode, this method will not return custom
|
555
|
+
# dimensions and metrics.
|
556
|
+
#
|
596
557
|
# @yield [response, operation] Access the result along with the RPC operation
|
597
558
|
# @yieldparam response [::Google::Analytics::Data::V1alpha::Metadata]
|
598
559
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
@@ -662,7 +623,7 @@ module Google
|
|
662
623
|
# A Google Analytics GA4 property identifier whose events are tracked.
|
663
624
|
# Specified in the URL path and not the body. To learn more, see [where to
|
664
625
|
# find your Property
|
665
|
-
# ID](https://developers.google.com/analytics/
|
626
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
666
627
|
#
|
667
628
|
# Example: properties/1234
|
668
629
|
# @param dimensions [::Array<::Google::Analytics::Data::V1alpha::Dimension, ::Hash>]
|
@@ -825,7 +786,7 @@ module Google
|
|
825
786
|
config_attr :scope, nil, ::String, ::Array, nil
|
826
787
|
config_attr :lib_name, nil, ::String, nil
|
827
788
|
config_attr :lib_version, nil, ::String, nil
|
828
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
789
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
829
790
|
config_attr :interceptors, nil, ::Array, nil
|
830
791
|
config_attr :timeout, nil, ::Numeric, nil
|
831
792
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -846,7 +807,7 @@ module Google
|
|
846
807
|
def rpcs
|
847
808
|
@rpcs ||= begin
|
848
809
|
parent_rpcs = nil
|
849
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
810
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
850
811
|
Rpcs.new parent_rpcs
|
851
812
|
end
|
852
813
|
end
|
@@ -858,7 +819,7 @@ module Google
|
|
858
819
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
859
820
|
# the following configuration fields:
|
860
821
|
#
|
861
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
822
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
862
823
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
863
824
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
864
825
|
# include the following keys:
|
@@ -890,11 +851,6 @@ module Google
|
|
890
851
|
#
|
891
852
|
attr_reader :batch_run_pivot_reports
|
892
853
|
##
|
893
|
-
# RPC-specific configuration for `get_universal_metadata`
|
894
|
-
# @return [::Gapic::Config::Method]
|
895
|
-
#
|
896
|
-
attr_reader :get_universal_metadata
|
897
|
-
##
|
898
854
|
# RPC-specific configuration for `get_metadata`
|
899
855
|
# @return [::Gapic::Config::Method]
|
900
856
|
#
|
@@ -907,19 +863,17 @@ module Google
|
|
907
863
|
|
908
864
|
# @private
|
909
865
|
def initialize parent_rpcs = nil
|
910
|
-
run_report_config = parent_rpcs
|
866
|
+
run_report_config = parent_rpcs.run_report if parent_rpcs.respond_to? :run_report
|
911
867
|
@run_report = ::Gapic::Config::Method.new run_report_config
|
912
|
-
run_pivot_report_config = parent_rpcs
|
868
|
+
run_pivot_report_config = parent_rpcs.run_pivot_report if parent_rpcs.respond_to? :run_pivot_report
|
913
869
|
@run_pivot_report = ::Gapic::Config::Method.new run_pivot_report_config
|
914
|
-
batch_run_reports_config = parent_rpcs
|
870
|
+
batch_run_reports_config = parent_rpcs.batch_run_reports if parent_rpcs.respond_to? :batch_run_reports
|
915
871
|
@batch_run_reports = ::Gapic::Config::Method.new batch_run_reports_config
|
916
|
-
batch_run_pivot_reports_config = parent_rpcs
|
872
|
+
batch_run_pivot_reports_config = parent_rpcs.batch_run_pivot_reports if parent_rpcs.respond_to? :batch_run_pivot_reports
|
917
873
|
@batch_run_pivot_reports = ::Gapic::Config::Method.new batch_run_pivot_reports_config
|
918
|
-
|
919
|
-
@get_universal_metadata = ::Gapic::Config::Method.new get_universal_metadata_config
|
920
|
-
get_metadata_config = parent_rpcs&.get_metadata if parent_rpcs&.respond_to? :get_metadata
|
874
|
+
get_metadata_config = parent_rpcs.get_metadata if parent_rpcs.respond_to? :get_metadata
|
921
875
|
@get_metadata = ::Gapic::Config::Method.new get_metadata_config
|
922
|
-
run_realtime_report_config = parent_rpcs
|
876
|
+
run_realtime_report_config = parent_rpcs.run_realtime_report if parent_rpcs.respond_to? :run_realtime_report
|
923
877
|
@run_realtime_report = ::Gapic::Config::Method.new run_realtime_report_config
|
924
878
|
|
925
879
|
yield self if block_given?
|
@@ -78,12 +78,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
78
78
|
add_message "google.analytics.data.v1alpha.BatchRunPivotReportsResponse" do
|
79
79
|
repeated :pivot_reports, :message, 1, "google.analytics.data.v1alpha.RunPivotReportResponse"
|
80
80
|
end
|
81
|
-
add_message "google.analytics.data.v1alpha.GetUniversalMetadataRequest" do
|
82
|
-
end
|
83
|
-
add_message "google.analytics.data.v1alpha.UniversalMetadata" do
|
84
|
-
repeated :dimensions, :message, 1, "google.analytics.data.v1alpha.DimensionMetadata"
|
85
|
-
repeated :metrics, :message, 2, "google.analytics.data.v1alpha.MetricMetadata"
|
86
|
-
end
|
87
81
|
add_message "google.analytics.data.v1alpha.GetMetadataRequest" do
|
88
82
|
optional :name, :string, 1
|
89
83
|
end
|
@@ -124,8 +118,6 @@ module Google
|
|
124
118
|
BatchRunReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunReportsResponse").msgclass
|
125
119
|
BatchRunPivotReportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunPivotReportsRequest").msgclass
|
126
120
|
BatchRunPivotReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunPivotReportsResponse").msgclass
|
127
|
-
GetUniversalMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.GetUniversalMetadataRequest").msgclass
|
128
|
-
UniversalMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.UniversalMetadata").msgclass
|
129
121
|
GetMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.GetMetadataRequest").msgclass
|
130
122
|
RunRealtimeReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunRealtimeReportRequest").msgclass
|
131
123
|
RunRealtimeReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunRealtimeReportResponse").msgclass
|
@@ -54,15 +54,8 @@ module Google
|
|
54
54
|
# Entity.
|
55
55
|
rpc :BatchRunPivotReports, ::Google::Analytics::Data::V1alpha::BatchRunPivotReportsRequest, ::Google::Analytics::Data::V1alpha::BatchRunPivotReportsResponse
|
56
56
|
# Returns metadata for dimensions and metrics available in reporting methods.
|
57
|
-
# Used to explore the dimensions and metrics. Dimensions and metrics will be
|
58
|
-
# mostly added over time, but renames and deletions may occur.
|
59
|
-
#
|
60
|
-
# This method returns Universal Metadata. Universal Metadata are dimensions
|
61
|
-
# and metrics applicable to any property such as `country` and `totalUsers`.
|
62
|
-
rpc :GetUniversalMetadata, ::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest, ::Google::Analytics::Data::V1alpha::UniversalMetadata
|
63
|
-
# Returns metadata for dimensions and metrics available in reporting methods.
|
64
57
|
# Used to explore the dimensions and metrics. In this method, a Google
|
65
|
-
# Analytics
|
58
|
+
# Analytics GA4 Property Identifier is specified in the request, and
|
66
59
|
# the metadata response includes Custom dimensions and metrics as well as
|
67
60
|
# Universal metadata.
|
68
61
|
#
|
@@ -137,9 +137,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
137
137
|
optional :dimension, :string, 2
|
138
138
|
optional :date_range, :message, 3, "google.analytics.data.v1alpha.DateRange"
|
139
139
|
end
|
140
|
-
add_message "google.analytics.data.v1alpha.CohortReportSettings" do
|
141
|
-
optional :accumulate, :bool, 1
|
142
|
-
end
|
143
140
|
add_message "google.analytics.data.v1alpha.CohortsRange" do
|
144
141
|
optional :granularity, :enum, 1, "google.analytics.data.v1alpha.CohortsRange.Granularity"
|
145
142
|
optional :start_offset, :int32, 2
|
@@ -151,6 +148,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
151
148
|
value :WEEKLY, 2
|
152
149
|
value :MONTHLY, 3
|
153
150
|
end
|
151
|
+
add_message "google.analytics.data.v1alpha.CohortReportSettings" do
|
152
|
+
optional :accumulate, :bool, 1
|
153
|
+
end
|
154
154
|
add_message "google.analytics.data.v1alpha.ResponseMetaData" do
|
155
155
|
optional :data_loss_from_other_row, :bool, 3
|
156
156
|
end
|
@@ -203,6 +203,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
203
203
|
optional :ui_name, :string, 2
|
204
204
|
optional :description, :string, 3
|
205
205
|
repeated :deprecated_api_names, :string, 4
|
206
|
+
optional :custom_definition, :bool, 5
|
206
207
|
end
|
207
208
|
add_message "google.analytics.data.v1alpha.MetricMetadata" do
|
208
209
|
optional :api_name, :string, 1
|
@@ -211,6 +212,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
211
212
|
repeated :deprecated_api_names, :string, 4
|
212
213
|
optional :type, :enum, 5, "google.analytics.data.v1alpha.MetricType"
|
213
214
|
optional :expression, :string, 6
|
215
|
+
optional :custom_definition, :bool, 7
|
214
216
|
end
|
215
217
|
add_enum "google.analytics.data.v1alpha.MetricAggregation" do
|
216
218
|
value :METRIC_AGGREGATION_UNSPECIFIED, 0
|
@@ -266,9 +268,9 @@ module Google
|
|
266
268
|
Pivot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.Pivot").msgclass
|
267
269
|
CohortSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.CohortSpec").msgclass
|
268
270
|
Cohort = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.Cohort").msgclass
|
269
|
-
CohortReportSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.CohortReportSettings").msgclass
|
270
271
|
CohortsRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.CohortsRange").msgclass
|
271
272
|
CohortsRange::Granularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.CohortsRange.Granularity").enummodule
|
273
|
+
CohortReportSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.CohortReportSettings").msgclass
|
272
274
|
ResponseMetaData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.ResponseMetaData").msgclass
|
273
275
|
DimensionHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.DimensionHeader").msgclass
|
274
276
|
MetricHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.MetricHeader").msgclass
|
@@ -57,10 +57,16 @@ module Google
|
|
57
57
|
# @!attribute [rw] offset
|
58
58
|
# @return [::Integer]
|
59
59
|
# The row count of the start row. The first row is counted as row 0.
|
60
|
+
#
|
61
|
+
# To learn more about this pagination parameter, see
|
62
|
+
# [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
|
60
63
|
# @!attribute [rw] limit
|
61
64
|
# @return [::Integer]
|
62
65
|
# The number of rows to return. If unspecified, 10 rows are returned. If
|
63
66
|
# -1, all rows are returned.
|
67
|
+
#
|
68
|
+
# To learn more about this pagination parameter, see
|
69
|
+
# [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
|
64
70
|
# @!attribute [rw] metric_aggregations
|
65
71
|
# @return [::Array<::Google::Analytics::Data::V1alpha::MetricAggregation>]
|
66
72
|
# Aggregation of metrics. Aggregated metric values will be shown in rows
|
@@ -126,6 +132,9 @@ module Google
|
|
126
132
|
# rows returned in the response. For example if a query returns 175 rows and
|
127
133
|
# includes limit = 50 in the API request, the response will contain row_count
|
128
134
|
# = 175 but only 50 rows.
|
135
|
+
#
|
136
|
+
# To learn more about this pagination parameter, see
|
137
|
+
# [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
|
129
138
|
# @!attribute [rw] metadata
|
130
139
|
# @return [::Google::Analytics::Data::V1alpha::ResponseMetaData]
|
131
140
|
# Metadata for the report.
|
@@ -310,32 +319,20 @@ module Google
|
|
310
319
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
311
320
|
end
|
312
321
|
|
313
|
-
# Request for the universal dimension and metric metadata.
|
314
|
-
class GetUniversalMetadataRequest
|
315
|
-
include ::Google::Protobuf::MessageExts
|
316
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
317
|
-
end
|
318
|
-
|
319
|
-
# The dimensions and metrics currently accepted in reporting methods.
|
320
|
-
# @!attribute [rw] dimensions
|
321
|
-
# @return [::Array<::Google::Analytics::Data::V1alpha::DimensionMetadata>]
|
322
|
-
# The dimensions descriptions.
|
323
|
-
# @!attribute [rw] metrics
|
324
|
-
# @return [::Array<::Google::Analytics::Data::V1alpha::MetricMetadata>]
|
325
|
-
# The metric descriptions.
|
326
|
-
class UniversalMetadata
|
327
|
-
include ::Google::Protobuf::MessageExts
|
328
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
329
|
-
end
|
330
|
-
|
331
322
|
# Request for a property's dimension and metric metadata.
|
332
323
|
# @!attribute [rw] name
|
333
324
|
# @return [::String]
|
334
325
|
# Required. The resource name of the metadata to retrieve. This name field is
|
335
326
|
# specified in the URL path and not URL parameters. Property is a numeric
|
336
|
-
# Google Analytics
|
327
|
+
# Google Analytics GA4 Property identifier. To learn more, see [where to find
|
328
|
+
# your Property
|
329
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
337
330
|
#
|
338
331
|
# Example: properties/1234/metadata
|
332
|
+
#
|
333
|
+
# Set the Property ID to 0 for dimensions and metrics common to all
|
334
|
+
# properties. In this special mode, this method will not return custom
|
335
|
+
# dimensions and metrics.
|
339
336
|
class GetMetadataRequest
|
340
337
|
include ::Google::Protobuf::MessageExts
|
341
338
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -347,7 +344,7 @@ module Google
|
|
347
344
|
# A Google Analytics GA4 property identifier whose events are tracked.
|
348
345
|
# Specified in the URL path and not the body. To learn more, see [where to
|
349
346
|
# find your Property
|
350
|
-
# ID](https://developers.google.com/analytics/
|
347
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
351
348
|
#
|
352
349
|
# Example: properties/1234
|
353
350
|
# @!attribute [rw] dimensions
|
@@ -22,8 +22,7 @@ module Google
|
|
22
22
|
module Data
|
23
23
|
module V1alpha
|
24
24
|
# A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests
|
25
|
-
# are allowed up to 4 date ranges
|
26
|
-
# 1 year.
|
25
|
+
# are allowed up to 4 date ranges.
|
27
26
|
# @!attribute [rw] start_date
|
28
27
|
# @return [::String]
|
29
28
|
# The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot
|
@@ -52,7 +51,7 @@ module Google
|
|
52
51
|
# @return [::String]
|
53
52
|
# A Google Analytics GA4 property id. To learn more, see [where to find your
|
54
53
|
# Property
|
55
|
-
# ID](https://developers.google.com/analytics/
|
54
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
56
55
|
class Entity
|
57
56
|
include ::Google::Protobuf::MessageExts
|
58
57
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -65,7 +64,7 @@ module Google
|
|
65
64
|
# @!attribute [rw] name
|
66
65
|
# @return [::String]
|
67
66
|
# The name of the dimension. See the [API
|
68
|
-
# Dimensions](https://developers.google.com/analytics/
|
67
|
+
# Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
|
69
68
|
# for the list of dimension names.
|
70
69
|
#
|
71
70
|
# If `dimensionExpression` is specified, `name` can be any string that you
|
@@ -137,7 +136,7 @@ module Google
|
|
137
136
|
# @!attribute [rw] name
|
138
137
|
# @return [::String]
|
139
138
|
# The name of the metric. See the [API
|
140
|
-
# Metrics](https://developers.google.com/analytics/
|
139
|
+
# Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
|
141
140
|
# for the list of metric names.
|
142
141
|
#
|
143
142
|
# If `expression` is specified, `name` can be any string that you would like.
|
@@ -448,23 +447,38 @@ module Google
|
|
448
447
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
449
448
|
end
|
450
449
|
|
451
|
-
# Specification for a cohort report.
|
450
|
+
# Specification of cohorts for a cohort report.
|
451
|
+
# Cohort reports can be used for example to create a time series of user
|
452
|
+
# retention for the cohort. For example, you could select the cohort of users
|
453
|
+
# that were acquired in the first week of September and follow that cohort for
|
454
|
+
# the next six weeks. Selecting the users acquired in the first week of
|
455
|
+
# September cohort is specified in the `cohort` object. Following that
|
456
|
+
# cohort for the next six weeks is specified in the `cohortsRange` object.
|
457
|
+
#
|
458
|
+
# The report response could show a weekly time series where say your app has
|
459
|
+
# retained 60% of this cohort after three weeks and 25% of this cohort after
|
460
|
+
# six weeks. These two percentages can be calculated by the metric
|
461
|
+
# `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report.
|
452
462
|
# @!attribute [rw] cohorts
|
453
463
|
# @return [::Array<::Google::Analytics::Data::V1alpha::Cohort>]
|
454
|
-
#
|
464
|
+
# Defines the selection criteria to group users into cohorts.
|
465
|
+
#
|
466
|
+
# Most cohort reports define only a single cohort. If multiple cohorts are
|
467
|
+
# specified, each cohort can be recognized in the report by their name.
|
455
468
|
# @!attribute [rw] cohorts_range
|
456
469
|
# @return [::Google::Analytics::Data::V1alpha::CohortsRange]
|
457
|
-
#
|
470
|
+
# Cohort reports follow cohorts over an extended reporting date range. This
|
471
|
+
# range specifies an offset duration to follow the cohorts over.
|
458
472
|
# @!attribute [rw] cohort_report_settings
|
459
473
|
# @return [::Google::Analytics::Data::V1alpha::CohortReportSettings]
|
460
|
-
#
|
474
|
+
# Optional settings for a cohort report.
|
461
475
|
class CohortSpec
|
462
476
|
include ::Google::Protobuf::MessageExts
|
463
477
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
464
478
|
end
|
465
479
|
|
466
|
-
# Defines a cohort. A cohort is a group of users who share
|
467
|
-
# characteristic. For example,
|
480
|
+
# Defines a cohort selection criteria. A cohort is a group of users who share
|
481
|
+
# a common characteristic. For example, users with the same `firstTouchDate`
|
468
482
|
# belong to the same cohort.
|
469
483
|
# @!attribute [rw] name
|
470
484
|
# @return [::String]
|
@@ -474,69 +488,100 @@ module Google
|
|
474
488
|
# `cohort_0`, `cohort_1`, etc.
|
475
489
|
# @!attribute [rw] dimension
|
476
490
|
# @return [::String]
|
477
|
-
#
|
478
|
-
# report.
|
491
|
+
# Dimension used by the cohort. Required and only supports `firstTouchDate`.
|
479
492
|
# @!attribute [rw] date_range
|
480
493
|
# @return [::Google::Analytics::Data::V1alpha::DateRange]
|
481
|
-
# The cohort selects users whose first
|
482
|
-
#
|
483
|
-
#
|
484
|
-
# `
|
494
|
+
# The cohort selects users whose first touch date is between start date and
|
495
|
+
# end date defined in the `dateRange`. This `dateRange` does not specify the
|
496
|
+
# full date range of event data that is present in a cohort report. In a
|
497
|
+
# cohort report, this `dateRange` is extended by the granularity and offset
|
498
|
+
# present in the `cohortsRange`; event data for the extended reporting date
|
499
|
+
# range is present in a cohort report.
|
485
500
|
#
|
486
|
-
#
|
487
|
-
#
|
488
|
-
#
|
489
|
-
#
|
490
|
-
# CohortsRange uses
|
491
|
-
#
|
501
|
+
# In a cohort request, this `dateRange` is required and the `dateRanges` in
|
502
|
+
# the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
|
503
|
+
#
|
504
|
+
# This `dateRange` should generally be aligned with the cohort's granularity.
|
505
|
+
# If `CohortsRange` uses daily granularity, this `dateRange` can be a single
|
506
|
+
# day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
|
507
|
+
# aligned to a week boundary, starting at Sunday and ending Saturday. If
|
508
|
+
# `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
|
509
|
+
# a month, starting at the first and ending on the last day of the month.
|
492
510
|
class Cohort
|
493
511
|
include ::Google::Protobuf::MessageExts
|
494
512
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
495
513
|
end
|
496
514
|
|
497
|
-
#
|
498
|
-
#
|
499
|
-
# @return [::Boolean]
|
500
|
-
# If true, accumulates the result from first visit day to the end day. Not
|
501
|
-
# supported in `RunReportRequest`.
|
502
|
-
class CohortReportSettings
|
503
|
-
include ::Google::Protobuf::MessageExts
|
504
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
505
|
-
end
|
506
|
-
|
507
|
-
# Describes date range for a cohort report.
|
515
|
+
# Configures the extended reporting date range for a cohort report. Specifies
|
516
|
+
# an offset duration to follow the cohorts over.
|
508
517
|
# @!attribute [rw] granularity
|
509
518
|
# @return [::Google::Analytics::Data::V1alpha::CohortsRange::Granularity]
|
510
|
-
#
|
511
|
-
#
|
519
|
+
# The granularity used to interpret the `startOffset` and `endOffset` for the
|
520
|
+
# extended reporting date range for a cohort report.
|
512
521
|
# @!attribute [rw] start_offset
|
513
522
|
# @return [::Integer]
|
514
|
-
#
|
515
|
-
#
|
523
|
+
# `startOffset` specifies the start date of the extended reporting date range
|
524
|
+
# for a cohort report. `startOffset` is commonly set to 0 so that reports
|
525
|
+
# contain data from the acquisition of the cohort forward.
|
526
|
+
#
|
527
|
+
# If `granularity` is `DAILY`, the `startDate` of the extended reporting date
|
528
|
+
# range is `startDate` of the cohort plus `startOffset` days.
|
529
|
+
#
|
530
|
+
# If `granularity` is `WEEKLY`, the `startDate` of the extended reporting
|
531
|
+
# date range is `startDate` of the cohort plus `startOffset * 7` days.
|
532
|
+
#
|
533
|
+
# If `granularity` is `MONTHLY`, the `startDate` of the extended reporting
|
534
|
+
# date range is `startDate` of the cohort plus `startOffset * 30` days.
|
516
535
|
# @!attribute [rw] end_offset
|
517
536
|
# @return [::Integer]
|
518
|
-
#
|
519
|
-
#
|
537
|
+
# `endOffset` specifies the end date of the extended reporting date range
|
538
|
+
# for a cohort report. `endOffset` can be any positive integer but is
|
539
|
+
# commonly set to 5 to 10 so that reports contain data on the cohort for the
|
540
|
+
# next several granularity time periods.
|
541
|
+
#
|
542
|
+
# If `granularity` is `DAILY`, the `endDate` of the extended reporting date
|
543
|
+
# range is `endDate` of the cohort plus `endOffset` days.
|
544
|
+
#
|
545
|
+
# If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date
|
546
|
+
# range is `endDate` of the cohort plus `endOffset * 7` days.
|
547
|
+
#
|
548
|
+
# If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date
|
549
|
+
# range is `endDate` of the cohort plus `endOffset * 30` days.
|
520
550
|
class CohortsRange
|
521
551
|
include ::Google::Protobuf::MessageExts
|
522
552
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
523
553
|
|
524
|
-
#
|
554
|
+
# The granularity used to interpret the `startOffset` and `endOffset` for the
|
555
|
+
# extended reporting date range for a cohort report.
|
525
556
|
module Granularity
|
526
|
-
#
|
557
|
+
# Should never be specified.
|
527
558
|
GRANULARITY_UNSPECIFIED = 0
|
528
559
|
|
529
|
-
# Daily
|
560
|
+
# Daily granularity. Commonly used if the cohort's `dateRange` is a single
|
561
|
+
# day and the request contains `cohortNthDay`.
|
530
562
|
DAILY = 1
|
531
563
|
|
532
|
-
# Weekly
|
564
|
+
# Weekly granularity. Commonly used if the cohort's `dateRange` is a week
|
565
|
+
# in duration (starting on Sunday and ending on Saturday) and the request
|
566
|
+
# contains `cohortNthWeek`.
|
533
567
|
WEEKLY = 2
|
534
568
|
|
535
|
-
# Monthly
|
569
|
+
# Monthly granularity. Commonly used if the cohort's `dateRange` is a month
|
570
|
+
# in duration and the request contains `cohortNthMonth`.
|
536
571
|
MONTHLY = 3
|
537
572
|
end
|
538
573
|
end
|
539
574
|
|
575
|
+
# Optional settings of a cohort report.
|
576
|
+
# @!attribute [rw] accumulate
|
577
|
+
# @return [::Boolean]
|
578
|
+
# If true, accumulates the result from first touch day to the end day. Not
|
579
|
+
# supported in `RunReportRequest`.
|
580
|
+
class CohortReportSettings
|
581
|
+
include ::Google::Protobuf::MessageExts
|
582
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
583
|
+
end
|
584
|
+
|
540
585
|
# Response's metadata carrying additional information about the report content.
|
541
586
|
# @!attribute [rw] data_loss_from_other_row
|
542
587
|
# @return [::Boolean]
|
@@ -735,6 +780,9 @@ module Google
|
|
735
780
|
# dimension is available by either `apiName` or one of `deprecatedApiNames`
|
736
781
|
# for a period of time. After the deprecation period, the dimension will be
|
737
782
|
# available only by `apiName`.
|
783
|
+
# @!attribute [rw] custom_definition
|
784
|
+
# @return [::Boolean]
|
785
|
+
# True if the dimension is a custom dimension for this property.
|
738
786
|
class DimensionMetadata
|
739
787
|
include ::Google::Protobuf::MessageExts
|
740
788
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -766,6 +814,9 @@ module Google
|
|
766
814
|
# The mathematical expression for this derived metric. Can be used in
|
767
815
|
# [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
|
768
816
|
# are not expressions, and for non-expressions, this field is empty.
|
817
|
+
# @!attribute [rw] custom_definition
|
818
|
+
# @return [::Boolean]
|
819
|
+
# True if the metric is a custom metric for this property.
|
769
820
|
class MetricMetadata
|
770
821
|
include ::Google::Protobuf::MessageExts
|
771
822
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|