google-analytics-data-v1alpha 0.3.0 → 0.6.1
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.
- checksums.yaml +4 -4
- data/lib/google/analytics/data/v1alpha.rb +3 -0
- data/lib/google/analytics/data/v1alpha/analytics_data/client.rb +103 -53
- data/lib/google/analytics/data/v1alpha/analytics_data_api_pb.rb +23 -8
- data/lib/google/analytics/data/v1alpha/analytics_data_api_services_pb.rb +5 -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 +94 -18
- data/proto_docs/google/analytics/data/v1alpha/data.rb +169 -79
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ca12184b1c27ab2c52dce9c1bcb2b4c74437b6a03af13a58275e1ed7996c1eb
|
4
|
+
data.tar.gz: f082d8a7c5f5714bab30ba68c4c2d490d006bfad2faf6b68006592751216cba5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c38b55797bb9a5a6617c50d0d3da54f233026e0941274da10db52451484b64deec9e21f2e1d4c763deea228d032b4d7a00fd4625ba72ba7b4a7e13caeba3fe1d
|
7
|
+
data.tar.gz: 29df5d547fad20f4cc0bc75d646443b8b1f7dd7f63194cf8dbce72f1e625f79a2c1783637ec199a5193d1158e029b6ae1a55f1f6311c9fe58167acf1d4df9589
|
@@ -199,9 +199,15 @@ module Google
|
|
199
199
|
# must be unspecified.
|
200
200
|
# @param offset [::Integer]
|
201
201
|
# The row count of the start row. The first row is counted as row 0.
|
202
|
+
#
|
203
|
+
# To learn more about this pagination parameter, see
|
204
|
+
# [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
|
202
205
|
# @param limit [::Integer]
|
203
206
|
# The number of rows to return. If unspecified, 10 rows are returned. If
|
204
207
|
# -1, all rows are returned.
|
208
|
+
#
|
209
|
+
# To learn more about this pagination parameter, see
|
210
|
+
# [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
|
205
211
|
# @param metric_aggregations [::Array<::Google::Analytics::Data::V1alpha::MetricAggregation>]
|
206
212
|
# Aggregation of metrics. Aggregated metric values will be shown in rows
|
207
213
|
# where the dimension_values are set to "RESERVED_(MetricAggregation)".
|
@@ -504,40 +510,62 @@ module Google
|
|
504
510
|
|
505
511
|
##
|
506
512
|
# Returns metadata for dimensions and metrics available in reporting methods.
|
507
|
-
# Used to explore the dimensions and metrics.
|
508
|
-
#
|
513
|
+
# Used to explore the dimensions and metrics. In this method, a Google
|
514
|
+
# Analytics GA4 Property Identifier is specified in the request, and
|
515
|
+
# the metadata response includes Custom dimensions and metrics as well as
|
516
|
+
# Universal metadata.
|
509
517
|
#
|
510
|
-
#
|
511
|
-
#
|
518
|
+
# For example if a custom metric with parameter name `levels_unlocked` is
|
519
|
+
# registered to a property, the Metadata response will contain
|
520
|
+
# `customEvent:levels_unlocked`. Universal metadata are dimensions and
|
521
|
+
# metrics applicable to any property such as `country` and `totalUsers`.
|
512
522
|
#
|
513
|
-
# @overload
|
514
|
-
# Pass arguments to `
|
515
|
-
# {::Google::Analytics::Data::V1alpha::
|
523
|
+
# @overload get_metadata(request, options = nil)
|
524
|
+
# Pass arguments to `get_metadata` via a request object, either of type
|
525
|
+
# {::Google::Analytics::Data::V1alpha::GetMetadataRequest} or an equivalent Hash.
|
516
526
|
#
|
517
|
-
# @param request [::Google::Analytics::Data::V1alpha::
|
527
|
+
# @param request [::Google::Analytics::Data::V1alpha::GetMetadataRequest, ::Hash]
|
518
528
|
# A request object representing the call parameters. Required. To specify no
|
519
529
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
520
530
|
# @param options [::Gapic::CallOptions, ::Hash]
|
521
531
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
522
532
|
#
|
533
|
+
# @overload get_metadata(name: nil)
|
534
|
+
# Pass arguments to `get_metadata` via keyword arguments. Note that at
|
535
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
536
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
537
|
+
#
|
538
|
+
# @param name [::String]
|
539
|
+
# Required. The resource name of the metadata to retrieve. This name field is
|
540
|
+
# specified in the URL path and not URL parameters. Property is a numeric
|
541
|
+
# Google Analytics GA4 Property identifier. To learn more, see [where to find
|
542
|
+
# your Property
|
543
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
544
|
+
#
|
545
|
+
# Example: properties/1234/metadata
|
546
|
+
#
|
547
|
+
# Set the Property ID to 0 for dimensions and metrics common to all
|
548
|
+
# properties. In this special mode, this method will not return custom
|
549
|
+
# dimensions and metrics.
|
550
|
+
#
|
523
551
|
# @yield [response, operation] Access the result along with the RPC operation
|
524
|
-
# @yieldparam response [::Google::Analytics::Data::V1alpha::
|
552
|
+
# @yieldparam response [::Google::Analytics::Data::V1alpha::Metadata]
|
525
553
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
526
554
|
#
|
527
|
-
# @return [::Google::Analytics::Data::V1alpha::
|
555
|
+
# @return [::Google::Analytics::Data::V1alpha::Metadata]
|
528
556
|
#
|
529
557
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
530
558
|
#
|
531
|
-
def
|
559
|
+
def get_metadata request, options = nil
|
532
560
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
533
561
|
|
534
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::
|
562
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::GetMetadataRequest
|
535
563
|
|
536
564
|
# Converts hash and nil to an options object
|
537
565
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
538
566
|
|
539
567
|
# Customize the options with defaults
|
540
|
-
metadata = @config.rpcs.
|
568
|
+
metadata = @config.rpcs.get_metadata.metadata.to_h
|
541
569
|
|
542
570
|
# Set x-goog-api-client and x-goog-user-project headers
|
543
571
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -545,13 +573,19 @@ module Google
|
|
545
573
|
gapic_version: ::Google::Analytics::Data::V1alpha::VERSION
|
546
574
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
547
575
|
|
548
|
-
|
576
|
+
header_params = {
|
577
|
+
"name" => request.name
|
578
|
+
}
|
579
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
580
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
581
|
+
|
582
|
+
options.apply_defaults timeout: @config.rpcs.get_metadata.timeout,
|
549
583
|
metadata: metadata,
|
550
|
-
retry_policy: @config.rpcs.
|
584
|
+
retry_policy: @config.rpcs.get_metadata.retry_policy
|
551
585
|
options.apply_defaults metadata: @config.metadata,
|
552
586
|
retry_policy: @config.retry_policy
|
553
587
|
|
554
|
-
@analytics_data_stub.call_rpc :
|
588
|
+
@analytics_data_stub.call_rpc :get_metadata, request, options: options do |response, operation|
|
555
589
|
yield response, operation if block_given?
|
556
590
|
return response
|
557
591
|
end
|
@@ -560,57 +594,73 @@ module Google
|
|
560
594
|
end
|
561
595
|
|
562
596
|
##
|
563
|
-
#
|
564
|
-
#
|
565
|
-
#
|
566
|
-
# the metadata response includes Custom dimensions and metrics as well as
|
567
|
-
# Universal metadata.
|
568
|
-
#
|
569
|
-
# For example if a custom metric with parameter name `levels_unlocked` is
|
570
|
-
# registered to a property, the Metadata response will contain
|
571
|
-
# `customEvent:levels_unlocked`. Universal metadata are dimensions and
|
572
|
-
# metrics applicable to any property such as `country` and `totalUsers`.
|
597
|
+
# The Google Analytics Realtime API returns a customized report of realtime
|
598
|
+
# event data for your property. These reports show events and usage from the
|
599
|
+
# last 30 minutes.
|
573
600
|
#
|
574
|
-
# @overload
|
575
|
-
# Pass arguments to `
|
576
|
-
# {::Google::Analytics::Data::V1alpha::
|
601
|
+
# @overload run_realtime_report(request, options = nil)
|
602
|
+
# Pass arguments to `run_realtime_report` via a request object, either of type
|
603
|
+
# {::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest} or an equivalent Hash.
|
577
604
|
#
|
578
|
-
# @param request [::Google::Analytics::Data::V1alpha::
|
605
|
+
# @param request [::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest, ::Hash]
|
579
606
|
# A request object representing the call parameters. Required. To specify no
|
580
607
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
581
608
|
# @param options [::Gapic::CallOptions, ::Hash]
|
582
609
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
583
610
|
#
|
584
|
-
# @overload
|
585
|
-
# Pass arguments to `
|
611
|
+
# @overload run_realtime_report(property: nil, dimensions: nil, metrics: nil, limit: nil, dimension_filter: nil, metric_filter: nil, metric_aggregations: nil, order_bys: nil, return_property_quota: nil)
|
612
|
+
# Pass arguments to `run_realtime_report` via keyword arguments. Note that at
|
586
613
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
587
614
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
588
615
|
#
|
589
|
-
# @param
|
590
|
-
#
|
591
|
-
#
|
592
|
-
#
|
616
|
+
# @param property [::String]
|
617
|
+
# A Google Analytics GA4 property identifier whose events are tracked.
|
618
|
+
# Specified in the URL path and not the body. To learn more, see [where to
|
619
|
+
# find your Property
|
620
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
593
621
|
#
|
594
|
-
# Example: properties/1234
|
622
|
+
# Example: properties/1234
|
623
|
+
# @param dimensions [::Array<::Google::Analytics::Data::V1alpha::Dimension, ::Hash>]
|
624
|
+
# The dimensions requested and displayed.
|
625
|
+
# @param metrics [::Array<::Google::Analytics::Data::V1alpha::Metric, ::Hash>]
|
626
|
+
# The metrics requested and displayed.
|
627
|
+
# @param limit [::Integer]
|
628
|
+
# The number of rows to return. If unspecified, 10 rows are returned. If
|
629
|
+
# -1, all rows are returned.
|
630
|
+
# @param dimension_filter [::Google::Analytics::Data::V1alpha::FilterExpression, ::Hash]
|
631
|
+
# The filter clause of dimensions. Dimensions must be requested to be used in
|
632
|
+
# this filter. Metrics cannot be used in this filter.
|
633
|
+
# @param metric_filter [::Google::Analytics::Data::V1alpha::FilterExpression, ::Hash]
|
634
|
+
# The filter clause of metrics. Applied at post aggregation phase, similar to
|
635
|
+
# SQL having-clause. Metrics must be requested to be used in this filter.
|
636
|
+
# Dimensions cannot be used in this filter.
|
637
|
+
# @param metric_aggregations [::Array<::Google::Analytics::Data::V1alpha::MetricAggregation>]
|
638
|
+
# Aggregation of metrics. Aggregated metric values will be shown in rows
|
639
|
+
# where the dimension_values are set to "RESERVED_(MetricAggregation)".
|
640
|
+
# @param order_bys [::Array<::Google::Analytics::Data::V1alpha::OrderBy, ::Hash>]
|
641
|
+
# Specifies how rows are ordered in the response.
|
642
|
+
# @param return_property_quota [::Boolean]
|
643
|
+
# Toggles whether to return the current state of this Analytics Property's
|
644
|
+
# Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
595
645
|
#
|
596
646
|
# @yield [response, operation] Access the result along with the RPC operation
|
597
|
-
# @yieldparam response [::Google::Analytics::Data::V1alpha::
|
647
|
+
# @yieldparam response [::Google::Analytics::Data::V1alpha::RunRealtimeReportResponse]
|
598
648
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
599
649
|
#
|
600
|
-
# @return [::Google::Analytics::Data::V1alpha::
|
650
|
+
# @return [::Google::Analytics::Data::V1alpha::RunRealtimeReportResponse]
|
601
651
|
#
|
602
652
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
603
653
|
#
|
604
|
-
def
|
654
|
+
def run_realtime_report request, options = nil
|
605
655
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
606
656
|
|
607
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::
|
657
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest
|
608
658
|
|
609
659
|
# Converts hash and nil to an options object
|
610
660
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
611
661
|
|
612
662
|
# Customize the options with defaults
|
613
|
-
metadata = @config.rpcs.
|
663
|
+
metadata = @config.rpcs.run_realtime_report.metadata.to_h
|
614
664
|
|
615
665
|
# Set x-goog-api-client and x-goog-user-project headers
|
616
666
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -619,18 +669,18 @@ module Google
|
|
619
669
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
620
670
|
|
621
671
|
header_params = {
|
622
|
-
"
|
672
|
+
"property" => request.property
|
623
673
|
}
|
624
674
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
625
675
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
626
676
|
|
627
|
-
options.apply_defaults timeout: @config.rpcs.
|
677
|
+
options.apply_defaults timeout: @config.rpcs.run_realtime_report.timeout,
|
628
678
|
metadata: metadata,
|
629
|
-
retry_policy: @config.rpcs.
|
679
|
+
retry_policy: @config.rpcs.run_realtime_report.retry_policy
|
630
680
|
options.apply_defaults metadata: @config.metadata,
|
631
681
|
retry_policy: @config.retry_policy
|
632
682
|
|
633
|
-
@analytics_data_stub.call_rpc :
|
683
|
+
@analytics_data_stub.call_rpc :run_realtime_report, request, options: options do |response, operation|
|
634
684
|
yield response, operation if block_given?
|
635
685
|
return response
|
636
686
|
end
|
@@ -763,7 +813,7 @@ module Google
|
|
763
813
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
764
814
|
# the following configuration fields:
|
765
815
|
#
|
766
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
816
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
767
817
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
768
818
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
769
819
|
# include the following keys:
|
@@ -795,15 +845,15 @@ module Google
|
|
795
845
|
#
|
796
846
|
attr_reader :batch_run_pivot_reports
|
797
847
|
##
|
798
|
-
# RPC-specific configuration for `
|
848
|
+
# RPC-specific configuration for `get_metadata`
|
799
849
|
# @return [::Gapic::Config::Method]
|
800
850
|
#
|
801
|
-
attr_reader :
|
851
|
+
attr_reader :get_metadata
|
802
852
|
##
|
803
|
-
# RPC-specific configuration for `
|
853
|
+
# RPC-specific configuration for `run_realtime_report`
|
804
854
|
# @return [::Gapic::Config::Method]
|
805
855
|
#
|
806
|
-
attr_reader :
|
856
|
+
attr_reader :run_realtime_report
|
807
857
|
|
808
858
|
# @private
|
809
859
|
def initialize parent_rpcs = nil
|
@@ -815,10 +865,10 @@ module Google
|
|
815
865
|
@batch_run_reports = ::Gapic::Config::Method.new batch_run_reports_config
|
816
866
|
batch_run_pivot_reports_config = parent_rpcs&.batch_run_pivot_reports if parent_rpcs&.respond_to? :batch_run_pivot_reports
|
817
867
|
@batch_run_pivot_reports = ::Gapic::Config::Method.new batch_run_pivot_reports_config
|
818
|
-
get_universal_metadata_config = parent_rpcs&.get_universal_metadata if parent_rpcs&.respond_to? :get_universal_metadata
|
819
|
-
@get_universal_metadata = ::Gapic::Config::Method.new get_universal_metadata_config
|
820
868
|
get_metadata_config = parent_rpcs&.get_metadata if parent_rpcs&.respond_to? :get_metadata
|
821
869
|
@get_metadata = ::Gapic::Config::Method.new get_metadata_config
|
870
|
+
run_realtime_report_config = parent_rpcs&.run_realtime_report if parent_rpcs&.respond_to? :run_realtime_report
|
871
|
+
@run_realtime_report = ::Gapic::Config::Method.new run_realtime_report_config
|
822
872
|
|
823
873
|
yield self if block_given?
|
824
874
|
end
|
@@ -78,15 +78,30 @@ 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
|
84
|
+
add_message "google.analytics.data.v1alpha.RunRealtimeReportRequest" do
|
85
|
+
optional :property, :string, 1
|
86
|
+
repeated :dimensions, :message, 2, "google.analytics.data.v1alpha.Dimension"
|
87
|
+
repeated :metrics, :message, 3, "google.analytics.data.v1alpha.Metric"
|
88
|
+
optional :limit, :int64, 4
|
89
|
+
optional :dimension_filter, :message, 5, "google.analytics.data.v1alpha.FilterExpression"
|
90
|
+
optional :metric_filter, :message, 6, "google.analytics.data.v1alpha.FilterExpression"
|
91
|
+
repeated :metric_aggregations, :enum, 7, "google.analytics.data.v1alpha.MetricAggregation"
|
92
|
+
repeated :order_bys, :message, 8, "google.analytics.data.v1alpha.OrderBy"
|
93
|
+
optional :return_property_quota, :bool, 9
|
94
|
+
end
|
95
|
+
add_message "google.analytics.data.v1alpha.RunRealtimeReportResponse" do
|
96
|
+
repeated :dimension_headers, :message, 1, "google.analytics.data.v1alpha.DimensionHeader"
|
97
|
+
repeated :metric_headers, :message, 2, "google.analytics.data.v1alpha.MetricHeader"
|
98
|
+
repeated :rows, :message, 3, "google.analytics.data.v1alpha.Row"
|
99
|
+
repeated :totals, :message, 4, "google.analytics.data.v1alpha.Row"
|
100
|
+
repeated :maximums, :message, 5, "google.analytics.data.v1alpha.Row"
|
101
|
+
repeated :minimums, :message, 6, "google.analytics.data.v1alpha.Row"
|
102
|
+
optional :row_count, :int32, 7
|
103
|
+
optional :property_quota, :message, 8, "google.analytics.data.v1alpha.PropertyQuota"
|
104
|
+
end
|
90
105
|
end
|
91
106
|
end
|
92
107
|
|
@@ -103,9 +118,9 @@ module Google
|
|
103
118
|
BatchRunReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunReportsResponse").msgclass
|
104
119
|
BatchRunPivotReportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunPivotReportsRequest").msgclass
|
105
120
|
BatchRunPivotReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunPivotReportsResponse").msgclass
|
106
|
-
GetUniversalMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.GetUniversalMetadataRequest").msgclass
|
107
|
-
UniversalMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.UniversalMetadata").msgclass
|
108
121
|
GetMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.GetMetadataRequest").msgclass
|
122
|
+
RunRealtimeReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunRealtimeReportRequest").msgclass
|
123
|
+
RunRealtimeReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunRealtimeReportResponse").msgclass
|
109
124
|
end
|
110
125
|
end
|
111
126
|
end
|
@@ -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
|
#
|
@@ -71,6 +64,10 @@ module Google
|
|
71
64
|
# `customEvent:levels_unlocked`. Universal metadata are dimensions and
|
72
65
|
# metrics applicable to any property such as `country` and `totalUsers`.
|
73
66
|
rpc :GetMetadata, ::Google::Analytics::Data::V1alpha::GetMetadataRequest, ::Google::Analytics::Data::V1alpha::Metadata
|
67
|
+
# The Google Analytics Realtime API returns a customized report of realtime
|
68
|
+
# event data for your property. These reports show events and usage from the
|
69
|
+
# last 30 minutes.
|
70
|
+
rpc :RunRealtimeReport, ::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest, ::Google::Analytics::Data::V1alpha::RunRealtimeReportResponse
|
74
71
|
end
|
75
72
|
|
76
73
|
Stub = Service.rpc_stub_class
|
@@ -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
|
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# Resource name of this metadata.
|
28
28
|
# @!attribute [rw] dimensions
|
29
29
|
# @return [::Array<::Google::Analytics::Data::V1alpha::DimensionMetadata>]
|
30
|
-
# The
|
30
|
+
# The dimension descriptions.
|
31
31
|
# @!attribute [rw] metrics
|
32
32
|
# @return [::Array<::Google::Analytics::Data::V1alpha::MetricMetadata>]
|
33
33
|
# The metric descriptions.
|
@@ -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,33 +319,100 @@ module Google
|
|
310
319
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
311
320
|
end
|
312
321
|
|
313
|
-
# Request for
|
314
|
-
|
322
|
+
# Request for a property's dimension and metric metadata.
|
323
|
+
# @!attribute [rw] name
|
324
|
+
# @return [::String]
|
325
|
+
# Required. The resource name of the metadata to retrieve. This name field is
|
326
|
+
# specified in the URL path and not URL parameters. Property is a numeric
|
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).
|
330
|
+
#
|
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.
|
336
|
+
class GetMetadataRequest
|
315
337
|
include ::Google::Protobuf::MessageExts
|
316
338
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
317
339
|
end
|
318
340
|
|
319
|
-
# The
|
341
|
+
# The request to generate a realtime report.
|
342
|
+
# @!attribute [rw] property
|
343
|
+
# @return [::String]
|
344
|
+
# A Google Analytics GA4 property identifier whose events are tracked.
|
345
|
+
# Specified in the URL path and not the body. To learn more, see [where to
|
346
|
+
# find your Property
|
347
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
348
|
+
#
|
349
|
+
# Example: properties/1234
|
320
350
|
# @!attribute [rw] dimensions
|
321
|
-
# @return [::Array<::Google::Analytics::Data::V1alpha::
|
322
|
-
# The dimensions
|
351
|
+
# @return [::Array<::Google::Analytics::Data::V1alpha::Dimension>]
|
352
|
+
# The dimensions requested and displayed.
|
323
353
|
# @!attribute [rw] metrics
|
324
|
-
# @return [::Array<::Google::Analytics::Data::V1alpha::
|
325
|
-
# The
|
326
|
-
|
354
|
+
# @return [::Array<::Google::Analytics::Data::V1alpha::Metric>]
|
355
|
+
# The metrics requested and displayed.
|
356
|
+
# @!attribute [rw] limit
|
357
|
+
# @return [::Integer]
|
358
|
+
# The number of rows to return. If unspecified, 10 rows are returned. If
|
359
|
+
# -1, all rows are returned.
|
360
|
+
# @!attribute [rw] dimension_filter
|
361
|
+
# @return [::Google::Analytics::Data::V1alpha::FilterExpression]
|
362
|
+
# The filter clause of dimensions. Dimensions must be requested to be used in
|
363
|
+
# this filter. Metrics cannot be used in this filter.
|
364
|
+
# @!attribute [rw] metric_filter
|
365
|
+
# @return [::Google::Analytics::Data::V1alpha::FilterExpression]
|
366
|
+
# The filter clause of metrics. Applied at post aggregation phase, similar to
|
367
|
+
# SQL having-clause. Metrics must be requested to be used in this filter.
|
368
|
+
# Dimensions cannot be used in this filter.
|
369
|
+
# @!attribute [rw] metric_aggregations
|
370
|
+
# @return [::Array<::Google::Analytics::Data::V1alpha::MetricAggregation>]
|
371
|
+
# Aggregation of metrics. Aggregated metric values will be shown in rows
|
372
|
+
# where the dimension_values are set to "RESERVED_(MetricAggregation)".
|
373
|
+
# @!attribute [rw] order_bys
|
374
|
+
# @return [::Array<::Google::Analytics::Data::V1alpha::OrderBy>]
|
375
|
+
# Specifies how rows are ordered in the response.
|
376
|
+
# @!attribute [rw] return_property_quota
|
377
|
+
# @return [::Boolean]
|
378
|
+
# Toggles whether to return the current state of this Analytics Property's
|
379
|
+
# Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
380
|
+
class RunRealtimeReportRequest
|
327
381
|
include ::Google::Protobuf::MessageExts
|
328
382
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
329
383
|
end
|
330
384
|
|
331
|
-
#
|
332
|
-
# @!attribute [rw]
|
333
|
-
# @return [::
|
334
|
-
#
|
335
|
-
#
|
336
|
-
#
|
337
|
-
#
|
338
|
-
#
|
339
|
-
|
385
|
+
# The response realtime report table corresponding to a request.
|
386
|
+
# @!attribute [rw] dimension_headers
|
387
|
+
# @return [::Array<::Google::Analytics::Data::V1alpha::DimensionHeader>]
|
388
|
+
# Describes dimension columns. The number of DimensionHeaders and ordering of
|
389
|
+
# DimensionHeaders matches the dimensions present in rows.
|
390
|
+
# @!attribute [rw] metric_headers
|
391
|
+
# @return [::Array<::Google::Analytics::Data::V1alpha::MetricHeader>]
|
392
|
+
# Describes metric columns. The number of MetricHeaders and ordering of
|
393
|
+
# MetricHeaders matches the metrics present in rows.
|
394
|
+
# @!attribute [rw] rows
|
395
|
+
# @return [::Array<::Google::Analytics::Data::V1alpha::Row>]
|
396
|
+
# Rows of dimension value combinations and metric values in the report.
|
397
|
+
# @!attribute [rw] totals
|
398
|
+
# @return [::Array<::Google::Analytics::Data::V1alpha::Row>]
|
399
|
+
# If requested, the totaled values of metrics.
|
400
|
+
# @!attribute [rw] maximums
|
401
|
+
# @return [::Array<::Google::Analytics::Data::V1alpha::Row>]
|
402
|
+
# If requested, the maximum values of metrics.
|
403
|
+
# @!attribute [rw] minimums
|
404
|
+
# @return [::Array<::Google::Analytics::Data::V1alpha::Row>]
|
405
|
+
# If requested, the minimum values of metrics.
|
406
|
+
# @!attribute [rw] row_count
|
407
|
+
# @return [::Integer]
|
408
|
+
# The total number of rows in the query result, regardless of the number of
|
409
|
+
# rows returned in the response. For example if a query returns 175 rows and
|
410
|
+
# includes limit = 50 in the API request, the response will contain row_count
|
411
|
+
# = 175 but only 50 rows.
|
412
|
+
# @!attribute [rw] property_quota
|
413
|
+
# @return [::Google::Analytics::Data::V1alpha::PropertyQuota]
|
414
|
+
# This Analytics Property's Realtime quota state including this request.
|
415
|
+
class RunRealtimeReportResponse
|
340
416
|
include ::Google::Protobuf::MessageExts
|
341
417
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
342
418
|
end
|
@@ -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
|
@@ -50,18 +49,30 @@ module Google
|
|
50
49
|
# The unique identifier of the property whose events are tracked.
|
51
50
|
# @!attribute [rw] property_id
|
52
51
|
# @return [::String]
|
53
|
-
# A Google Analytics
|
52
|
+
# A Google Analytics GA4 property id. To learn more, see [where to find your
|
53
|
+
# Property
|
54
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
54
55
|
class Entity
|
55
56
|
include ::Google::Protobuf::MessageExts
|
56
57
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
57
58
|
end
|
58
59
|
|
59
|
-
# Dimensions are attributes of your data. For example, the dimension
|
60
|
-
# indicates the city
|
61
|
-
#
|
60
|
+
# Dimensions are attributes of your data. For example, the dimension city
|
61
|
+
# indicates the city from which an event originates. Dimension values in report
|
62
|
+
# responses are strings; for example, city could be "Paris" or "New York".
|
63
|
+
# Requests are allowed up to 8 dimensions.
|
62
64
|
# @!attribute [rw] name
|
63
65
|
# @return [::String]
|
64
|
-
# The name of the dimension.
|
66
|
+
# The name of the dimension. See the [API
|
67
|
+
# Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
|
68
|
+
# for the list of dimension names.
|
69
|
+
#
|
70
|
+
# If `dimensionExpression` is specified, `name` can be any string that you
|
71
|
+
# would like. For example if a `dimensionExpression` concatenates `country`
|
72
|
+
# and `city`, you could call that dimension `countryAndCity`.
|
73
|
+
#
|
74
|
+
# Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
|
75
|
+
# `dimensionExpression`, and `pivots`.
|
65
76
|
# @!attribute [rw] dimension_expression
|
66
77
|
# @return [::Google::Analytics::Data::V1alpha::DimensionExpression]
|
67
78
|
# One dimension can be the result of an expression of multiple dimensions.
|
@@ -119,20 +130,30 @@ module Google
|
|
119
130
|
end
|
120
131
|
end
|
121
132
|
|
122
|
-
# The quantitative measurements of a report. For example, the metric
|
123
|
-
# is the total number of events. Requests are allowed up to 10
|
133
|
+
# The quantitative measurements of a report. For example, the metric
|
134
|
+
# `eventCount` is the total number of events. Requests are allowed up to 10
|
135
|
+
# metrics.
|
124
136
|
# @!attribute [rw] name
|
125
137
|
# @return [::String]
|
126
|
-
# The name of the metric.
|
138
|
+
# The name of the metric. See the [API
|
139
|
+
# Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
|
140
|
+
# for the list of metric names.
|
141
|
+
#
|
142
|
+
# If `expression` is specified, `name` can be any string that you would like.
|
143
|
+
# For example if `expression` is `screenPageViews/sessions`, you could call
|
144
|
+
# that metric's name = `viewsPerSession`.
|
145
|
+
#
|
146
|
+
# Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
|
147
|
+
# `expression`.
|
127
148
|
# @!attribute [rw] expression
|
128
149
|
# @return [::String]
|
129
150
|
# A mathematical expression for derived metrics. For example, the metric
|
130
|
-
# Event count per user is eventCount/totalUsers
|
151
|
+
# Event count per user is `eventCount/totalUsers`.
|
131
152
|
# @!attribute [rw] invisible
|
132
153
|
# @return [::Boolean]
|
133
|
-
# Indicates if a metric is invisible.
|
134
|
-
#
|
135
|
-
# used in
|
154
|
+
# Indicates if a metric is invisible in the report response. If a metric is
|
155
|
+
# invisible, the metric will not produce a column in the response, but can be
|
156
|
+
# used in `metricFilter`, `orderBys`, or a metric `expression`.
|
136
157
|
class Metric
|
137
158
|
include ::Google::Protobuf::MessageExts
|
138
159
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -176,7 +197,10 @@ module Google
|
|
176
197
|
# or metrics.
|
177
198
|
# @!attribute [rw] null_filter
|
178
199
|
# @return [::Boolean]
|
179
|
-
# A filter for null values.
|
200
|
+
# A filter for null values. If True, a null dimension value is matched by
|
201
|
+
# this filter. Null filter is commonly used inside a NOT filter
|
202
|
+
# expression. For example, a NOT expression of a null filter removes rows
|
203
|
+
# when a dimension is null.
|
180
204
|
# @!attribute [rw] string_filter
|
181
205
|
# @return [::Google::Analytics::Data::V1alpha::Filter::StringFilter]
|
182
206
|
# Strings related filter.
|
@@ -423,23 +447,38 @@ module Google
|
|
423
447
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
424
448
|
end
|
425
449
|
|
426
|
-
# 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.
|
427
462
|
# @!attribute [rw] cohorts
|
428
463
|
# @return [::Array<::Google::Analytics::Data::V1alpha::Cohort>]
|
429
|
-
#
|
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.
|
430
468
|
# @!attribute [rw] cohorts_range
|
431
469
|
# @return [::Google::Analytics::Data::V1alpha::CohortsRange]
|
432
|
-
#
|
470
|
+
# Cohort reports follow cohorts over an extended reporting date range. This
|
471
|
+
# range specifies an offset duration to follow the cohorts over.
|
433
472
|
# @!attribute [rw] cohort_report_settings
|
434
473
|
# @return [::Google::Analytics::Data::V1alpha::CohortReportSettings]
|
435
|
-
#
|
474
|
+
# Optional settings for a cohort report.
|
436
475
|
class CohortSpec
|
437
476
|
include ::Google::Protobuf::MessageExts
|
438
477
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
439
478
|
end
|
440
479
|
|
441
|
-
# Defines a cohort. A cohort is a group of users who share
|
442
|
-
# 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`
|
443
482
|
# belong to the same cohort.
|
444
483
|
# @!attribute [rw] name
|
445
484
|
# @return [::String]
|
@@ -449,69 +488,100 @@ module Google
|
|
449
488
|
# `cohort_0`, `cohort_1`, etc.
|
450
489
|
# @!attribute [rw] dimension
|
451
490
|
# @return [::String]
|
452
|
-
#
|
453
|
-
# report.
|
491
|
+
# Dimension used by the cohort. Required and only supports `firstTouchDate`.
|
454
492
|
# @!attribute [rw] date_range
|
455
493
|
# @return [::Google::Analytics::Data::V1alpha::DateRange]
|
456
|
-
# The cohort selects users whose first
|
457
|
-
#
|
458
|
-
#
|
459
|
-
# `
|
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.
|
460
500
|
#
|
461
|
-
#
|
462
|
-
#
|
463
|
-
#
|
464
|
-
#
|
465
|
-
# CohortsRange uses
|
466
|
-
#
|
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.
|
467
510
|
class Cohort
|
468
511
|
include ::Google::Protobuf::MessageExts
|
469
512
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
470
513
|
end
|
471
514
|
|
472
|
-
#
|
473
|
-
#
|
474
|
-
# @return [::Boolean]
|
475
|
-
# If true, accumulates the result from first visit day to the end day. Not
|
476
|
-
# supported in `RunReportRequest`.
|
477
|
-
class CohortReportSettings
|
478
|
-
include ::Google::Protobuf::MessageExts
|
479
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
480
|
-
end
|
481
|
-
|
482
|
-
# 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.
|
483
517
|
# @!attribute [rw] granularity
|
484
518
|
# @return [::Google::Analytics::Data::V1alpha::CohortsRange::Granularity]
|
485
|
-
#
|
486
|
-
#
|
519
|
+
# The granularity used to interpret the `startOffset` and `endOffset` for the
|
520
|
+
# extended reporting date range for a cohort report.
|
487
521
|
# @!attribute [rw] start_offset
|
488
522
|
# @return [::Integer]
|
489
|
-
#
|
490
|
-
#
|
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.
|
491
535
|
# @!attribute [rw] end_offset
|
492
536
|
# @return [::Integer]
|
493
|
-
#
|
494
|
-
#
|
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.
|
495
550
|
class CohortsRange
|
496
551
|
include ::Google::Protobuf::MessageExts
|
497
552
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
498
553
|
|
499
|
-
#
|
554
|
+
# The granularity used to interpret the `startOffset` and `endOffset` for the
|
555
|
+
# extended reporting date range for a cohort report.
|
500
556
|
module Granularity
|
501
|
-
#
|
557
|
+
# Should never be specified.
|
502
558
|
GRANULARITY_UNSPECIFIED = 0
|
503
559
|
|
504
|
-
# Daily
|
560
|
+
# Daily granularity. Commonly used if the cohort's `dateRange` is a single
|
561
|
+
# day and the request contains `cohortNthDay`.
|
505
562
|
DAILY = 1
|
506
563
|
|
507
|
-
# 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`.
|
508
567
|
WEEKLY = 2
|
509
568
|
|
510
|
-
# Monthly
|
569
|
+
# Monthly granularity. Commonly used if the cohort's `dateRange` is a month
|
570
|
+
# in duration and the request contains `cohortNthMonth`.
|
511
571
|
MONTHLY = 3
|
512
572
|
end
|
513
573
|
end
|
514
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
|
+
|
515
585
|
# Response's metadata carrying additional information about the report content.
|
516
586
|
# @!attribute [rw] data_loss_from_other_row
|
517
587
|
# @return [::Boolean]
|
@@ -577,28 +647,38 @@ module Google
|
|
577
647
|
# For example if RunReportRequest contains:
|
578
648
|
#
|
579
649
|
# ```none
|
580
|
-
# dimensions
|
581
|
-
#
|
582
|
-
#
|
583
|
-
#
|
584
|
-
#
|
585
|
-
#
|
586
|
-
#
|
587
|
-
#
|
588
|
-
#
|
650
|
+
# "dimensions": [
|
651
|
+
# {
|
652
|
+
# "name": "eventName"
|
653
|
+
# },
|
654
|
+
# {
|
655
|
+
# "name": "countryId"
|
656
|
+
# }
|
657
|
+
# ],
|
658
|
+
# "metrics": [
|
659
|
+
# {
|
660
|
+
# "name": "eventCount"
|
661
|
+
# }
|
662
|
+
# ]
|
589
663
|
# ```
|
590
664
|
#
|
591
|
-
# One row with 'in_app_purchase' as the eventName, '
|
665
|
+
# One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and
|
592
666
|
# 15 as the eventCount, would be:
|
593
667
|
#
|
594
668
|
# ```none
|
595
|
-
#
|
596
|
-
#
|
597
|
-
#
|
598
|
-
#
|
599
|
-
#
|
600
|
-
#
|
601
|
-
#
|
669
|
+
# "dimensionValues": [
|
670
|
+
# {
|
671
|
+
# "value": "in_app_purchase"
|
672
|
+
# },
|
673
|
+
# {
|
674
|
+
# "value": "JP"
|
675
|
+
# }
|
676
|
+
# ],
|
677
|
+
# "metricValues": [
|
678
|
+
# {
|
679
|
+
# "value": "15"
|
680
|
+
# }
|
681
|
+
# ]
|
602
682
|
# ```
|
603
683
|
# @!attribute [rw] dimension_values
|
604
684
|
# @return [::Array<::Google::Analytics::Data::V1alpha::DimensionValue>]
|
@@ -647,20 +727,24 @@ module Google
|
|
647
727
|
# Exhausted errors.
|
648
728
|
# @!attribute [rw] tokens_per_day
|
649
729
|
# @return [::Google::Analytics::Data::V1alpha::QuotaStatus]
|
650
|
-
# Analytics Properties can use up to 25,000 tokens per day
|
730
|
+
# Standard Analytics Properties can use up to 25,000 tokens per day;
|
731
|
+
# Analytics 360 Properties can use 250,000 tokens per day. Most requests
|
651
732
|
# consume fewer than 10 tokens.
|
652
733
|
# @!attribute [rw] tokens_per_hour
|
653
734
|
# @return [::Google::Analytics::Data::V1alpha::QuotaStatus]
|
654
|
-
# Analytics Properties can use up to 5,000 tokens per day
|
655
|
-
#
|
656
|
-
#
|
735
|
+
# Standard Analytics Properties can use up to 5,000 tokens per day; Analytics
|
736
|
+
# 360 Properties can use 50,000 tokens per day. An API request consumes a
|
737
|
+
# single number of tokens, and that number is deducted from both the hourly
|
738
|
+
# and daily quotas.
|
657
739
|
# @!attribute [rw] concurrent_requests
|
658
740
|
# @return [::Google::Analytics::Data::V1alpha::QuotaStatus]
|
659
|
-
# Analytics Properties can send up to 10 concurrent requests
|
741
|
+
# Standard Analytics Properties can send up to 10 concurrent requests;
|
742
|
+
# Analytics 360 Properties can use up to 50 concurrent requests.
|
660
743
|
# @!attribute [rw] server_errors_per_project_per_hour
|
661
744
|
# @return [::Google::Analytics::Data::V1alpha::QuotaStatus]
|
662
|
-
# Analytics Properties and cloud project pairs can have up to 10
|
663
|
-
# server errors per hour
|
745
|
+
# Standard Analytics Properties and cloud project pairs can have up to 10
|
746
|
+
# server errors per hour; Analytics 360 Properties and cloud project pairs
|
747
|
+
# can have up to 50 server errors per hour.
|
664
748
|
class PropertyQuota
|
665
749
|
include ::Google::Protobuf::MessageExts
|
666
750
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -696,6 +780,9 @@ module Google
|
|
696
780
|
# dimension is available by either `apiName` or one of `deprecatedApiNames`
|
697
781
|
# for a period of time. After the deprecation period, the dimension will be
|
698
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.
|
699
786
|
class DimensionMetadata
|
700
787
|
include ::Google::Protobuf::MessageExts
|
701
788
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -727,6 +814,9 @@ module Google
|
|
727
814
|
# The mathematical expression for this derived metric. Can be used in
|
728
815
|
# [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
|
729
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.
|
730
820
|
class MetricMetadata
|
731
821
|
include ::Google::Protobuf::MessageExts
|
732
822
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-analytics-data-v1alpha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
198
|
- !ruby/object:Gem::Version
|
199
199
|
version: '0'
|
200
200
|
requirements: []
|
201
|
-
rubygems_version: 3.
|
201
|
+
rubygems_version: 3.2.6
|
202
202
|
signing_key:
|
203
203
|
specification_version: 4
|
204
204
|
summary: API Client library for the Google Analytics Data V1alpha API
|