@google-analytics/data 7.0.0 → 7.2.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/build/protos/google/analytics/data/v1alpha/analytics_data_api.proto +58 -0
- package/build/protos/google/analytics/data/v1alpha/data.proto +122 -0
- package/build/protos/google/analytics/data/v1beta/analytics_data_api.proto +1 -1
- package/build/protos/google/analytics/data/v1beta/data.proto +71 -1
- package/build/protos/protos.d.ts +1911 -71
- package/build/protos/protos.js +1 -1
- package/build/protos/protos.json +519 -8
- package/build/src/v1alpha/alpha_analytics_data_client.d.ts +44 -0
- package/build/src/v1alpha/alpha_analytics_data_client.js +68 -23
- package/build/src/v1alpha/alpha_analytics_data_client_config.json +5 -0
- package/build/src/v1alpha/gapic_metadata.json +10 -0
- package/build/src/v1beta/beta_analytics_data_client.js +15 -15
- package/package.json +1 -1
|
@@ -38,6 +38,7 @@ service AlphaAnalyticsData {
|
|
|
38
38
|
option (google.api.default_host) = "analyticsdata.googleapis.com";
|
|
39
39
|
option (google.api.oauth_scopes) =
|
|
40
40
|
"https://www.googleapis.com/auth/analytics,"
|
|
41
|
+
"https://www.googleapis.com/auth/analytics.chatbot.read,"
|
|
41
42
|
"https://www.googleapis.com/auth/analytics.readonly";
|
|
42
43
|
|
|
43
44
|
// Returns a customized funnel report of your Google Analytics event data. The
|
|
@@ -301,6 +302,24 @@ service AlphaAnalyticsData {
|
|
|
301
302
|
option (google.api.method_signature) = "parent";
|
|
302
303
|
}
|
|
303
304
|
|
|
305
|
+
// Provides a chat interface for interacting with Google Analytics data
|
|
306
|
+
// through the API.
|
|
307
|
+
//
|
|
308
|
+
// This product uses AI and may display inaccurate info. Your chat activity
|
|
309
|
+
// may be used to improve the product and your use is subject to Google's
|
|
310
|
+
// [Terms](https://policies.google.com/terms),
|
|
311
|
+
// [AI Use
|
|
312
|
+
// Policy](https://policies.google.com/terms/generative-ai/use-policy), and
|
|
313
|
+
// [Privacy Policy](https://policies.google.com/privacy).
|
|
314
|
+
// [Learn more about Chat AI
|
|
315
|
+
// Privacy](https://support.google.com/helpguide/answer/14185196).
|
|
316
|
+
rpc Chat(ChatRequest) returns (ChatResponse) {
|
|
317
|
+
option (google.api.http) = {
|
|
318
|
+
post: "/v1alpha/{property=properties/*}:chat"
|
|
319
|
+
body: "*"
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
|
|
304
323
|
// Returns a customized report of your Google Analytics event data. Reports
|
|
305
324
|
// contain statistics derived from data collected by the Google Analytics
|
|
306
325
|
// tracking code. The data returned from the API is as a table with columns
|
|
@@ -1240,6 +1259,45 @@ message ListReportTasksResponse {
|
|
|
1240
1259
|
optional string next_page_token = 2;
|
|
1241
1260
|
}
|
|
1242
1261
|
|
|
1262
|
+
// Request message for the Chat method.
|
|
1263
|
+
message ChatRequest {
|
|
1264
|
+
// Required. The property to chat about.
|
|
1265
|
+
// Format: properties/{property}
|
|
1266
|
+
string property = 1 [
|
|
1267
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1268
|
+
(google.api.resource_reference) = {
|
|
1269
|
+
type: "analyticsadmin.googleapis.com/Property"
|
|
1270
|
+
}
|
|
1271
|
+
];
|
|
1272
|
+
|
|
1273
|
+
// Required. The user's query.
|
|
1274
|
+
string user_query = 2 [(google.api.field_behavior) = REQUIRED];
|
|
1275
|
+
|
|
1276
|
+
// Optional. Provide this session ID to continue an existing conversation
|
|
1277
|
+
// and maintain context. If this field is empty or unset, a new chat
|
|
1278
|
+
// session is created. Invalid session IDs will result in an error.
|
|
1279
|
+
optional string session_id = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
1280
|
+
|
|
1281
|
+
// Optional. If true, the response will include the current state of this
|
|
1282
|
+
// Analytics Property's quota. Quota is returned in
|
|
1283
|
+
// [PropertyChatQuota](#PropertyChatQuota).
|
|
1284
|
+
bool return_property_quota = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
// Response message for the Chat method.
|
|
1288
|
+
message ChatResponse {
|
|
1289
|
+
// The unique identifier for this chat session. Provide this ID in subsequent
|
|
1290
|
+
// requests to maintain conversational context.
|
|
1291
|
+
string session_id = 1;
|
|
1292
|
+
|
|
1293
|
+
// The response blocks that make up the chat response. This can include text,
|
|
1294
|
+
// tables, and lists.
|
|
1295
|
+
repeated ResponseBlock blocks = 2;
|
|
1296
|
+
|
|
1297
|
+
// This Analytics Property's quota state including this request.
|
|
1298
|
+
PropertyChatQuota property_quota = 3;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1243
1301
|
// The request to generate a report.
|
|
1244
1302
|
message RunReportRequest {
|
|
1245
1303
|
// Required. A Google Analytics property identifier whose events are tracked.
|
|
@@ -546,6 +546,73 @@ message ResponseMetaData {
|
|
|
546
546
|
repeated ActiveMetricRestriction active_metric_restrictions = 1;
|
|
547
547
|
}
|
|
548
548
|
|
|
549
|
+
// Describes a reason for data truncation in the report.
|
|
550
|
+
message DataTruncationReason {
|
|
551
|
+
// The type of data truncation.
|
|
552
|
+
enum DataTruncationType {
|
|
553
|
+
// Unspecified type.
|
|
554
|
+
DATA_TRUNCATION_TYPE_UNSPECIFIED = 0;
|
|
555
|
+
|
|
556
|
+
// Data is truncated in attribution report for rules-based models golden
|
|
557
|
+
// date.
|
|
558
|
+
DATA_TRUNCATION_TYPE_RULES_BASED_MODELS = 1;
|
|
559
|
+
|
|
560
|
+
// Data is truncated in attribution report for data driven attribution
|
|
561
|
+
// golden date.
|
|
562
|
+
DATA_TRUNCATION_TYPE_DATA_DRIVEN_ATTRIBUTION = 2;
|
|
563
|
+
|
|
564
|
+
// Data is truncated because DV360 policy does not permit data older than
|
|
565
|
+
// 2 years from being returned.
|
|
566
|
+
DATA_TRUNCATION_TYPE_DV360 = 3;
|
|
567
|
+
|
|
568
|
+
// Data is truncated because CM360 policy does not permit data older than
|
|
569
|
+
// 2 years from being returned.
|
|
570
|
+
DATA_TRUNCATION_TYPE_CM360 = 4;
|
|
571
|
+
|
|
572
|
+
// New item-scoped ecommerce metrics only have data after a specific date.
|
|
573
|
+
DATA_TRUNCATION_TYPE_ITEM_SCOPED_ECOMMERCE_METRICS = 5;
|
|
574
|
+
|
|
575
|
+
// New event-scoped ecommerce metrics only have data after a specific
|
|
576
|
+
// date.
|
|
577
|
+
DATA_TRUNCATION_TYPE_EVENT_SCOPED_ECOMMERCE_METRICS = 6;
|
|
578
|
+
|
|
579
|
+
// Query date range may not be fully served.
|
|
580
|
+
DATA_TRUNCATION_TYPE_DATE_RANGE = 7;
|
|
581
|
+
|
|
582
|
+
// Data truncated because the query attempts to read event data prior
|
|
583
|
+
// to its retention date.
|
|
584
|
+
DATA_TRUNCATION_TYPE_PROPERTY = 8;
|
|
585
|
+
|
|
586
|
+
// Data is truncated in conversions report.
|
|
587
|
+
DATA_TRUNCATION_TYPE_CONVERSIONS = 9;
|
|
588
|
+
|
|
589
|
+
// Data is truncated due to Google Ads 36 month retention policy.
|
|
590
|
+
DATA_TRUNCATION_TYPE_GOOGLE_ADS = 10;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
// Define the truncated date range from start_date to end_date.
|
|
594
|
+
message DataTruncationDateRange {
|
|
595
|
+
// The start date in the format YYYY-MM-DD (inclusive).
|
|
596
|
+
optional string start_date = 1;
|
|
597
|
+
|
|
598
|
+
// The end date in the format YYYY-MM-DD (inclusive).
|
|
599
|
+
optional string end_date = 2;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
// The type of data truncation.
|
|
603
|
+
optional DataTruncationType data_truncation_type = 1;
|
|
604
|
+
|
|
605
|
+
// A descriptive message explaining the data truncation.
|
|
606
|
+
optional string data_truncation_message = 2;
|
|
607
|
+
|
|
608
|
+
// The data truncation date in the format YYYY-MM-DD.
|
|
609
|
+
// Indicates data before this date is truncated.
|
|
610
|
+
optional string data_truncation_date = 3;
|
|
611
|
+
|
|
612
|
+
// The truncated date ranges.
|
|
613
|
+
repeated DataTruncationDateRange data_truncation_date_ranges = 4;
|
|
614
|
+
}
|
|
615
|
+
|
|
549
616
|
// If true, indicates some buckets of dimension combinations are rolled into
|
|
550
617
|
// "(other)" row. This can happen for high cardinality reports.
|
|
551
618
|
//
|
|
@@ -610,6 +677,9 @@ message ResponseMetaData {
|
|
|
610
677
|
|
|
611
678
|
// Identifies the type of data in the report.
|
|
612
679
|
Section section = 10;
|
|
680
|
+
|
|
681
|
+
// If set, indicate there is data truncation in the report.
|
|
682
|
+
repeated DataTruncationReason data_truncation_reasons = 11;
|
|
613
683
|
}
|
|
614
684
|
|
|
615
685
|
// Describes a dimension column in the report. Dimensions requested in a report
|
|
@@ -849,6 +919,49 @@ message FunnelSubReport {
|
|
|
849
919
|
FunnelResponseMetadata metadata = 4;
|
|
850
920
|
}
|
|
851
921
|
|
|
922
|
+
// One block of structured data in chat response.
|
|
923
|
+
message ResponseBlock {
|
|
924
|
+
// A cell in a data table.
|
|
925
|
+
message DataTableCell {
|
|
926
|
+
// The value of the cell.
|
|
927
|
+
string value = 1;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
// Describes a column header in a DataTable.
|
|
931
|
+
message DataTableHeader {
|
|
932
|
+
// The header name.
|
|
933
|
+
string header = 1;
|
|
934
|
+
|
|
935
|
+
// The data type.
|
|
936
|
+
string data_type = 2;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
// A row in a DataTable.
|
|
940
|
+
message DataTableRow {
|
|
941
|
+
// The cell values in the row.
|
|
942
|
+
repeated DataTableCell columns = 1;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
// A table of data.
|
|
946
|
+
message DataTable {
|
|
947
|
+
// Describes dimension columns. The number of headers and ordering of
|
|
948
|
+
// headers matches the dimensions present in rows.
|
|
949
|
+
repeated DataTableHeader headers = 1;
|
|
950
|
+
|
|
951
|
+
// Rows of dimension value combinations and metric values in the report.
|
|
952
|
+
repeated DataTableRow rows = 2;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
// One block of structured data.
|
|
956
|
+
oneof block {
|
|
957
|
+
// A block of text.
|
|
958
|
+
string text = 1;
|
|
959
|
+
|
|
960
|
+
// A block of table data.
|
|
961
|
+
DataTable table = 2;
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
|
|
852
965
|
// User segments are subsets of users who engaged with your site or app. For
|
|
853
966
|
// example, users who have previously purchased; users who added items to their
|
|
854
967
|
// shopping carts, but didn’t complete a purchase.
|
|
@@ -1812,3 +1925,12 @@ message ConversionMetadata {
|
|
|
1812
1925
|
// This conversion's name within the Google Analytics user interface.
|
|
1813
1926
|
string display_name = 2;
|
|
1814
1927
|
}
|
|
1928
|
+
|
|
1929
|
+
// Property quota for chatbot specific fields.
|
|
1930
|
+
message PropertyChatQuota {
|
|
1931
|
+
// Chat tokens consumed per day.
|
|
1932
|
+
QuotaStatus tokens_per_day = 1;
|
|
1933
|
+
|
|
1934
|
+
// Chat tokens consumed per hour.
|
|
1935
|
+
QuotaStatus tokens_per_hour = 2;
|
|
1936
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2026 Google LLC
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -622,6 +622,73 @@ message ResponseMetaData {
|
|
|
622
622
|
repeated ActiveMetricRestriction active_metric_restrictions = 1;
|
|
623
623
|
}
|
|
624
624
|
|
|
625
|
+
// Describes a reason for data truncation in the report.
|
|
626
|
+
message DataTruncationReason {
|
|
627
|
+
// The type of data truncation.
|
|
628
|
+
enum DataTruncationType {
|
|
629
|
+
// Unspecified type.
|
|
630
|
+
DATA_TRUNCATION_TYPE_UNSPECIFIED = 0;
|
|
631
|
+
|
|
632
|
+
// Data is truncated in attribution report for rules-based models golden
|
|
633
|
+
// date.
|
|
634
|
+
DATA_TRUNCATION_TYPE_RULES_BASED_MODELS = 1;
|
|
635
|
+
|
|
636
|
+
// Data is truncated in attribution report for data driven attribution
|
|
637
|
+
// golden date.
|
|
638
|
+
DATA_TRUNCATION_TYPE_DATA_DRIVEN_ATTRIBUTION = 2;
|
|
639
|
+
|
|
640
|
+
// Data is truncated because DV360 policy does not permit data older than
|
|
641
|
+
// 2 years from being returned.
|
|
642
|
+
DATA_TRUNCATION_TYPE_DV360 = 3;
|
|
643
|
+
|
|
644
|
+
// Data is truncated because CM360 policy does not permit data older than
|
|
645
|
+
// 2 years from being returned.
|
|
646
|
+
DATA_TRUNCATION_TYPE_CM360 = 4;
|
|
647
|
+
|
|
648
|
+
// New item-scoped ecommerce metrics only have data after a specific date.
|
|
649
|
+
DATA_TRUNCATION_TYPE_ITEM_SCOPED_ECOMMERCE_METRICS = 5;
|
|
650
|
+
|
|
651
|
+
// New event-scoped ecommerce metrics only have data after a specific
|
|
652
|
+
// date.
|
|
653
|
+
DATA_TRUNCATION_TYPE_EVENT_SCOPED_ECOMMERCE_METRICS = 6;
|
|
654
|
+
|
|
655
|
+
// Query date range may not be fully served.
|
|
656
|
+
DATA_TRUNCATION_TYPE_DATE_RANGE = 7;
|
|
657
|
+
|
|
658
|
+
// Data truncated because the query attempts to read event data prior
|
|
659
|
+
// to its retention date.
|
|
660
|
+
DATA_TRUNCATION_TYPE_PROPERTY = 8;
|
|
661
|
+
|
|
662
|
+
// Data is truncated in conversions report.
|
|
663
|
+
DATA_TRUNCATION_TYPE_CONVERSIONS = 9;
|
|
664
|
+
|
|
665
|
+
// Data is truncated due to Google Ads 36 month retention policy.
|
|
666
|
+
DATA_TRUNCATION_TYPE_GOOGLE_ADS = 10;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
// Define the truncated date range from start_date to end_date.
|
|
670
|
+
message DataTruncationDateRange {
|
|
671
|
+
// The start date in the format YYYY-MM-DD (inclusive).
|
|
672
|
+
optional string start_date = 1;
|
|
673
|
+
|
|
674
|
+
// The end date in the format YYYY-MM-DD (inclusive).
|
|
675
|
+
optional string end_date = 2;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
// The type of data truncation.
|
|
679
|
+
optional DataTruncationType data_truncation_type = 1;
|
|
680
|
+
|
|
681
|
+
// A descriptive message explaining the data truncation.
|
|
682
|
+
optional string data_truncation_message = 2;
|
|
683
|
+
|
|
684
|
+
// The data truncation date in the format YYYY-MM-DD.
|
|
685
|
+
// Indicates data before this date is truncated.
|
|
686
|
+
optional string data_truncation_date = 3;
|
|
687
|
+
|
|
688
|
+
// The truncated date ranges.
|
|
689
|
+
repeated DataTruncationDateRange data_truncation_date_ranges = 4;
|
|
690
|
+
}
|
|
691
|
+
|
|
625
692
|
// If true, indicates some buckets of dimension combinations are rolled into
|
|
626
693
|
// "(other)" row. This can happen for high cardinality reports.
|
|
627
694
|
//
|
|
@@ -681,6 +748,9 @@ message ResponseMetaData {
|
|
|
681
748
|
//
|
|
682
749
|
// However if the results are not sampled, this field will not be defined.
|
|
683
750
|
repeated SamplingMetadata sampling_metadatas = 9;
|
|
751
|
+
|
|
752
|
+
// If set, indicate there is data truncation in the report.
|
|
753
|
+
repeated DataTruncationReason data_truncation_reasons = 10;
|
|
684
754
|
}
|
|
685
755
|
|
|
686
756
|
// If this report results is
|