1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.analytics.data.v1alpha; 18 19import "google/analytics/data/v1alpha/data.proto"; 20import "google/api/annotations.proto"; 21import "google/api/client.proto"; 22import "google/api/field_behavior.proto"; 23import "google/api/resource.proto"; 24import "google/longrunning/operations.proto"; 25import "google/protobuf/timestamp.proto"; 26 27option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data"; 28option java_multiple_files = true; 29option java_outer_classname = "AnalyticsDataApiProto"; 30option java_package = "com.google.analytics.data.v1alpha"; 31option (google.api.resource_definition) = { 32 type: "analyticsadmin.googleapis.com/Property" 33 pattern: "properties/{property}" 34}; 35 36// Google Analytics reporting data service. 37service AlphaAnalyticsData { 38 option (google.api.default_host) = "analyticsdata.googleapis.com"; 39 option (google.api.oauth_scopes) = 40 "https://www.googleapis.com/auth/analytics," 41 "https://www.googleapis.com/auth/analytics.readonly," 42 "https://www.googleapis.com/auth/drive," 43 "https://www.googleapis.com/auth/drive.file," 44 "https://www.googleapis.com/auth/spreadsheets"; 45 46 // Returns a customized funnel report of your Google Analytics event data. The 47 // data returned from the API is as a table with columns for the requested 48 // dimensions and metrics. 49 // 50 // Funnel exploration lets you visualize the steps your users take to complete 51 // a task and quickly see how well they are succeeding or failing at each 52 // step. For example, how do prospects become shoppers and then become buyers? 53 // How do one time buyers become repeat buyers? With this information, you can 54 // improve inefficient or abandoned customer journeys. To learn more, see [GA4 55 // Funnel Explorations](https://support.google.com/analytics/answer/9327974). 56 // 57 // This method is introduced at alpha stability with the intention of 58 // gathering feedback on syntax and capabilities before entering beta. To give 59 // your feedback on this API, complete the [Google Analytics Data API Funnel 60 // Reporting 61 // Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform). 62 rpc RunFunnelReport(RunFunnelReportRequest) 63 returns (RunFunnelReportResponse) { 64 option (google.api.http) = { 65 post: "/v1alpha/{property=properties/*}:runFunnelReport" 66 body: "*" 67 }; 68 } 69 70 // Creates an audience list for later retrieval. This method quickly returns 71 // the audience list's resource name and initiates a long running asynchronous 72 // request to form an audience list. To list the users in an audience list, 73 // first create the audience list through this method and then send the 74 // audience resource name to the `QueryAudienceList` method. 75 // 76 // See [Creating an Audience 77 // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) 78 // for an introduction to Audience Lists with examples. 79 // 80 // An audience list is a snapshot of the users currently in the audience at 81 // the time of audience list creation. Creating audience lists for one 82 // audience on different days will return different results as users enter and 83 // exit the audience. 84 // 85 // Audiences in Google Analytics 4 allow you to segment your users in the ways 86 // that are important to your business. To learn more, see 87 // https://support.google.com/analytics/answer/9267572. Audience lists contain 88 // the users in each audience. 89 // 90 // This method is available at beta stability at 91 // [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). 92 // To give your feedback on this API, complete the [Google Analytics Audience 93 // Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. 94 rpc CreateAudienceList(CreateAudienceListRequest) 95 returns (google.longrunning.Operation) { 96 option (google.api.http) = { 97 post: "/v1alpha/{parent=properties/*}/audienceLists" 98 body: "audience_list" 99 }; 100 option (google.api.method_signature) = "parent,audience_list"; 101 option (google.longrunning.operation_info) = { 102 response_type: "AudienceList" 103 metadata_type: "AudienceListMetadata" 104 }; 105 } 106 107 // Retrieves an audience list of users. After creating an audience, the users 108 // are not immediately available for listing. First, a request to 109 // `CreateAudienceList` is necessary to create an audience list of users, and 110 // then second, this method is used to retrieve the users in the audience 111 // list. 112 // 113 // See [Creating an Audience 114 // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) 115 // for an introduction to Audience Lists with examples. 116 // 117 // Audiences in Google Analytics 4 allow you to segment your users in the ways 118 // that are important to your business. To learn more, see 119 // https://support.google.com/analytics/answer/9267572. 120 // 121 // This method is available at beta stability at 122 // [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). 123 // To give your feedback on this API, complete the [Google Analytics Audience 124 // Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. 125 rpc QueryAudienceList(QueryAudienceListRequest) 126 returns (QueryAudienceListResponse) { 127 option (google.api.http) = { 128 post: "/v1alpha/{name=properties/*/audienceLists/*}:query" 129 body: "*" 130 }; 131 option (google.api.method_signature) = "name"; 132 } 133 134 // Exports an audience list of users to a Google Sheet. After creating an 135 // audience, the users are not immediately available for listing. First, a 136 // request to `CreateAudienceList` is necessary to create an audience list of 137 // users, and then second, this method is used to export those users in the 138 // audience list to a Google Sheet. 139 // 140 // See [Creating an Audience 141 // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) 142 // for an introduction to Audience Lists with examples. 143 // 144 // Audiences in Google Analytics 4 allow you to segment your users in the ways 145 // that are important to your business. To learn more, see 146 // https://support.google.com/analytics/answer/9267572. 147 // 148 // This method is introduced at alpha stability with the intention of 149 // gathering feedback on syntax and capabilities before entering beta. To give 150 // your feedback on this API, complete the 151 // [Google Analytics Audience Export API 152 // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. 153 rpc SheetExportAudienceList(SheetExportAudienceListRequest) 154 returns (SheetExportAudienceListResponse) { 155 option (google.api.http) = { 156 post: "/v1alpha/{name=properties/*/audienceLists/*}:exportSheet" 157 body: "*" 158 }; 159 option (google.api.method_signature) = "name"; 160 } 161 162 // Gets configuration metadata about a specific audience list. This method 163 // can be used to understand an audience list after it has been created. 164 // 165 // See [Creating an Audience 166 // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) 167 // for an introduction to Audience Lists with examples. 168 // 169 // This method is available at beta stability at 170 // [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). 171 // To give your feedback on this API, complete the 172 // [Google Analytics Audience Export API 173 // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. 174 rpc GetAudienceList(GetAudienceListRequest) returns (AudienceList) { 175 option (google.api.http) = { 176 get: "/v1alpha/{name=properties/*/audienceLists/*}" 177 }; 178 option (google.api.method_signature) = "name"; 179 } 180 181 // Lists all audience lists for a property. This method can be used for you to 182 // find and reuse existing audience lists rather than creating unnecessary new 183 // audience lists. The same audience can have multiple audience lists that 184 // represent the list of users that were in an audience on different days. 185 // 186 // See [Creating an Audience 187 // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) 188 // for an introduction to Audience Lists with examples. 189 // 190 // This method is available at beta stability at 191 // [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). 192 // To give your feedback on this API, complete the 193 // [Google Analytics Audience Export API 194 // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. 195 rpc ListAudienceLists(ListAudienceListsRequest) 196 returns (ListAudienceListsResponse) { 197 option (google.api.http) = { 198 get: "/v1alpha/{parent=properties/*}/audienceLists" 199 }; 200 option (google.api.method_signature) = "parent"; 201 } 202 203 // Creates a recurring audience list. Recurring audience lists produces new 204 // audience lists each day. Audience lists are users in an audience at the 205 // time of the list's creation. 206 // 207 // A recurring audience list ensures that you have audience list based on the 208 // most recent data available for use each day. If you manually create 209 // audience list, you don't know when an audience list based on an additional 210 // day's data is available. This recurring audience list automates the 211 // creation of an audience list when an additional day's data is available. 212 // You will consume fewer quota tokens by using recurring audience list versus 213 // manually creating audience list at various times of day trying to guess 214 // when an additional day's data is ready. 215 // 216 // This method is introduced at alpha stability with the intention of 217 // gathering feedback on syntax and capabilities before entering beta. To give 218 // your feedback on this API, complete the 219 // [Google Analytics Audience Export API 220 // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. 221 rpc CreateRecurringAudienceList(CreateRecurringAudienceListRequest) 222 returns (RecurringAudienceList) { 223 option (google.api.http) = { 224 post: "/v1alpha/{parent=properties/*}/recurringAudienceLists" 225 body: "recurring_audience_list" 226 }; 227 option (google.api.method_signature) = "parent,recurring_audience_list"; 228 } 229 230 // Gets configuration metadata about a specific recurring audience list. This 231 // method can be used to understand a recurring audience list's state after it 232 // has been created. For example, a recurring audience list resource will 233 // generate audience list instances for each day, and this method can be used 234 // to get the resource name of the most recent audience list instance. 235 // 236 // This method is introduced at alpha stability with the intention of 237 // gathering feedback on syntax and capabilities before entering beta. To give 238 // your feedback on this API, complete the 239 // [Google Analytics Audience Export API 240 // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. 241 rpc GetRecurringAudienceList(GetRecurringAudienceListRequest) 242 returns (RecurringAudienceList) { 243 option (google.api.http) = { 244 get: "/v1alpha/{name=properties/*/recurringAudienceLists/*}" 245 }; 246 option (google.api.method_signature) = "name"; 247 } 248 249 // Lists all recurring audience lists for a property. This method can be used 250 // for you to find and reuse existing recurring audience lists rather than 251 // creating unnecessary new recurring audience lists. The same audience can 252 // have multiple recurring audience lists that represent different dimension 253 // combinations; for example, just the dimension `deviceId` or both the 254 // dimensions `deviceId` and `userId`. 255 // 256 // This method is introduced at alpha stability with the intention of 257 // gathering feedback on syntax and capabilities before entering beta. To give 258 // your feedback on this API, complete the 259 // [Google Analytics Audience Export API 260 // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. 261 rpc ListRecurringAudienceLists(ListRecurringAudienceListsRequest) 262 returns (ListRecurringAudienceListsResponse) { 263 option (google.api.http) = { 264 get: "/v1alpha/{parent=properties/*}/recurringAudienceLists" 265 }; 266 option (google.api.method_signature) = "parent"; 267 } 268} 269 270// A request to create a new recurring audience list. 271message CreateRecurringAudienceListRequest { 272 // Required. The parent resource where this recurring audience list will be 273 // created. Format: `properties/{property}` 274 string parent = 1 [ 275 (google.api.field_behavior) = REQUIRED, 276 (google.api.resource_reference) = { 277 child_type: "analyticsdata.googleapis.com/RecurringAudienceList" 278 } 279 ]; 280 281 // Required. The recurring audience list to create. 282 RecurringAudienceList recurring_audience_list = 2 283 [(google.api.field_behavior) = REQUIRED]; 284} 285 286// A recurring audience list produces new audience lists each day. Audience 287// lists are users in an audience at the time of the list's creation. A 288// recurring audience list ensures that you have audience list based on the most 289// recent data available for use each day. 290message RecurringAudienceList { 291 option (google.api.resource) = { 292 type: "analyticsdata.googleapis.com/RecurringAudienceList" 293 pattern: "properties/{property}/recurringAudienceLists/{recurring_audience_list}" 294 plural: "recurringAudienceLists" 295 singular: "recurringAudienceList" 296 }; 297 298 // Output only. Identifier. The recurring audience list resource name assigned 299 // during creation. This resource name identifies this 300 // `RecurringAudienceList`. 301 // 302 // Format: 303 // `properties/{property}/recurringAudienceLists/{recurring_audience_list}` 304 string name = 1 [ 305 (google.api.field_behavior) = IDENTIFIER, 306 (google.api.field_behavior) = OUTPUT_ONLY 307 ]; 308 309 // Required. The audience resource name. This resource name identifies the 310 // audience being listed and is shared between the Analytics Data & Admin 311 // APIs. 312 // 313 // Format: `properties/{property}/audiences/{audience}` 314 string audience = 2 [(google.api.field_behavior) = REQUIRED]; 315 316 // Output only. The descriptive display name for this audience. For example, 317 // "Purchasers". 318 string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 319 320 // Required. The dimensions requested and displayed in the audience list 321 // response. 322 repeated AudienceDimension dimensions = 4 323 [(google.api.field_behavior) = REQUIRED]; 324 325 // Optional. The number of remaining days that a recurring audience export 326 // will produce an audience list instance. This counter decreases by one each 327 // day, and when it reaches zero, no new audience lists will be created. 328 // 329 // Recurring audience list request for Analytics 360 properties default to 180 330 // days and have a maximum of 365 days. Requests for standard Analytics 331 // properties default to 14 days and have a maximum of 30 days. 332 // 333 // The minimum value allowed during creation is 1. Requests above their 334 // respective maximum will be coerced to their maximum. 335 optional int32 active_days_remaining = 5 336 [(google.api.field_behavior) = OPTIONAL]; 337 338 // Output only. Audience list resource names for audience list instances 339 // created for this recurring audience list. One audience list is created for 340 // each day, and the audience list will be listed here. 341 // 342 // This list is ordered with the most recently created audience list first. 343 repeated string audience_lists = 6 344 [(google.api.field_behavior) = OUTPUT_ONLY]; 345 346 // Optional. Configures webhook notifications to be sent from the Google 347 // Analytics Data API to your webhook server. Use of webhooks is optional. If 348 // unused, you'll need to poll this API to determine when a recurring audience 349 // list creates new audience lists. Webhooks allow a notification to be sent 350 // to your servers & avoid the need for polling. 351 // 352 // Two POST requests will be sent each time a recurring audience list creates 353 // an audience list. This happens once per day until a recurring audience list 354 // reaches 0 active days remaining. The first request will be sent showing a 355 // newly created audience list in its CREATING state. The second request will 356 // be sent after the audience list completes creation (either the ACTIVE or 357 // FAILED state). 358 optional WebhookNotification webhook_notification = 8 359 [(google.api.field_behavior) = OPTIONAL]; 360} 361 362// Configures a long-running operation resource to send a webhook notification 363// from the Google Analytics Data API to your webhook server when the resource 364// updates. 365// 366// Notification configurations contain private values & are only visible to your 367// GCP project. Different GCP projects may attach different webhook 368// notifications to the same long-running operation resource. 369message WebhookNotification { 370 // Optional. The web address that will receive the webhook notification. This 371 // address will receive POST requests as the state of the long running 372 // operation resource changes. The POST request will contain both a JSON 373 // version of the long running operation resource in the body and a 374 // `sentTimestamp` field. The sent timestamp will specify the unix 375 // microseconds since the epoch that the request was sent; this lets you 376 // identify replayed notifications. 377 // 378 // An example URI is 379 // `https://us-central1-example-project-id.cloudfunctions.net/example-function-1`. 380 // 381 // The URI must use HTTPS and point to a site with a valid SSL certificate on 382 // the web server. The URI must have a maximum string length of 128 characters 383 // & use only the allowlisted characters from [RFC 384 // 1738](https://www.rfc-editor.org/rfc/rfc1738). 385 // 386 // When your webhook server receives a notification, it is expected to reply 387 // with an HTTP response status code of 200 within 5 seconds. 388 // 389 // A URI is required to use webhook notifications. 390 // 391 // Requests to this webhook server will contain an ID token authenticating the 392 // service account 393 // `[email protected]`. To learn 394 // more about ID tokens, see 395 // https://cloud.google.com/docs/authentication/token-types#id. For Google 396 // Cloud Functions, this lets you configure your function to require 397 // authentication. In Cloud IAM, you will need to grant the service account 398 // permissions to the Cloud Run Invoker (`roles/run.invoker`) & Cloud 399 // Functions Invoker (`roles/cloudfunctions.invoker`) roles for the webhook 400 // post request to pass Google Cloud Functions authentication. This API can 401 // send webhook notifications to arbitrary URIs; for webhook servers other 402 // than Google Cloud Functions, this ID token in the authorization bearer 403 // header should be ignored if it is not needed. 404 optional string uri = 1 [(google.api.field_behavior) = OPTIONAL]; 405 406 // Optional. The channel token is an arbitrary string value and must have a 407 // maximum string length of 64 characters. Channel tokens allow you to verify 408 // the source of a webhook notification. This guards against the message being 409 // spoofed. The channel token will be specified in the `X-Goog-Channel-Token` 410 // HTTP header of the webhook POST request. 411 // 412 // A channel token is not required to use webhook notifications. 413 optional string channel_token = 2 [(google.api.field_behavior) = OPTIONAL]; 414} 415 416// A request to retrieve configuration metadata about a specific recurring 417// audience list. 418message GetRecurringAudienceListRequest { 419 // Required. The recurring audience list resource name. 420 // Format: 421 // `properties/{property}/recurringAudienceLists/{recurring_audience_list}` 422 string name = 1 [ 423 (google.api.field_behavior) = REQUIRED, 424 (google.api.resource_reference) = { 425 type: "analyticsdata.googleapis.com/RecurringAudienceList" 426 } 427 ]; 428} 429 430// A request to list all recurring audience lists for a property. 431message ListRecurringAudienceListsRequest { 432 // Required. All recurring audience lists for this property will be listed in 433 // the response. Format: `properties/{property}` 434 string parent = 1 [ 435 (google.api.field_behavior) = REQUIRED, 436 (google.api.resource_reference) = { 437 child_type: "analyticsdata.googleapis.com/RecurringAudienceList" 438 } 439 ]; 440 441 // Optional. The maximum number of recurring audience lists to return. The 442 // service may return fewer than this value. If unspecified, at most 200 443 // recurring audience lists will be returned. The maximum value is 1000 444 // (higher values will be coerced to the maximum). 445 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 446 447 // Optional. A page token, received from a previous 448 // `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent 449 // page. 450 // 451 // When paginating, all other parameters provided to 452 // `ListRecurringAudienceLists` must match the call that provided the page 453 // token. 454 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 455} 456 457// A list of all recurring audience lists for a property. 458message ListRecurringAudienceListsResponse { 459 // Each recurring audience list for a property. 460 repeated RecurringAudienceList recurring_audience_lists = 1; 461 462 // A token, which can be sent as `page_token` to retrieve the next page. 463 // If this field is omitted, there are no subsequent pages. 464 optional string next_page_token = 2; 465} 466 467// A request to retrieve configuration metadata about a specific audience list. 468message GetAudienceListRequest { 469 // Required. The audience list resource name. 470 // Format: `properties/{property}/audienceLists/{audience_list}` 471 string name = 1 [ 472 (google.api.field_behavior) = REQUIRED, 473 (google.api.resource_reference) = { 474 type: "analyticsdata.googleapis.com/AudienceList" 475 } 476 ]; 477} 478 479// A request to list all audience lists for a property. 480message ListAudienceListsRequest { 481 // Required. All audience lists for this property will be listed in the 482 // response. Format: `properties/{property}` 483 string parent = 1 [ 484 (google.api.field_behavior) = REQUIRED, 485 (google.api.resource_reference) = { 486 child_type: "analyticsdata.googleapis.com/AudienceList" 487 } 488 ]; 489 490 // Optional. The maximum number of audience lists to return. The service may 491 // return fewer than this value. If unspecified, at most 200 audience lists 492 // will be returned. The maximum value is 1000 (higher values will be coerced 493 // to the maximum). 494 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 495 496 // Optional. A page token, received from a previous `ListAudienceLists` call. 497 // Provide this to retrieve the subsequent page. 498 // 499 // When paginating, all other parameters provided to `ListAudienceLists` must 500 // match the call that provided the page token. 501 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 502} 503 504// A list of all audience lists for a property. 505message ListAudienceListsResponse { 506 // Each audience list for a property. 507 repeated AudienceList audience_lists = 1; 508 509 // A token, which can be sent as `page_token` to retrieve the next page. 510 // If this field is omitted, there are no subsequent pages. 511 optional string next_page_token = 2; 512} 513 514// A request to create a new audience list. 515message CreateAudienceListRequest { 516 // Required. The parent resource where this audience list will be created. 517 // Format: `properties/{property}` 518 string parent = 1 [ 519 (google.api.field_behavior) = REQUIRED, 520 (google.api.resource_reference) = { 521 child_type: "analyticsdata.googleapis.com/AudienceList" 522 } 523 ]; 524 525 // Required. The audience list to create. 526 AudienceList audience_list = 2 [(google.api.field_behavior) = REQUIRED]; 527} 528 529// An audience list is a list of users in an audience at the time of the list's 530// creation. One audience may have multiple audience lists created for different 531// days. 532message AudienceList { 533 option (google.api.resource) = { 534 type: "analyticsdata.googleapis.com/AudienceList" 535 pattern: "properties/{property}/audienceLists/{audience_list}" 536 plural: "audienceLists" 537 singular: "audienceList" 538 }; 539 540 // The AudienceList currently exists in this state. 541 enum State { 542 // Unspecified state will never be used. 543 STATE_UNSPECIFIED = 0; 544 545 // The AudienceList is currently creating and will be available in the 546 // future. Creating occurs immediately after the CreateAudienceList call. 547 CREATING = 1; 548 549 // The AudienceList is fully created and ready for querying. An AudienceList 550 // is updated to active asynchronously from a request; this occurs some 551 // time (for example 15 minutes) after the initial create call. 552 ACTIVE = 2; 553 554 // The AudienceList failed to be created. It is possible that re-requesting 555 // this audience list will succeed. 556 FAILED = 3; 557 } 558 559 // Output only. Identifier. The audience list resource name assigned during 560 // creation. This resource name identifies this `AudienceList`. 561 // 562 // Format: `properties/{property}/audienceLists/{audience_list}` 563 string name = 1 [ 564 (google.api.field_behavior) = IDENTIFIER, 565 (google.api.field_behavior) = OUTPUT_ONLY 566 ]; 567 568 // Required. The audience resource name. This resource name identifies the 569 // audience being listed and is shared between the Analytics Data & Admin 570 // APIs. 571 // 572 // Format: `properties/{property}/audiences/{audience}` 573 string audience = 2 [(google.api.field_behavior) = REQUIRED]; 574 575 // Output only. The descriptive display name for this audience. For example, 576 // "Purchasers". 577 string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 578 579 // Required. The dimensions requested and displayed in the query response. 580 repeated AudienceDimension dimensions = 4 581 [(google.api.field_behavior) = REQUIRED]; 582 583 // Output only. The current state for this AudienceList. 584 optional State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 585 586 // Output only. The time when CreateAudienceList was called and the 587 // AudienceList began the `CREATING` state. 588 optional google.protobuf.Timestamp begin_creating_time = 6 589 [(google.api.field_behavior) = OUTPUT_ONLY]; 590 591 // Output only. The total quota tokens charged during creation of the 592 // AudienceList. Because this token count is based on activity from the 593 // `CREATING` state, this tokens charged will be fixed once an AudienceList 594 // enters the `ACTIVE` or `FAILED` states. 595 int32 creation_quota_tokens_charged = 7 596 [(google.api.field_behavior) = OUTPUT_ONLY]; 597 598 // Output only. The total number of rows in the AudienceList result. 599 optional int32 row_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 600 601 // Output only. Error message is populated when an audience list fails during 602 // creation. A common reason for such a failure is quota exhaustion. 603 optional string error_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 604 605 // Output only. The percentage completed for this audience export ranging 606 // between 0 to 100. 607 optional double percentage_completed = 11 608 [(google.api.field_behavior) = OUTPUT_ONLY]; 609 610 // Output only. The recurring audience list that created this audience list. 611 // Recurring audience lists create audience lists daily. 612 // 613 // If audience lists are created directly, they will have no associated 614 // recurring audience list, and this field will be blank. 615 optional string recurring_audience_list = 12 616 [(google.api.field_behavior) = OUTPUT_ONLY]; 617 618 // Optional. Configures webhook notifications to be sent from the Google 619 // Analytics Data API to your webhook server. Use of webhooks is optional. If 620 // unused, you'll need to poll this API to determine when an audience list is 621 // ready to be used. Webhooks allow a notification to be sent to your servers 622 // & avoid the need for polling. 623 // 624 // Either one or two POST requests will be sent to the webhook. The first POST 625 // request will be sent immediately showing the newly created audience list in 626 // its CREATING state. The second POST request will be sent after the audience 627 // list completes creation (either the ACTIVE or FAILED state). 628 // 629 // If identical audience lists are requested in quick succession, the second & 630 // subsequent audience lists can be served from cache. In that case, the 631 // audience list create method can return an audience list is already ACTIVE. 632 // In this scenario, only one POST request will be sent to the webhook. 633 optional WebhookNotification webhook_notification = 13 634 [(google.api.field_behavior) = OPTIONAL]; 635} 636 637// This metadata is currently blank. 638message AudienceListMetadata {} 639 640// A request to list users in an audience list. 641message QueryAudienceListRequest { 642 // Required. The name of the audience list to retrieve users from. 643 // Format: `properties/{property}/audienceLists/{audience_list}` 644 string name = 1 [(google.api.field_behavior) = REQUIRED]; 645 646 // Optional. The row count of the start row. The first row is counted as row 647 // 0. 648 // 649 // When paging, the first request does not specify offset; or equivalently, 650 // sets offset to 0; the first request returns the first `limit` of rows. The 651 // second request sets offset to the `limit` of the first request; the second 652 // request returns the second `limit` of rows. 653 // 654 // To learn more about this pagination parameter, see 655 // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). 656 int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; 657 658 // Optional. The number of rows to return. If unspecified, 10,000 rows are 659 // returned. The API returns a maximum of 250,000 rows per request, no matter 660 // how many you ask for. `limit` must be positive. 661 // 662 // The API can also return fewer rows than the requested `limit`, if there 663 // aren't as many dimension values as the `limit`. 664 // 665 // To learn more about this pagination parameter, see 666 // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). 667 int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; 668} 669 670// A list of users in an audience list. 671message QueryAudienceListResponse { 672 // Configuration data about AudienceList being queried. Returned to help 673 // interpret the audience rows in this response. For example, the dimensions 674 // in this AudienceList correspond to the columns in the AudienceRows. 675 optional AudienceList audience_list = 1; 676 677 // Rows for each user in an audience list. The number of rows in this 678 // response will be less than or equal to request's page size. 679 repeated AudienceRow audience_rows = 2; 680 681 // The total number of rows in the AudienceList result. `rowCount` is 682 // independent of the number of rows returned in the response, the `limit` 683 // request parameter, and the `offset` request parameter. For example if a 684 // query returns 175 rows and includes `limit` of 50 in the API request, the 685 // response will contain `rowCount` of 175 but only 50 rows. 686 // 687 // To learn more about this pagination parameter, see 688 // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). 689 optional int32 row_count = 3; 690} 691 692// A request to export users in an audience list to a Google Sheet. 693message SheetExportAudienceListRequest { 694 // Required. The name of the audience list to retrieve users from. 695 // Format: `properties/{property}/audienceLists/{audience_list}` 696 string name = 1 [ 697 (google.api.field_behavior) = REQUIRED, 698 (google.api.resource_reference) = { 699 type: "analyticsdata.googleapis.com/AudienceList" 700 } 701 ]; 702 703 // Optional. The row count of the start row. The first row is counted as row 704 // 0. 705 // 706 // When paging, the first request does not specify offset; or equivalently, 707 // sets offset to 0; the first request returns the first `limit` of rows. The 708 // second request sets offset to the `limit` of the first request; the second 709 // request returns the second `limit` of rows. 710 // 711 // To learn more about this pagination parameter, see 712 // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). 713 int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; 714 715 // Optional. The number of rows to return. If unspecified, 10,000 rows are 716 // returned. The API returns a maximum of 250,000 rows per request, no matter 717 // how many you ask for. `limit` must be positive. 718 // 719 // The API can also return fewer rows than the requested `limit`, if there 720 // aren't as many dimension values as the `limit`. 721 // 722 // To learn more about this pagination parameter, see 723 // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). 724 int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; 725} 726 727// The created Google Sheet with the list of users in an audience list. 728message SheetExportAudienceListResponse { 729 // A uri for you to visit in your browser to view the Google Sheet. 730 optional string spreadsheet_uri = 1; 731 732 // An ID that identifies the created Google Sheet resource. 733 optional string spreadsheet_id = 2; 734 735 // The total number of rows in the AudienceList result. `rowCount` is 736 // independent of the number of rows returned in the response, the `limit` 737 // request parameter, and the `offset` request parameter. For example if a 738 // query returns 175 rows and includes `limit` of 50 in the API request, the 739 // response will contain `rowCount` of 175 but only 50 rows. 740 // 741 // To learn more about this pagination parameter, see 742 // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). 743 optional int32 row_count = 3; 744 745 // Configuration data about AudienceList being exported. Returned to help 746 // interpret the AudienceList in the Google Sheet of this response. 747 // 748 // For example, the AudienceList may have more rows than are present in the 749 // Google Sheet, and in that case, you may want to send an additional sheet 750 // export request with a different `offset` value to retrieve the next page of 751 // rows in an additional Google Sheet. 752 optional AudienceList audience_list = 4; 753} 754 755// Dimension value attributes for the audience user row. 756message AudienceRow { 757 // Each dimension value attribute for an audience user. One dimension value 758 // will be added for each dimension column requested. 759 repeated AudienceDimensionValue dimension_values = 1; 760} 761 762// An audience dimension is a user attribute. Specific user attributed are 763// requested and then later returned in the `QueryAudienceListResponse`. 764message AudienceDimension { 765 // Optional. The API name of the dimension. See the [API 766 // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions) 767 // for the list of dimension names. 768 string dimension_name = 1 [(google.api.field_behavior) = OPTIONAL]; 769} 770 771// The value of a dimension. 772message AudienceDimensionValue { 773 // One kind of dimension value. 774 oneof one_value { 775 // Value as a string if the dimension type is a string. 776 string value = 1; 777 } 778} 779 780// The request for a funnel report. 781message RunFunnelReportRequest { 782 // Controls the dimensions present in the funnel visualization sub report 783 // response. 784 enum FunnelVisualizationType { 785 // Unspecified type. 786 FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED = 0; 787 788 // A standard (stepped) funnel. The funnel visualization sub report in the 789 // response will not contain date. 790 STANDARD_FUNNEL = 1; 791 792 // A trended (line chart) funnel. The funnel visualization sub report in the 793 // response will contain the date dimension. 794 TRENDED_FUNNEL = 2; 795 } 796 797 // Optional. A Google Analytics GA4 property identifier whose events are 798 // tracked. Specified in the URL path and not the body. To learn more, see 799 // [where to find your Property 800 // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). 801 // Within a batch request, this property should either be unspecified or 802 // consistent with the batch-level property. 803 // 804 // Example: properties/1234 805 string property = 1 [(google.api.field_behavior) = OPTIONAL]; 806 807 // Optional. Date ranges of data to read. If multiple date ranges are 808 // requested, each response row will contain a zero based date range index. If 809 // two date ranges overlap, the event data for the overlapping days is 810 // included in the response rows for both date ranges. 811 repeated DateRange date_ranges = 2 [(google.api.field_behavior) = OPTIONAL]; 812 813 // Optional. The configuration of this request's funnel. This funnel 814 // configuration is required. 815 Funnel funnel = 3 [(google.api.field_behavior) = OPTIONAL]; 816 817 // Optional. If specified, this breakdown adds a dimension to the funnel table 818 // sub report response. This breakdown dimension expands each funnel step to 819 // the unique values of the breakdown dimension. For example, a breakdown by 820 // the `deviceCategory` dimension will create rows for `mobile`, `tablet`, 821 // `desktop`, and the total. 822 FunnelBreakdown funnel_breakdown = 4 [(google.api.field_behavior) = OPTIONAL]; 823 824 // Optional. If specified, next action adds a dimension to the funnel 825 // visualization sub report response. This next action dimension expands each 826 // funnel step to the unique values of the next action. For example a next 827 // action of the `eventName` dimension will create rows for several events 828 // (for example `session_start` & `click`) and the total. 829 // 830 // Next action only supports `eventName` and most Page / Screen dimensions 831 // like `pageTitle` and `pagePath`. 832 FunnelNextAction funnel_next_action = 5 833 [(google.api.field_behavior) = OPTIONAL]; 834 835 // Optional. The funnel visualization type controls the dimensions present in 836 // the funnel visualization sub report response. If not specified, 837 // `STANDARD_FUNNEL` is used. 838 FunnelVisualizationType funnel_visualization_type = 6 839 [(google.api.field_behavior) = OPTIONAL]; 840 841 // Optional. The configurations of segments. Segments are subsets of a 842 // property's data. In a funnel report with segments, the funnel is evaluated 843 // in each segment. 844 // 845 // Each segment specified in this request 846 // produces a separate row in the response; in the response, each segment 847 // identified by its name. 848 // 849 // The segments parameter is optional. Requests are limited to 4 segments. 850 repeated Segment segments = 7 [(google.api.field_behavior) = OPTIONAL]; 851 852 // Optional. The number of rows to return. If unspecified, 10,000 rows are 853 // returned. The API returns a maximum of 250,000 rows per request, no matter 854 // how many you ask for. `limit` must be positive. 855 // 856 // The API can also return fewer rows than the requested `limit`, if there 857 // aren't as many dimension values as the `limit`. 858 int64 limit = 9 [(google.api.field_behavior) = OPTIONAL]; 859 860 // Optional. Dimension filters allow you to ask for only specific dimension 861 // values in the report. To learn more, see [Creating a Report: Dimension 862 // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) 863 // for examples. Metrics cannot be used in this filter. 864 FilterExpression dimension_filter = 10 865 [(google.api.field_behavior) = OPTIONAL]; 866 867 // Optional. Toggles whether to return the current state of this Analytics 868 // Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). 869 bool return_property_quota = 12 [(google.api.field_behavior) = OPTIONAL]; 870} 871 872// The funnel report response contains two sub reports. The two sub reports are 873// different combinations of dimensions and metrics. 874message RunFunnelReportResponse { 875 // The funnel table is a report with the funnel step, segment, breakdown 876 // dimension, active users, completion rate, abandonments, and abandonments 877 // rate. 878 // 879 // The segment dimension is only present in this response if a segment was 880 // requested. The breakdown dimension is only present in this response if it 881 // was requested. 882 FunnelSubReport funnel_table = 1; 883 884 // The funnel visualization is a report with the funnel step, segment, date, 885 // next action dimension, and active users. 886 // 887 // The segment dimension is only present in this response if a segment was 888 // requested. The date dimension is only present in this response if it was 889 // requested through the `TRENDED_FUNNEL` funnel type. The next action 890 // dimension is only present in the response if it was requested. 891 FunnelSubReport funnel_visualization = 2; 892 893 // This Analytics Property's quota state including this request. 894 PropertyQuota property_quota = 3; 895 896 // Identifies what kind of resource this message is. This `kind` is always the 897 // fixed string "analyticsData#runFunnelReport". Useful to distinguish between 898 // response types in JSON. 899 string kind = 4; 900} 901