@google-analytics/data 4.7.0 → 4.9.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.9.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.8.0...data-v4.9.0) (2024-09-24)
4
+
5
+
6
+ ### Features
7
+
8
+ * [analytics-data] add `GetPropertyQuotasSnapshot` method to the Data API v1alpha ([#5692](https://github.com/googleapis/google-cloud-node/issues/5692)) ([a143a79](https://github.com/googleapis/google-cloud-node/commit/a143a7926ab91dce75a2db2d831d498d3f3524d8))
9
+
10
+ ## [4.8.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.7.0...data-v4.8.0) (2024-08-09)
11
+
12
+
13
+ ### Features
14
+
15
+ * [analytics-data] add the `comparisons` field to the `Metadata` resource ([#5600](https://github.com/googleapis/google-cloud-node/issues/5600)) ([e77b934](https://github.com/googleapis/google-cloud-node/commit/e77b9348a198e3a3e60e71474ac3320273d17f6e))
16
+
3
17
  ## [4.7.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.6.0...data-v4.7.0) (2024-05-21)
4
18
 
5
19
 
package/README.md CHANGED
@@ -43,7 +43,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
43
43
 
44
44
  1. [Select or create a Cloud Platform project][projects].
45
45
  1. [Enable the Google Analytics Data API][enable_api].
46
- 1. [Set up authentication with a service account][auth] so you can access the
46
+ 1. [Set up authentication][auth] so you can access the
47
47
  API from your local workstation.
48
48
 
49
49
  ### Installing the client library
@@ -113,6 +113,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
113
113
  | Alpha_analytics_data.create_recurring_audience_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js,packages/google-analytics-data/samples/README.md) |
114
114
  | Alpha_analytics_data.create_report_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js,packages/google-analytics-data/samples/README.md) |
115
115
  | Alpha_analytics_data.get_audience_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js,packages/google-analytics-data/samples/README.md) |
116
+ | Alpha_analytics_data.get_property_quotas_snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js,packages/google-analytics-data/samples/README.md) |
116
117
  | Alpha_analytics_data.get_recurring_audience_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js,packages/google-analytics-data/samples/README.md) |
117
118
  | Alpha_analytics_data.get_report_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js,packages/google-analytics-data/samples/README.md) |
118
119
  | Alpha_analytics_data.list_audience_lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js,packages/google-analytics-data/samples/README.md) |
@@ -202,4 +203,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
202
203
  [projects]: https://console.cloud.google.com/project
203
204
  [billing]: https://support.google.com/cloud/answer/6293499#enable-billing
