google-analytics-data-v1alpha 0.1.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/analytics/data/v1alpha/analytics_data/client.rb +127 -5
- data/lib/google/analytics/data/v1alpha/analytics_data/paths.rb +5 -22
- data/lib/google/analytics/data/v1alpha/analytics_data_api_pb.rb +24 -0
- data/lib/google/analytics/data/v1alpha/analytics_data_api_services_pb.rb +13 -2
- data/lib/google/analytics/data/v1alpha/data_pb.rb +8 -0
- data/lib/google/analytics/data/v1alpha/version.rb +1 -1
- data/proto_docs/google/analytics/data/v1alpha/analytics_data_api.rb +106 -5
- data/proto_docs/google/analytics/data/v1alpha/data.rb +104 -40
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46a4a35fe96d97d0e55469823d63d565fad0d23c91ec695e4900dd026dac33c2
|
4
|
+
data.tar.gz: 4fb8b75aa1d11f18617f9667010111ac548a77cd304e1d9e4522e9f3e395138d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88e10c1f978a46c7e3417bc54941af2a6dc1d8c04b01ec296dc0b868f01b606dfa7c37206a2ce71a12051364c43650e78e47e7863042d88552ccf375a0683771
|
7
|
+
data.tar.gz: ae84293ce9806270947f602b06f98b16cfae7435ad075a7672ef7de96e111cda55793e309971c7c79c5a4bb9e2aad2af593625f59691d4356b31f7e3d37a1ccc
|
@@ -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](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](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,8 +510,15 @@ 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.
|
517
|
+
#
|
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`.
|
509
522
|
#
|
510
523
|
# @overload get_metadata(request, options = nil)
|
511
524
|
# Pass arguments to `get_metadata` via a request object, either of type
|
@@ -523,10 +536,17 @@ module Google
|
|
523
536
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
524
537
|
#
|
525
538
|
# @param name [::String]
|
526
|
-
# Required. The name of the metadata to retrieve.
|
527
|
-
# 'metadata' or 'properties/\\{property}/metadata'. This name field is
|
539
|
+
# Required. The resource name of the metadata to retrieve. This name field is
|
528
540
|
# specified in the URL path and not URL parameters. Property is a numeric
|
529
|
-
# Google Analytics
|
541
|
+
# Google Analytics GA4 Property identifier. To learn more, see [where to find
|
542
|
+
# your Property
|
543
|
+
# ID](https://developers.google.com/analytics/trusted-testing/analytics-data/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.
|
530
550
|
#
|
531
551
|
# @yield [response, operation] Access the result along with the RPC operation
|
532
552
|
# @yieldparam response [::Google::Analytics::Data::V1alpha::Metadata]
|
@@ -573,6 +593,101 @@ module Google
|
|
573
593
|
raise ::Google::Cloud::Error.from_error(e)
|
574
594
|
end
|
575
595
|
|
596
|
+
##
|
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.
|
600
|
+
#
|
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.
|
604
|
+
#
|
605
|
+
# @param request [::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest, ::Hash]
|
606
|
+
# A request object representing the call parameters. Required. To specify no
|
607
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
608
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
609
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
610
|
+
#
|
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
|
613
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
614
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
615
|
+
#
|
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/trusted-testing/analytics-data/property-id).
|
621
|
+
#
|
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).
|
645
|
+
#
|
646
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
647
|
+
# @yieldparam response [::Google::Analytics::Data::V1alpha::RunRealtimeReportResponse]
|
648
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
649
|
+
#
|
650
|
+
# @return [::Google::Analytics::Data::V1alpha::RunRealtimeReportResponse]
|
651
|
+
#
|
652
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
653
|
+
#
|
654
|
+
def run_realtime_report request, options = nil
|
655
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
656
|
+
|
657
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest
|
658
|
+
|
659
|
+
# Converts hash and nil to an options object
|
660
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
661
|
+
|
662
|
+
# Customize the options with defaults
|
663
|
+
metadata = @config.rpcs.run_realtime_report.metadata.to_h
|
664
|
+
|
665
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
666
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
667
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
668
|
+
gapic_version: ::Google::Analytics::Data::V1alpha::VERSION
|
669
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
670
|
+
|
671
|
+
header_params = {
|
672
|
+
"property" => request.property
|
673
|
+
}
|
674
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
675
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
676
|
+
|
677
|
+
options.apply_defaults timeout: @config.rpcs.run_realtime_report.timeout,
|
678
|
+
metadata: metadata,
|
679
|
+
retry_policy: @config.rpcs.run_realtime_report.retry_policy
|
680
|
+
options.apply_defaults metadata: @config.metadata,
|
681
|
+
retry_policy: @config.retry_policy
|
682
|
+
|
683
|
+
@analytics_data_stub.call_rpc :run_realtime_report, request, options: options do |response, operation|
|
684
|
+
yield response, operation if block_given?
|
685
|
+
return response
|
686
|
+
end
|
687
|
+
rescue ::GRPC::BadStatus => e
|
688
|
+
raise ::Google::Cloud::Error.from_error(e)
|
689
|
+
end
|
690
|
+
|
576
691
|
##
|
577
692
|
# Configuration class for the AnalyticsData API.
|
578
693
|
#
|
@@ -734,6 +849,11 @@ module Google
|
|
734
849
|
# @return [::Gapic::Config::Method]
|
735
850
|
#
|
736
851
|
attr_reader :get_metadata
|
852
|
+
##
|
853
|
+
# RPC-specific configuration for `run_realtime_report`
|
854
|
+
# @return [::Gapic::Config::Method]
|
855
|
+
#
|
856
|
+
attr_reader :run_realtime_report
|
737
857
|
|
738
858
|
# @private
|
739
859
|
def initialize parent_rpcs = nil
|
@@ -747,6 +867,8 @@ module Google
|
|
747
867
|
@batch_run_pivot_reports = ::Gapic::Config::Method.new batch_run_pivot_reports_config
|
748
868
|
get_metadata_config = parent_rpcs&.get_metadata if parent_rpcs&.respond_to? :get_metadata
|
749
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
|
750
872
|
|
751
873
|
yield self if block_given?
|
752
874
|
end
|
@@ -27,32 +27,15 @@ module Google
|
|
27
27
|
##
|
28
28
|
# Create a fully-qualified Metadata resource string.
|
29
29
|
#
|
30
|
-
#
|
31
|
-
# The resource will be in the following format:
|
30
|
+
# The resource will be in the following format:
|
32
31
|
#
|
33
|
-
#
|
32
|
+
# `properties/{property}/metadata`
|
34
33
|
#
|
35
|
-
# @
|
36
|
-
# The resource will be in the following format:
|
37
|
-
#
|
38
|
-
# `properties/{property}/metadata`
|
39
|
-
#
|
40
|
-
# @param property [String]
|
34
|
+
# @param property [String]
|
41
35
|
#
|
42
36
|
# @return [::String]
|
43
|
-
def metadata_path
|
44
|
-
|
45
|
-
"" => (proc do
|
46
|
-
"metadata"
|
47
|
-
end),
|
48
|
-
"property" => (proc do |property:|
|
49
|
-
"properties/#{property}/metadata"
|
50
|
-
end)
|
51
|
-
}
|
52
|
-
|
53
|
-
resource = resources[args.keys.sort.join(":")]
|
54
|
-
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
55
|
-
resource.call(**args)
|
37
|
+
def metadata_path property:
|
38
|
+
"properties/#{property}/metadata"
|
56
39
|
end
|
57
40
|
|
58
41
|
extend self
|
@@ -38,6 +38,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
38
38
|
repeated :totals, :message, 8, "google.analytics.data.v1alpha.Row"
|
39
39
|
repeated :maximums, :message, 9, "google.analytics.data.v1alpha.Row"
|
40
40
|
repeated :minimums, :message, 10, "google.analytics.data.v1alpha.Row"
|
41
|
+
optional :row_count, :int32, 12
|
41
42
|
optional :metadata, :message, 6, "google.analytics.data.v1alpha.ResponseMetaData"
|
42
43
|
optional :property_quota, :message, 7, "google.analytics.data.v1alpha.PropertyQuota"
|
43
44
|
end
|
@@ -80,6 +81,27 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
80
81
|
add_message "google.analytics.data.v1alpha.GetMetadataRequest" do
|
81
82
|
optional :name, :string, 1
|
82
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
|
83
105
|
end
|
84
106
|
end
|
85
107
|
|
@@ -97,6 +119,8 @@ module Google
|
|
97
119
|
BatchRunPivotReportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunPivotReportsRequest").msgclass
|
98
120
|
BatchRunPivotReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunPivotReportsResponse").msgclass
|
99
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
|
100
124
|
end
|
101
125
|
end
|
102
126
|
end
|
@@ -54,9 +54,20 @@ 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.
|
58
|
-
#
|
57
|
+
# Used to explore the dimensions and metrics. In this method, a Google
|
58
|
+
# Analytics GA4 Property Identifier is specified in the request, and
|
59
|
+
# the metadata response includes Custom dimensions and metrics as well as
|
60
|
+
# Universal metadata.
|
61
|
+
#
|
62
|
+
# For example if a custom metric with parameter name `levels_unlocked` is
|
63
|
+
# registered to a property, the Metadata response will contain
|
64
|
+
# `customEvent:levels_unlocked`. Universal metadata are dimensions and
|
65
|
+
# metrics applicable to any property such as `country` and `totalUsers`.
|
59
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
|
60
71
|
end
|
61
72
|
|
62
73
|
Stub = Service.rpc_stub_class
|
@@ -224,7 +224,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
224
224
|
value :TYPE_INTEGER, 1
|
225
225
|
value :TYPE_FLOAT, 2
|
226
226
|
value :TYPE_SECONDS, 4
|
227
|
+
value :TYPE_MILLISECONDS, 5
|
228
|
+
value :TYPE_MINUTES, 6
|
229
|
+
value :TYPE_HOURS, 7
|
230
|
+
value :TYPE_STANDARD, 8
|
227
231
|
value :TYPE_CURRENCY, 9
|
232
|
+
value :TYPE_FEET, 10
|
233
|
+
value :TYPE_MILES, 11
|
234
|
+
value :TYPE_METERS, 12
|
235
|
+
value :TYPE_KILOMETERS, 13
|
228
236
|
end
|
229
237
|
end
|
230
238
|
end
|
@@ -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](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](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
|
@@ -120,6 +126,15 @@ module Google
|
|
120
126
|
# @!attribute [rw] minimums
|
121
127
|
# @return [::Array<::Google::Analytics::Data::V1alpha::Row>]
|
122
128
|
# If requested, the minimum values of metrics.
|
129
|
+
# @!attribute [rw] row_count
|
130
|
+
# @return [::Integer]
|
131
|
+
# The total number of rows in the query result, regardless of the number of
|
132
|
+
# rows returned in the response. For example if a query returns 175 rows and
|
133
|
+
# includes limit = 50 in the API request, the response will contain row_count
|
134
|
+
# = 175 but only 50 rows.
|
135
|
+
#
|
136
|
+
# To learn more about this pagination parameter, see
|
137
|
+
# [Pagination](basics#pagination).
|
123
138
|
# @!attribute [rw] metadata
|
124
139
|
# @return [::Google::Analytics::Data::V1alpha::ResponseMetaData]
|
125
140
|
# Metadata for the report.
|
@@ -304,17 +319,103 @@ module Google
|
|
304
319
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
305
320
|
end
|
306
321
|
|
307
|
-
# Request for dimension and metric metadata.
|
322
|
+
# Request for a property's dimension and metric metadata.
|
308
323
|
# @!attribute [rw] name
|
309
324
|
# @return [::String]
|
310
|
-
# Required. The name of the metadata to retrieve.
|
311
|
-
# 'metadata' or 'properties/\\{property}/metadata'. This name field is
|
325
|
+
# Required. The resource name of the metadata to retrieve. This name field is
|
312
326
|
# specified in the URL path and not URL parameters. Property is a numeric
|
313
|
-
# 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/trusted-testing/analytics-data/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.
|
314
336
|
class GetMetadataRequest
|
315
337
|
include ::Google::Protobuf::MessageExts
|
316
338
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
317
339
|
end
|
340
|
+
|
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/trusted-testing/analytics-data/property-id).
|
348
|
+
#
|
349
|
+
# Example: properties/1234
|
350
|
+
# @!attribute [rw] dimensions
|
351
|
+
# @return [::Array<::Google::Analytics::Data::V1alpha::Dimension>]
|
352
|
+
# The dimensions requested and displayed.
|
353
|
+
# @!attribute [rw] metrics
|
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
|
381
|
+
include ::Google::Protobuf::MessageExts
|
382
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
383
|
+
end
|
384
|
+
|
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
|
416
|
+
include ::Google::Protobuf::MessageExts
|
417
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
418
|
+
end
|
318
419
|
end
|
319
420
|
end
|
320
421
|
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/trusted-testing/analytics-data/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/trusted-testing/analytics-data/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/trusted-testing/analytics-data/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.
|
@@ -556,7 +580,9 @@ module Google
|
|
556
580
|
# combinations.
|
557
581
|
# @!attribute [rw] row_count
|
558
582
|
# @return [::Integer]
|
559
|
-
# The cardinality of the pivot as if offset = 0 and limit = -1.
|
583
|
+
# The cardinality of the pivot as if offset = 0 and limit = -1. The total
|
584
|
+
# number of rows for this pivot's fields regardless of how the parameters
|
585
|
+
# offset and limit are specified in the request.
|
560
586
|
class PivotHeader
|
561
587
|
include ::Google::Protobuf::MessageExts
|
562
588
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -575,28 +601,38 @@ module Google
|
|
575
601
|
# For example if RunReportRequest contains:
|
576
602
|
#
|
577
603
|
# ```none
|
578
|
-
# dimensions
|
579
|
-
#
|
580
|
-
#
|
581
|
-
#
|
582
|
-
#
|
583
|
-
#
|
584
|
-
#
|
585
|
-
#
|
586
|
-
#
|
604
|
+
# "dimensions": [
|
605
|
+
# {
|
606
|
+
# "name": "eventName"
|
607
|
+
# },
|
608
|
+
# {
|
609
|
+
# "name": "countryId"
|
610
|
+
# }
|
611
|
+
# ],
|
612
|
+
# "metrics": [
|
613
|
+
# {
|
614
|
+
# "name": "eventCount"
|
615
|
+
# }
|
616
|
+
# ]
|
587
617
|
# ```
|
588
618
|
#
|
589
|
-
# One row with 'in_app_purchase' as the eventName, '
|
619
|
+
# One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and
|
590
620
|
# 15 as the eventCount, would be:
|
591
621
|
#
|
592
622
|
# ```none
|
593
|
-
#
|
594
|
-
#
|
595
|
-
#
|
596
|
-
#
|
597
|
-
#
|
598
|
-
#
|
599
|
-
#
|
623
|
+
# "dimensionValues": [
|
624
|
+
# {
|
625
|
+
# "value": "in_app_purchase"
|
626
|
+
# },
|
627
|
+
# {
|
628
|
+
# "value": "JP"
|
629
|
+
# }
|
630
|
+
# ],
|
631
|
+
# "metricValues": [
|
632
|
+
# {
|
633
|
+
# "value": "15"
|
634
|
+
# }
|
635
|
+
# ]
|
600
636
|
# ```
|
601
637
|
# @!attribute [rw] dimension_values
|
602
638
|
# @return [::Array<::Google::Analytics::Data::V1alpha::DimensionValue>]
|
@@ -645,20 +681,24 @@ module Google
|
|
645
681
|
# Exhausted errors.
|
646
682
|
# @!attribute [rw] tokens_per_day
|
647
683
|
# @return [::Google::Analytics::Data::V1alpha::QuotaStatus]
|
648
|
-
# Analytics Properties can use up to 25,000 tokens per day
|
684
|
+
# Standard Analytics Properties can use up to 25,000 tokens per day;
|
685
|
+
# Analytics 360 Properties can use 250,000 tokens per day. Most requests
|
649
686
|
# consume fewer than 10 tokens.
|
650
687
|
# @!attribute [rw] tokens_per_hour
|
651
688
|
# @return [::Google::Analytics::Data::V1alpha::QuotaStatus]
|
652
|
-
# Analytics Properties can use up to 5,000 tokens per day
|
653
|
-
#
|
654
|
-
#
|
689
|
+
# Standard Analytics Properties can use up to 5,000 tokens per day; Analytics
|
690
|
+
# 360 Properties can use 50,000 tokens per day. An API request consumes a
|
691
|
+
# single number of tokens, and that number is deducted from both the hourly
|
692
|
+
# and daily quotas.
|
655
693
|
# @!attribute [rw] concurrent_requests
|
656
694
|
# @return [::Google::Analytics::Data::V1alpha::QuotaStatus]
|
657
|
-
# Analytics Properties can send up to 10 concurrent requests
|
695
|
+
# Standard Analytics Properties can send up to 10 concurrent requests;
|
696
|
+
# Analytics 360 Properties can use up to 50 concurrent requests.
|
658
697
|
# @!attribute [rw] server_errors_per_project_per_hour
|
659
698
|
# @return [::Google::Analytics::Data::V1alpha::QuotaStatus]
|
660
|
-
# Analytics Properties and cloud project pairs can have up to 10
|
661
|
-
# server errors per hour
|
699
|
+
# Standard Analytics Properties and cloud project pairs can have up to 10
|
700
|
+
# server errors per hour; Analytics 360 Properties and cloud project pairs
|
701
|
+
# can have up to 50 server errors per hour.
|
662
702
|
class PropertyQuota
|
663
703
|
include ::Google::Protobuf::MessageExts
|
664
704
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -762,8 +802,32 @@ module Google
|
|
762
802
|
# A duration of seconds; a special floating point type.
|
763
803
|
TYPE_SECONDS = 4
|
764
804
|
|
805
|
+
# A duration in milliseconds; a special floating point type.
|
806
|
+
TYPE_MILLISECONDS = 5
|
807
|
+
|
808
|
+
# A duration in minutes; a special floating point type.
|
809
|
+
TYPE_MINUTES = 6
|
810
|
+
|
811
|
+
# A duration in hours; a special floating point type.
|
812
|
+
TYPE_HOURS = 7
|
813
|
+
|
814
|
+
# A custom metric of standard type; a special floating point type.
|
815
|
+
TYPE_STANDARD = 8
|
816
|
+
|
765
817
|
# An amount of money; a special floating point type.
|
766
818
|
TYPE_CURRENCY = 9
|
819
|
+
|
820
|
+
# A length in feet; a special floating point type.
|
821
|
+
TYPE_FEET = 10
|
822
|
+
|
823
|
+
# A length in miles; a special floating point type.
|
824
|
+
TYPE_MILES = 11
|
825
|
+
|
826
|
+
# A length in meters; a special floating point type.
|
827
|
+
TYPE_METERS = 12
|
828
|
+
|
829
|
+
# A length in kilometers; a special floating point type.
|
830
|
+
TYPE_KILOMETERS = 13
|
767
831
|
end
|
768
832
|
end
|
769
833
|
end
|
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.5.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: 2020-
|
11
|
+
date: 2020-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|