google-analytics-data-v1alpha 0.3.1 → 0.7.0
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/README.md +64 -0
- data/lib/google/analytics/data/v1alpha.rb +3 -0
- data/lib/google/analytics/data/v1alpha/analytics_data/client.rb +110 -54
- 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
- data/proto_docs/google/api/field_behavior.rb +6 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f1f102c64905a1dbbb3ca35ea1f45a1b6715f77bf0f49b9145f959bddad0618
|
4
|
+
data.tar.gz: 66274a94ad9f6695a6edb528e6b1c120b99596c44289412499aab5f162bd0b9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 659e65666d5dd59f4fc212e5e0f3d300da171793ff947c1681af291bf65310de4355599e9f3d7ab1f53496870002db4f902bbe3e38d144de306f86b9f34c0025
|
7
|
+
data.tar.gz: ad58507a7c5868124381d7f2a43c14a26f9088e6fcc185f0c2e4dfb3a07d4d998b3d65e27c84919c546d2f870cd23f31bd640e2233247cc11ab4cba3ea585c37
|
data/README.md
CHANGED
@@ -6,6 +6,12 @@ The Google Analytics Data API provides programmatic methods to access report dat
|
|
6
6
|
|
7
7
|
https://github.com/googleapis/google-cloud-ruby
|
8
8
|
|
9
|
+
This gem is a _versioned_ client. It provides basic client classes for a
|
10
|
+
specific version of the Google Analytics Data V1alpha API. Most users should consider using
|
11
|
+
the main client gem,
|
12
|
+
[google-analytics-data](https://rubygems.org/gems/google-analytics-data).
|
13
|
+
See the section below titled *Which client should I use?* for more information.
|
14
|
+
|
9
15
|
## Installation
|
10
16
|
|
11
17
|
```
|
@@ -70,3 +76,61 @@ in security maintenance, and not end of life. Currently, this means Ruby 2.4
|
|
70
76
|
and later. Older versions of Ruby _may_ still work, but are unsupported and not
|
71
77
|
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
|
72
78
|
about the Ruby support schedule.
|
79
|
+
|
80
|
+
## Which client should I use?
|
81
|
+
|
82
|
+
Most modern Ruby client libraries for Google APIs come in two flavors: the main
|
83
|
+
client library with a name such as `google-analytics-data`,
|
84
|
+
and lower-level _versioned_ client libraries with names such as
|
85
|
+
`google-analytics-data-v1alpha`.
|
86
|
+
_In most cases, you should install the main client._
|
87
|
+
|
88
|
+
### What's the difference between the main client and a versioned client?
|
89
|
+
|
90
|
+
A _versioned client_ provides a basic set of data types and client classes for
|
91
|
+
a _single version_ of a specific service. (That is, for a service with multiple
|
92
|
+
versions, there might be a separate versioned client for each service version.)
|
93
|
+
Most versioned clients are written and maintained by a code generator.
|
94
|
+
|
95
|
+
The _main client_ is designed to provide you with the _recommended_ client
|
96
|
+
interfaces for the service. There will be only one main client for any given
|
97
|
+
service, even a service with multiple versions. The main client includes
|
98
|
+
factory methods for constructing the client objects we recommend for most
|
99
|
+
users. In some cases, those will be classes provided by an underlying versioned
|
100
|
+
client; in other cases, they will be handwritten higher-level client objects
|
101
|
+
with additional capabilities, convenience methods, or best practices built in.
|
102
|
+
Generally, the main client will default to a recommended service version,
|
103
|
+
although in some cases you can override this if you need to talk to a specific
|
104
|
+
service version.
|
105
|
+
|
106
|
+
### Why would I want to use the main client?
|
107
|
+
|
108
|
+
We recommend that most users install the main client gem for a service. You can
|
109
|
+
identify this gem as the one _without_ a version in its name, e.g.
|
110
|
+
`google-analytics-data`.
|
111
|
+
The main client is recommended because it will embody the best practices for
|
112
|
+
accessing the service, and may also provide more convenient interfaces or
|
113
|
+
tighter integration into frameworks and third-party libraries. In addition, the
|
114
|
+
documentation and samples published by Google will generally demonstrate use of
|
115
|
+
the main client.
|
116
|
+
|
117
|
+
### Why would I want to use a versioned client?
|
118
|
+
|
119
|
+
You can use a versioned client if you are content with a possibly lower-level
|
120
|
+
class interface, you explicitly want to avoid features provided by the main
|
121
|
+
client, or you want to access a specific service version not be covered by the
|
122
|
+
main client. You can identify versioned client gems because the service version
|
123
|
+
is part of the name, e.g. `google-analytics-data-v1alpha`.
|
124
|
+
|
125
|
+
### What about the google-apis-<name> clients?
|
126
|
+
|
127
|
+
Client library gems with names that begin with `google-apis-` are based on an
|
128
|
+
older code generation technology. They talk to a REST/JSON backend (whereas
|
129
|
+
most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may
|
130
|
+
not offer the same performance, features, and ease of use provided by more
|
131
|
+
modern clients.
|
132
|
+
|
133
|
+
The `google-apis-` clients have wide coverage across Google services, so you
|
134
|
+
might need to use one if there is no modern client available for the service.
|
135
|
+
However, if a modern client is available, we generally recommend it over the
|
136
|
+
older `google-apis-` clients.
|
@@ -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)".
|
@@ -504,40 +516,62 @@ module Google
|
|
504
516
|
|
505
517
|
##
|
506
518
|
# Returns metadata for dimensions and metrics available in reporting methods.
|
507
|
-
# Used to explore the dimensions and metrics.
|
508
|
-
#
|
519
|
+
# Used to explore the dimensions and metrics. In this method, a Google
|
520
|
+
# Analytics GA4 Property Identifier is specified in the request, and
|
521
|
+
# the metadata response includes Custom dimensions and metrics as well as
|
522
|
+
# Universal metadata.
|
509
523
|
#
|
510
|
-
#
|
511
|
-
#
|
524
|
+
# For example if a custom metric with parameter name `levels_unlocked` is
|
525
|
+
# registered to a property, the Metadata response will contain
|
526
|
+
# `customEvent:levels_unlocked`. Universal metadata are dimensions and
|
527
|
+
# metrics applicable to any property such as `country` and `totalUsers`.
|
512
528
|
#
|
513
|
-
# @overload
|
514
|
-
# Pass arguments to `
|
515
|
-
# {::Google::Analytics::Data::V1alpha::
|
529
|
+
# @overload get_metadata(request, options = nil)
|
530
|
+
# Pass arguments to `get_metadata` via a request object, either of type
|
531
|
+
# {::Google::Analytics::Data::V1alpha::GetMetadataRequest} or an equivalent Hash.
|
516
532
|
#
|
517
|
-
# @param request [::Google::Analytics::Data::V1alpha::
|
533
|
+
# @param request [::Google::Analytics::Data::V1alpha::GetMetadataRequest, ::Hash]
|
518
534
|
# A request object representing the call parameters. Required. To specify no
|
519
535
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
520
536
|
# @param options [::Gapic::CallOptions, ::Hash]
|
521
537
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
522
538
|
#
|
539
|
+
# @overload get_metadata(name: nil)
|
540
|
+
# Pass arguments to `get_metadata` via keyword arguments. Note that at
|
541
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
542
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
543
|
+
#
|
544
|
+
# @param name [::String]
|
545
|
+
# Required. The resource name of the metadata to retrieve. This name field is
|
546
|
+
# specified in the URL path and not URL parameters. Property is a numeric
|
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).
|
550
|
+
#
|
551
|
+
# Example: properties/1234/metadata
|
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
|
+
#
|
523
557
|
# @yield [response, operation] Access the result along with the RPC operation
|
524
|
-
# @yieldparam response [::Google::Analytics::Data::V1alpha::
|
558
|
+
# @yieldparam response [::Google::Analytics::Data::V1alpha::Metadata]
|
525
559
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
526
560
|
#
|
527
|
-
# @return [::Google::Analytics::Data::V1alpha::
|
561
|
+
# @return [::Google::Analytics::Data::V1alpha::Metadata]
|
528
562
|
#
|
529
563
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
530
564
|
#
|
531
|
-
def
|
565
|
+
def get_metadata request, options = nil
|
532
566
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
533
567
|
|
534
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::
|
568
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::GetMetadataRequest
|
535
569
|
|
536
570
|
# Converts hash and nil to an options object
|
537
571
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
538
572
|
|
539
573
|
# Customize the options with defaults
|
540
|
-
metadata = @config.rpcs.
|
574
|
+
metadata = @config.rpcs.get_metadata.metadata.to_h
|
541
575
|
|
542
576
|
# Set x-goog-api-client and x-goog-user-project headers
|
543
577
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -545,13 +579,19 @@ module Google
|
|
545
579
|
gapic_version: ::Google::Analytics::Data::V1alpha::VERSION
|
546
580
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
547
581
|
|
548
|
-
|
582
|
+
header_params = {
|
583
|
+
"name" => request.name
|
584
|
+
}
|
585
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
586
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
587
|
+
|
588
|
+
options.apply_defaults timeout: @config.rpcs.get_metadata.timeout,
|
549
589
|
metadata: metadata,
|
550
|
-
retry_policy: @config.rpcs.
|
590
|
+
retry_policy: @config.rpcs.get_metadata.retry_policy
|
551
591
|
options.apply_defaults metadata: @config.metadata,
|
552
592
|
retry_policy: @config.retry_policy
|
553
593
|
|
554
|
-
@analytics_data_stub.call_rpc :
|
594
|
+
@analytics_data_stub.call_rpc :get_metadata, request, options: options do |response, operation|
|
555
595
|
yield response, operation if block_given?
|
556
596
|
return response
|
557
597
|
end
|
@@ -560,57 +600,73 @@ module Google
|
|
560
600
|
end
|
561
601
|
|
562
602
|
##
|
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`.
|
603
|
+
# The Google Analytics Realtime API returns a customized report of realtime
|
604
|
+
# event data for your property. These reports show events and usage from the
|
605
|
+
# last 30 minutes.
|
573
606
|
#
|
574
|
-
# @overload
|
575
|
-
# Pass arguments to `
|
576
|
-
# {::Google::Analytics::Data::V1alpha::
|
607
|
+
# @overload run_realtime_report(request, options = nil)
|
608
|
+
# Pass arguments to `run_realtime_report` via a request object, either of type
|
609
|
+
# {::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest} or an equivalent Hash.
|
577
610
|
#
|
578
|
-
# @param request [::Google::Analytics::Data::V1alpha::
|
611
|
+
# @param request [::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest, ::Hash]
|
579
612
|
# A request object representing the call parameters. Required. To specify no
|
580
613
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
581
614
|
# @param options [::Gapic::CallOptions, ::Hash]
|
582
615
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
583
616
|
#
|
584
|
-
# @overload
|
585
|
-
# Pass arguments to `
|
617
|
+
# @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)
|
618
|
+
# Pass arguments to `run_realtime_report` via keyword arguments. Note that at
|
586
619
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
587
620
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
588
621
|
#
|
589
|
-
# @param
|
590
|
-
#
|
591
|
-
#
|
592
|
-
#
|
622
|
+
# @param property [::String]
|
623
|
+
# A Google Analytics GA4 property identifier whose events are tracked.
|
624
|
+
# Specified in the URL path and not the body. To learn more, see [where to
|
625
|
+
# find your Property
|
626
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
593
627
|
#
|
594
|
-
# Example: properties/1234
|
628
|
+
# Example: properties/1234
|
629
|
+
# @param dimensions [::Array<::Google::Analytics::Data::V1alpha::Dimension, ::Hash>]
|
630
|
+
# The dimensions requested and displayed.
|
631
|
+
# @param metrics [::Array<::Google::Analytics::Data::V1alpha::Metric, ::Hash>]
|
632
|
+
# The metrics requested and displayed.
|
633
|
+
# @param limit [::Integer]
|
634
|
+
# The number of rows to return. If unspecified, 10 rows are returned. If
|
635
|
+
# -1, all rows are returned.
|
636
|
+
# @param dimension_filter [::Google::Analytics::Data::V1alpha::FilterExpression, ::Hash]
|
637
|
+
# The filter clause of dimensions. Dimensions must be requested to be used in
|
638
|
+
# this filter. Metrics cannot be used in this filter.
|
639
|
+
# @param metric_filter [::Google::Analytics::Data::V1alpha::FilterExpression, ::Hash]
|
640
|
+
# The filter clause of metrics. Applied at post aggregation phase, similar to
|
641
|
+
# SQL having-clause. Metrics must be requested to be used in this filter.
|
642
|
+
# Dimensions cannot be used in this filter.
|
643
|
+
# @param metric_aggregations [::Array<::Google::Analytics::Data::V1alpha::MetricAggregation>]
|
644
|
+
# Aggregation of metrics. Aggregated metric values will be shown in rows
|
645
|
+
# where the dimension_values are set to "RESERVED_(MetricAggregation)".
|
646
|
+
# @param order_bys [::Array<::Google::Analytics::Data::V1alpha::OrderBy, ::Hash>]
|
647
|
+
# Specifies how rows are ordered in the response.
|
648
|
+
# @param return_property_quota [::Boolean]
|
649
|
+
# Toggles whether to return the current state of this Analytics Property's
|
650
|
+
# Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
595
651
|
#
|
596
652
|
# @yield [response, operation] Access the result along with the RPC operation
|
597
|
-
# @yieldparam response [::Google::Analytics::Data::V1alpha::
|
653
|
+
# @yieldparam response [::Google::Analytics::Data::V1alpha::RunRealtimeReportResponse]
|
598
654
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
599
655
|
#
|
600
|
-
# @return [::Google::Analytics::Data::V1alpha::
|
656
|
+
# @return [::Google::Analytics::Data::V1alpha::RunRealtimeReportResponse]
|
601
657
|
#
|
602
658
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
603
659
|
#
|
604
|
-
def
|
660
|
+
def run_realtime_report request, options = nil
|
605
661
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
606
662
|
|
607
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::
|
663
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest
|
608
664
|
|
609
665
|
# Converts hash and nil to an options object
|
610
666
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
611
667
|
|
612
668
|
# Customize the options with defaults
|
613
|
-
metadata = @config.rpcs.
|
669
|
+
metadata = @config.rpcs.run_realtime_report.metadata.to_h
|
614
670
|
|
615
671
|
# Set x-goog-api-client and x-goog-user-project headers
|
616
672
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -619,18 +675,18 @@ module Google
|
|
619
675
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
620
676
|
|
621
677
|
header_params = {
|
622
|
-
"
|
678
|
+
"property" => request.property
|
623
679
|
}
|
624
680
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
625
681
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
626
682
|
|
627
|
-
options.apply_defaults timeout: @config.rpcs.
|
683
|
+
options.apply_defaults timeout: @config.rpcs.run_realtime_report.timeout,
|
628
684
|
metadata: metadata,
|
629
|
-
retry_policy: @config.rpcs.
|
685
|
+
retry_policy: @config.rpcs.run_realtime_report.retry_policy
|
630
686
|
options.apply_defaults metadata: @config.metadata,
|
631
687
|
retry_policy: @config.retry_policy
|
632
688
|
|
633
|
-
@analytics_data_stub.call_rpc :
|
689
|
+
@analytics_data_stub.call_rpc :run_realtime_report, request, options: options do |response, operation|
|
634
690
|
yield response, operation if block_given?
|
635
691
|
return response
|
636
692
|
end
|
@@ -763,7 +819,7 @@ module Google
|
|
763
819
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
764
820
|
# the following configuration fields:
|
765
821
|
#
|
766
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
822
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
767
823
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
768
824
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
769
825
|
# include the following keys:
|
@@ -795,15 +851,15 @@ module Google
|
|
795
851
|
#
|
796
852
|
attr_reader :batch_run_pivot_reports
|
797
853
|
##
|
798
|
-
# RPC-specific configuration for `
|
854
|
+
# RPC-specific configuration for `get_metadata`
|
799
855
|
# @return [::Gapic::Config::Method]
|
800
856
|
#
|
801
|
-
attr_reader :
|
857
|
+
attr_reader :get_metadata
|
802
858
|
##
|
803
|
-
# RPC-specific configuration for `
|
859
|
+
# RPC-specific configuration for `run_realtime_report`
|
804
860
|
# @return [::Gapic::Config::Method]
|
805
861
|
#
|
806
|
-
attr_reader :
|
862
|
+
attr_reader :run_realtime_report
|
807
863
|
|
808
864
|
# @private
|
809
865
|
def initialize parent_rpcs = nil
|
@@ -815,10 +871,10 @@ module Google
|
|
815
871
|
@batch_run_reports = ::Gapic::Config::Method.new batch_run_reports_config
|
816
872
|
batch_run_pivot_reports_config = parent_rpcs&.batch_run_pivot_reports if parent_rpcs&.respond_to? :batch_run_pivot_reports
|
817
873
|
@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
874
|
get_metadata_config = parent_rpcs&.get_metadata if parent_rpcs&.respond_to? :get_metadata
|
821
875
|
@get_metadata = ::Gapic::Config::Method.new get_metadata_config
|
876
|
+
run_realtime_report_config = parent_rpcs&.run_realtime_report if parent_rpcs&.respond_to? :run_realtime_report
|
877
|
+
@run_realtime_report = ::Gapic::Config::Method.new run_realtime_report_config
|
822
878
|
|
823
879
|
yield self if block_given?
|
824
880
|
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
|
@@ -54,6 +54,12 @@ module Google
|
|
54
54
|
# This indicates that the field may be set once in a request to create a
|
55
55
|
# resource, but may not be changed thereafter.
|
56
56
|
IMMUTABLE = 5
|
57
|
+
|
58
|
+
# Denotes that a (repeated) field is an unordered list.
|
59
|
+
# This indicates that the service may provide the elements of the list
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
|
+
# provided. Additionally, the list's order may or may not be stable.
|
62
|
+
UNORDERED_LIST = 6
|
57
63
|
end
|
58
64
|
end
|
59
65
|
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.7.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:
|
11
|
+
date: 2021-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -154,7 +154,9 @@ description: The Google Analytics Data API provides programmatic methods to acce
|
|
154
154
|
report data in Google Analytics App+Web properties. With the Google Analytics Data
|
155
155
|
API, you can build custom dashboards to display Google Analytics data, automate
|
156
156
|
complex reporting tasks to save time, and integrate your Google Analytics data with
|
157
|
-
other business applications.
|
157
|
+
other business applications. Note that google-analytics-data-v1alpha is a version-specific
|
158
|
+
client library. For most uses, we recommend installing the main client library google-analytics-data
|
159
|
+
instead. See the readme for more details.
|
158
160
|
email: googleapis-packages@google.com
|
159
161
|
executables: []
|
160
162
|
extensions: []
|
@@ -198,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
200
|
- !ruby/object:Gem::Version
|
199
201
|
version: '0'
|
200
202
|
requirements: []
|
201
|
-
rubygems_version: 3.
|
203
|
+
rubygems_version: 3.2.6
|
202
204
|
signing_key:
|
203
205
|
specification_version: 4
|
204
206
|
summary: API Client library for the Google Analytics Data V1alpha API
|