204
205
  [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=analyticsdata.googleapis.com
205
- [auth]: https://cloud.google.com/docs/authentication/getting-started
206
+ [auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
@@ -266,10 +266,26 @@ service AlphaAnalyticsData {
266
266
  option (google.api.method_signature) = "parent";
267
267
  }
268
268
 
269
+ // Get all property quotas organized by quota category for a given property.
270
+ // This will charge 1 property quota from the category with the most quota.
271
+ rpc GetPropertyQuotasSnapshot(GetPropertyQuotasSnapshotRequest)
272
+ returns (PropertyQuotasSnapshot) {
273
+ option (google.api.http) = {
274
+ get: "/v1alpha/{name=properties/*/propertyQuotasSnapshot}"
275
+ };
276
+ option (google.api.method_signature) = "name";
277
+ }
278
+
269
279
  // Initiates the creation of a report task. This method quickly
270
280
  // returns a report task and initiates a long running
271
281
  // asynchronous request to form a customized report of your Google Analytics
272
282
  // event data.
283
+ //
284
+ // A report task will be retained and available for querying for 72 hours
285
+ // after it has been created.
286
+ //
287
+ // A report task created by one user can be listed and queried by all users
288
+ // who have access to the property.
273
289
  rpc CreateReportTask(CreateReportTaskRequest)
274
290
  returns (google.longrunning.Operation) {
275
291
  option (google.api.http) = {
@@ -514,6 +530,40 @@ message ListRecurringAudienceListsResponse {
514
530
  optional string next_page_token = 2;
515
531
  }
516
532
 
533
+ // A request to return the PropertyQuotasSnapshot for a given category.
534
+ message GetPropertyQuotasSnapshotRequest {
535
+ // Required. Quotas from this property will be listed in the response.
536
+ // Format: `properties/{property}/propertyQuotasSnapshot`
537
+ string name = 1 [
538
+ (google.api.field_behavior) = REQUIRED,
539
+ (google.api.resource_reference) = {
540
+ type: "analyticsadmin.googleapis.com/PropertyQuotasSnapshot"
541
+ }
542
+ ];
543
+ }
544
+
545
+ // Current state of all Property Quotas organized by quota category.
546
+ message PropertyQuotasSnapshot {
547
+ option (google.api.resource) = {
548
+ type: "analyticsadmin.googleapis.com/PropertyQuotasSnapshot"
549
+ pattern: "properties/{property}/propertyQuotasSnapshot"
550
+ plural: "propertyQuotasSnapshots"
551
+ singular: "propertyQuotasSnapshot"
552
+ };
553
+
554
+ // Identifier. The property quota snapshot resource name.
555
+ string name = 4 [(google.api.field_behavior) = IDENTIFIER];
556
+
557
+ // Property Quota for core property tokens
558
+ PropertyQuota core_property_quota = 1;
559
+
560
+ // Property Quota for realtime property tokens
561
+ PropertyQuota realtime_property_quota = 2;
562
+
563
+ // Property Quota for funnel property tokens
564
+ PropertyQuota funnel_property_quota = 3;
565
+ }
566
+
517
567
  // A request to retrieve configuration metadata about a specific audience list.
518
568
  message GetAudienceListRequest {
519
569
  // Required. The audience list resource name.
@@ -844,9 +894,9 @@ message RunFunnelReportRequest {
844
894
  TRENDED_FUNNEL = 2;
845
895
  }
846
896
 
847
- // Optional. A Google Analytics GA4 property identifier whose events are
848
- // tracked. Specified in the URL path and not the body. To learn more, see
849
- // [where to find your Property
897
+ // Optional. A Google Analytics property identifier whose events are tracked.
898
+ // Specified in the URL path and not the body. To learn more, see [where to
899
+ // find your Property
850
900
  // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
851
901
  // Within a batch request, this property should either be unspecified or
852
902
  // consistent with the batch-level property.
@@ -1030,7 +1080,7 @@ message ReportTask {
1030
1080
  // not separately removed by a filter.
1031
1081
  //
1032
1082
  // Regardless of this `keep_empty_rows` setting, only data recorded by the
1033
- // Google Analytics (GA4) property can be displayed in a report.
1083
+ // Google Analytics property can be displayed in a report.
1034
1084
  //
1035
1085
  // For example if a property never logs a `purchase` event, then a query for
1036
1086
  // the `eventName` dimension and `eventCount` metric will not have a row
@@ -1104,7 +1154,7 @@ message ReportTask {
1104
1154
  }
1105
1155
 
1106
1156
  // Output only. Identifier. The report task resource name assigned during
1107
- // creation. Format: `properties/{property}/reportTasks/{report_task}`
1157
+ // creation. Format: "properties/{property}/reportTasks/{report_task}"
1108
1158
  string name = 1 [
1109
1159
  (google.api.field_behavior) = IDENTIFIER,
1110
1160
  (google.api.field_behavior) = OUTPUT_ONLY
@@ -1107,7 +1107,7 @@ enum EventExclusionDuration {
1107
1107
  // Another segment might be users who purchase a particular line of products or
1108
1108
  // who visit a specific part of your site or trigger certain events in your app.
1109
1109
  //
1110
- // To learn more, see [GA4 Segment
1110
+ // To learn more, see [Segment
1111
1111
  // Builder](https://support.google.com/analytics/answer/9304353).
1112
1112
  message Segment {
1113
1113
  // The name for this segment. If unspecified, segments are named "Segment".
@@ -1561,8 +1561,8 @@ enum MetricType {
1561
1561
  TYPE_KILOMETERS = 13;
1562
1562
  }
1563
1563
 
1564
- // Categories of data that you may be restricted from viewing on certain GA4
1565
- // properties.
1564
+ // Categories of data that you may be restricted from viewing on certain
1565
+ // Google Analytics properties.
1566
1566
  enum RestrictedMetricType {
1567
1567
  // Unspecified type.
1568
1568
  RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0;
@@ -311,6 +311,9 @@ message Metadata {
311
311
 
312
312
  // The metric descriptions.
313
313
  repeated MetricMetadata metrics = 2;
314
+
315
+ // The comparison descriptions.
316
+ repeated ComparisonMetadata comparisons = 4;
314
317
  }
315
318
 
316
319
  // The request to generate a report.
@@ -403,6 +406,11 @@ message RunReportRequest {
403
406
  // Toggles whether to return the current state of this Analytics Property's
404
407
  // quota. Quota is returned in [PropertyQuota](#PropertyQuota).
405
408
  bool return_property_quota = 14;
409
+
410
+ // Optional. The configuration of comparisons requested and displayed. The
411
+ // request only requires a comparisons field in order to receive a comparison
412
+ // column in the response.
413
+ repeated Comparison comparisons = 15 [(google.api.field_behavior) = OPTIONAL];
406
414
  }
407
415
 
408
416
  // The response report table corresponding to a request.
@@ -515,6 +523,11 @@ message RunPivotReportRequest {
515
523
  // Toggles whether to return the current state of this Analytics Property's
516
524
  // quota. Quota is returned in [PropertyQuota](#PropertyQuota).
517
525
  bool return_property_quota = 11;
526
+
527
+ // Optional. The configuration of comparisons requested and displayed. The
528
+ // request requires both a comparisons field and a comparisons dimension to
529
+ // receive a comparison column in the response.
530
+ repeated Comparison comparisons = 12 [(google.api.field_behavior) = OPTIONAL];
518
531
  }
519
532
 
520
533
  // The response pivot report table corresponding to a pivot request.
@@ -186,6 +186,25 @@ message Metric {
186
186
  bool invisible = 3;
187
187
  }
188
188
 
189
+ // Defines an individual comparison. Most requests will include multiple
190
+ // comparisons so that the report compares between the comparisons.
191
+ message Comparison {
192
+ // Each comparison produces separate rows in the response. In the response,
193
+ // this comparison is identified by this name. If name is unspecified, we will
194
+ // use the saved comparisons display name.
195
+ optional string name = 1;
196
+
197
+ // One kind of comparison value
198
+ oneof one_comparison {
199
+ // A basic comparison.
200
+ FilterExpression dimension_filter = 2;
201
+
202
+ // A saved comparison identified by the comparison's resource name.
203
+ // For example, 'comparisons/1234'.
204
+ string comparison = 3;
205
+ }
206
+ }
207
+
189
208
  // To express dimension or metric filters. The fields in the same
190
209
  // FilterExpression need to be either all dimensions or all metrics.
191
210
  message FilterExpression {
@@ -861,7 +880,11 @@ message DimensionMetadata {
861
880
  // available only by `apiName`.
862
881
  repeated string deprecated_api_names = 4;
863
882
 
864
- // True if the dimension is a custom dimension for this property.
883
+ // True if the dimension is custom to this property. This includes user,
884
+ // event, & item scoped custom dimensions; to learn more about custom
885
+ // dimensions, see https://support.google.com/analytics/answer/14240153. This
886
+ // also include custom channel groups; to learn more about custom channel
887
+ // groups, see https://support.google.com/analytics/answer/13051316.
865
888
  bool custom_definition = 5;
866
889
 
867
890
  // The display name of the category that this dimension belongs to. Similar
@@ -928,6 +951,19 @@ message MetricMetadata {
928
951
  string category = 10;
929
952
  }
930
953
 
954
+ // The metadata for a single comparison.
955
+ message ComparisonMetadata {
956
+ // This comparison's resource name. Useable in [Comparison](#Comparison)'s
957
+ // `comparison` field. For example, 'comparisons/1234'.
958
+ string api_name = 1;
959
+
960
+ // This comparison's name within the Google Analytics user interface.
961
+ string ui_name = 2;
962
+
963
+ // This comparison's description.
964
+ string description = 3;
965
+ }
966
+
931
967
  // The compatibility for a single dimension.
932
968
  message DimensionCompatibility {
933
969
  // The dimension metadata contains the API name for this compatibility