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.admin.v1alpha;
18
19import "google/analytics/admin/v1alpha/channel_group.proto";
20import "google/analytics/admin/v1alpha/expanded_data_set.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/protobuf/timestamp.proto";
24import "google/protobuf/wrappers.proto";
25
26option go_package = "cloud.google.com/go/analytics/admin/apiv1alpha/adminpb;adminpb";
27option java_multiple_files = true;
28option java_outer_classname = "ResourcesProto";
29option java_package = "com.google.analytics.admin.v1alpha";
30
31// The category selected for this property, used for industry benchmarking.
32enum IndustryCategory {
33  // Industry category unspecified
34  INDUSTRY_CATEGORY_UNSPECIFIED = 0;
35
36  // Automotive
37  AUTOMOTIVE = 1;
38
39  // Business and industrial markets
40  BUSINESS_AND_INDUSTRIAL_MARKETS = 2;
41
42  // Finance
43  FINANCE = 3;
44
45  // Healthcare
46  HEALTHCARE = 4;
47
48  // Technology
49  TECHNOLOGY = 5;
50
51  // Travel
52  TRAVEL = 6;
53
54  // Other
55  OTHER = 7;
56
57  // Arts and entertainment
58  ARTS_AND_ENTERTAINMENT = 8;
59
60  // Beauty and fitness
61  BEAUTY_AND_FITNESS = 9;
62
63  // Books and literature
64  BOOKS_AND_LITERATURE = 10;
65
66  // Food and drink
67  FOOD_AND_DRINK = 11;
68
69  // Games
70  GAMES = 12;
71
72  // Hobbies and leisure
73  HOBBIES_AND_LEISURE = 13;
74
75  // Home and garden
76  HOME_AND_GARDEN = 14;
77
78  // Internet and telecom
79  INTERNET_AND_TELECOM = 15;
80
81  // Law and government
82  LAW_AND_GOVERNMENT = 16;
83
84  // News
85  NEWS = 17;
86
87  // Online communities
88  ONLINE_COMMUNITIES = 18;
89
90  // People and society
91  PEOPLE_AND_SOCIETY = 19;
92
93  // Pets and animals
94  PETS_AND_ANIMALS = 20;
95
96  // Real estate
97  REAL_ESTATE = 21;
98
99  // Reference
100  REFERENCE = 22;
101
102  // Science
103  SCIENCE = 23;
104
105  // Sports
106  SPORTS = 24;
107
108  // Jobs and education
109  JOBS_AND_EDUCATION = 25;
110
111  // Shopping
112  SHOPPING = 26;
113}
114
115// Various levels of service for Google Analytics.
116enum ServiceLevel {
117  // Service level not specified or invalid.
118  SERVICE_LEVEL_UNSPECIFIED = 0;
119
120  // The standard version of Google Analytics.
121  GOOGLE_ANALYTICS_STANDARD = 1;
122
123  // The paid, premium version of Google Analytics.
124  GOOGLE_ANALYTICS_360 = 2;
125}
126
127// Different kinds of actors that can make changes to Google Analytics
128// resources.
129enum ActorType {
130  // Unknown or unspecified actor type.
131  ACTOR_TYPE_UNSPECIFIED = 0;
132
133  // Changes made by the user specified in actor_email.
134  USER = 1;
135
136  // Changes made by the Google Analytics system.
137  SYSTEM = 2;
138
139  // Changes made by Google Analytics support team staff.
140  SUPPORT = 3;
141}
142
143// Types of actions that may change a resource.
144enum ActionType {
145  // Action type unknown or not specified.
146  ACTION_TYPE_UNSPECIFIED = 0;
147
148  // Resource was created in this change.
149  CREATED = 1;
150
151  // Resource was updated in this change.
152  UPDATED = 2;
153
154  // Resource was deleted in this change.
155  DELETED = 3;
156}
157
158// Types of resources whose changes may be returned from change history.
159enum ChangeHistoryResourceType {
160  // Resource type unknown or not specified.
161  CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0;
162
163  // Account resource
164  ACCOUNT = 1;
165
166  // Property resource
167  PROPERTY = 2;
168
169  // FirebaseLink resource
170  FIREBASE_LINK = 6;
171
172  // GoogleAdsLink resource
173  GOOGLE_ADS_LINK = 7;
174
175  // GoogleSignalsSettings resource
176  GOOGLE_SIGNALS_SETTINGS = 8;
177
178  // ConversionEvent resource
179  CONVERSION_EVENT = 9;
180
181  // MeasurementProtocolSecret resource
182  MEASUREMENT_PROTOCOL_SECRET = 10;
183
184  // CustomDimension resource
185  CUSTOM_DIMENSION = 11;
186
187  // CustomMetric resource
188  CUSTOM_METRIC = 12;
189
190  // DataRetentionSettings resource
191  DATA_RETENTION_SETTINGS = 13;
192
193  // DisplayVideo360AdvertiserLink resource
194  DISPLAY_VIDEO_360_ADVERTISER_LINK = 14;
195
196  // DisplayVideo360AdvertiserLinkProposal resource
197  DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL = 15;
198
199  // SearchAds360Link resource
200  SEARCH_ADS_360_LINK = 16;
201
202  // DataStream resource
203  DATA_STREAM = 18;
204
205  // AttributionSettings resource
206  ATTRIBUTION_SETTINGS = 20;
207
208  // ExpandedDataSet resource
209  EXPANDED_DATA_SET = 21;
210
211  // ChannelGroup resource
212  CHANNEL_GROUP = 22;
213
214  // EnhancedMeasurementSettings resource
215  ENHANCED_MEASUREMENT_SETTINGS = 24;
216}
217
218// Status of the Google Signals settings.
219enum GoogleSignalsState {
220  // Google Signals status defaults to GOOGLE_SIGNALS_STATE_UNSPECIFIED to
221  // represent that the user has not made an explicit choice.
222  GOOGLE_SIGNALS_STATE_UNSPECIFIED = 0;
223
224  // Google Signals is enabled.
225  GOOGLE_SIGNALS_ENABLED = 1;
226
227  // Google Signals is disabled.
228  GOOGLE_SIGNALS_DISABLED = 2;
229}
230
231// Consent field of the Google Signals settings.
232enum GoogleSignalsConsent {
233  // Google Signals consent value defaults to
234  // GOOGLE_SIGNALS_CONSENT_UNSPECIFIED.  This will be treated as
235  // GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED.
236  GOOGLE_SIGNALS_CONSENT_UNSPECIFIED = 0;
237
238  // Terms of service have been accepted
239  GOOGLE_SIGNALS_CONSENT_CONSENTED = 2;
240
241  // Terms of service have not been accepted
242  GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED = 1;
243}
244
245// An indication of which product the user initiated a link proposal from.
246enum LinkProposalInitiatingProduct {
247  // Unspecified product.
248  LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED = 0;
249
250  // This proposal was created by a user from Google Analytics.
251  GOOGLE_ANALYTICS = 1;
252
253  // This proposal was created by a user from a linked product (not Google
254  // Analytics).
255  LINKED_PRODUCT = 2;
256}
257
258// The state of a link proposal resource.
259enum LinkProposalState {
260  // Unspecified state
261  LINK_PROPOSAL_STATE_UNSPECIFIED = 0;
262
263  // This proposal is awaiting review from a Google Analytics user. This
264  // proposal will automatically expire after some time.
265  AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS = 1;
266
267  // This proposal is awaiting review from a user of a linked product. This
268  // proposal will automatically expire after some time.
269  AWAITING_REVIEW_FROM_LINKED_PRODUCT = 2;
270
271  // This proposal has been withdrawn by an admin on the initiating product.
272  // This proposal will be automatically deleted after some time.
273  WITHDRAWN = 3;
274
275  // This proposal has been declined by an admin on the receiving product. This
276  // proposal will be automatically deleted after some time.
277  DECLINED = 4;
278
279  // This proposal expired due to lack of response from an admin on the
280  // receiving product. This proposal will be automatically deleted after some
281  // time.
282  EXPIRED = 5;
283
284  // This proposal has become obsolete because a link was directly created to
285  // the same external product resource that this proposal specifies. This
286  // proposal will be automatically deleted after some time.
287  OBSOLETE = 6;
288}
289
290// Types of Property resources.
291enum PropertyType {
292  // Unknown or unspecified property type
293  PROPERTY_TYPE_UNSPECIFIED = 0;
294
295  // Ordinary GA4 property
296  PROPERTY_TYPE_ORDINARY = 1;
297
298  // GA4 subproperty
299  PROPERTY_TYPE_SUBPROPERTY = 2;
300
301  // GA4 rollup property
302  PROPERTY_TYPE_ROLLUP = 3;
303}
304
305// A resource message representing a Google Analytics account.
306message Account {
307  option (google.api.resource) = {
308    type: "analyticsadmin.googleapis.com/Account"
309    pattern: "accounts/{account}"
310  };
311
312  // Output only. Resource name of this account.
313  // Format: accounts/{account}
314  // Example: "accounts/100"
315  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
316
317  // Output only. Time when this account was originally created.
318  google.protobuf.Timestamp create_time = 2
319      [(google.api.field_behavior) = OUTPUT_ONLY];
320
321  // Output only. Time when account payload fields were last updated.
322  google.protobuf.Timestamp update_time = 3
323      [(google.api.field_behavior) = OUTPUT_ONLY];
324
325  // Required. Human-readable display name for this account.
326  string display_name = 4 [(google.api.field_behavior) = REQUIRED];
327
328  // Country of business. Must be a Unicode CLDR region code.
329  string region_code = 5;
330
331  // Output only. Indicates whether this Account is soft-deleted or not. Deleted
332  // accounts are excluded from List results unless specifically requested.
333  bool deleted = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
334}
335
336// A resource message representing a Google Analytics GA4 property.
337message Property {
338  option (google.api.resource) = {
339    type: "analyticsadmin.googleapis.com/Property"
340    pattern: "properties/{property}"
341  };
342
343  // Output only. Resource name of this property.
344  // Format: properties/{property_id}
345  // Example: "properties/1000"
346  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
347
348  // Immutable. The property type for this Property resource. When creating a
349  // property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then
350  // "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY"
351  // types cannot yet be created with the Google Analytics Admin API.
352  PropertyType property_type = 14 [(google.api.field_behavior) = IMMUTABLE];
353
354  // Output only. Time when the entity was originally created.
355  google.protobuf.Timestamp create_time = 3
356      [(google.api.field_behavior) = OUTPUT_ONLY];
357
358  // Output only. Time when entity payload fields were last updated.
359  google.protobuf.Timestamp update_time = 4
360      [(google.api.field_behavior) = OUTPUT_ONLY];
361
362  // Immutable. Resource name of this property's logical parent.
363  //
364  // Note: The Property-Moving UI can be used to change the parent.
365  // Format: accounts/{account}, properties/{property}
366  // Example: "accounts/100", "properties/101"
367  string parent = 2 [(google.api.field_behavior) = IMMUTABLE];
368
369  // Required. Human-readable display name for this property.
370  //
371  // The max allowed display name length is 100 UTF-16 code units.
372  string display_name = 5 [(google.api.field_behavior) = REQUIRED];
373
374  // Industry associated with this property
375  // Example: AUTOMOTIVE, FOOD_AND_DRINK
376  IndustryCategory industry_category = 6;
377
378  // Required. Reporting Time Zone, used as the day boundary for reports,
379  // regardless of where the data originates. If the time zone honors DST,
380  // Analytics will automatically adjust for the changes.
381  //
382  // NOTE: Changing the time zone only affects data going forward, and is not
383  // applied retroactively.
384  //
385  // Format: https://www.iana.org/time-zones
386  // Example: "America/Los_Angeles"
387  string time_zone = 7 [(google.api.field_behavior) = REQUIRED];
388
389  // The currency type used in reports involving monetary values.
390  //
391  //
392  // Format: https://en.wikipedia.org/wiki/ISO_4217
393  // Examples: "USD", "EUR", "JPY"
394  string currency_code = 8;
395
396  // Output only. The Google Analytics service level that applies to this
397  // property.
398  ServiceLevel service_level = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
399
400  // Output only. If set, the time at which this property was trashed. If not
401  // set, then this property is not currently in the trash can.
402  google.protobuf.Timestamp delete_time = 11
403      [(google.api.field_behavior) = OUTPUT_ONLY];
404
405  // Output only. If set, the time at which this trashed property will be
406  // permanently deleted. If not set, then this property is not currently in the
407  // trash can and is not slated to be deleted.
408  google.protobuf.Timestamp expire_time = 12
409      [(google.api.field_behavior) = OUTPUT_ONLY];
410
411  // Immutable. The resource name of the parent account
412  // Format: accounts/{account_id}
413  // Example: "accounts/123"
414  string account = 13 [
415    (google.api.field_behavior) = IMMUTABLE,
416    (google.api.resource_reference) = {
417      type: "analyticsadmin.googleapis.com/Account"
418    }
419  ];
420}
421
422// A resource message representing a data stream.
423message DataStream {
424  option (google.api.resource) = {
425    type: "analyticsadmin.googleapis.com/DataStream"
426    pattern: "properties/{property}/dataStreams/{data_stream}"
427  };
428
429  // Data specific to web streams.
430  message WebStreamData {
431    // Output only. Analytics "Measurement ID", without the "G-" prefix.
432    // Example: "G-1A2BCD345E" would just be "1A2BCD345E"
433    string measurement_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
434
435    // Output only. ID of the corresponding web app in Firebase, if any.
436    // This ID can change if the web app is deleted and recreated.
437    string firebase_app_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
438
439    // Immutable. Domain name of the web app being measured, or empty.
440    // Example: "http://www.google.com", "https://www.google.com"
441    string default_uri = 3 [(google.api.field_behavior) = IMMUTABLE];
442  }
443
444  // Data specific to Android app streams.
445  message AndroidAppStreamData {
446    // Output only. ID of the corresponding Android app in Firebase, if any.
447    // This ID can change if the Android app is deleted and recreated.
448    string firebase_app_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
449
450    // Immutable. The package name for the app being measured.
451    // Example: "com.example.myandroidapp"
452    string package_name = 2 [(google.api.field_behavior) = IMMUTABLE];
453  }
454
455  // Data specific to iOS app streams.
456  message IosAppStreamData {
457    // Output only. ID of the corresponding iOS app in Firebase, if any.
458    // This ID can change if the iOS app is deleted and recreated.
459    string firebase_app_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
460
461    // Required. Immutable. The Apple App Store Bundle ID for the app
462    // Example: "com.example.myiosapp"
463    string bundle_id = 2 [
464      (google.api.field_behavior) = IMMUTABLE,
465      (google.api.field_behavior) = REQUIRED
466    ];
467  }
468
469  // The type of the data stream.
470  enum DataStreamType {
471    // Type unknown or not specified.
472    DATA_STREAM_TYPE_UNSPECIFIED = 0;
473
474    // Web data stream.
475    WEB_DATA_STREAM = 1;
476
477    // Android app data stream.
478    ANDROID_APP_DATA_STREAM = 2;
479
480    // iOS app data stream.
481    IOS_APP_DATA_STREAM = 3;
482  }
483
484  // Data for specific data stream types. The message that will be
485  // set corresponds to the type of this stream.
486  oneof stream_data {
487    // Data specific to web streams. Must be populated if type is
488    // WEB_DATA_STREAM.
489    WebStreamData web_stream_data = 6;
490
491    // Data specific to Android app streams. Must be populated if type is
492    // ANDROID_APP_DATA_STREAM.
493    AndroidAppStreamData android_app_stream_data = 7;
494
495    // Data specific to iOS app streams. Must be populated if type is
496    // IOS_APP_DATA_STREAM.
497    IosAppStreamData ios_app_stream_data = 8;
498  }
499
500  // Output only. Resource name of this Data Stream.
501  // Format: properties/{property_id}/dataStreams/{stream_id}
502  // Example: "properties/1000/dataStreams/2000"
503  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
504
505  // Required. Immutable. The type of this DataStream resource.
506  DataStreamType type = 2 [
507    (google.api.field_behavior) = IMMUTABLE,
508    (google.api.field_behavior) = REQUIRED
509  ];
510
511  // Human-readable display name for the Data Stream.
512  //
513  // Required for web data streams.
514  //
515  // The max allowed display name length is 255 UTF-16 code units.
516  string display_name = 3;
517
518  // Output only. Time when this stream was originally created.
519  google.protobuf.Timestamp create_time = 4
520      [(google.api.field_behavior) = OUTPUT_ONLY];
521
522  // Output only. Time when stream payload fields were last updated.
523  google.protobuf.Timestamp update_time = 5
524      [(google.api.field_behavior) = OUTPUT_ONLY];
525}
526
527// A resource message representing a user's permissions on an Account or
528// Property resource.
529message UserLink {
530  option (google.api.resource) = {
531    type: "analyticsadmin.googleapis.com/UserLink"
532    pattern: "accounts/{account}/userLinks/{user_link}"
533    pattern: "properties/{property}/userLinks/{user_link}"
534  };
535
536  // Output only. Example format: properties/1234/userLinks/5678
537  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
538
539  // Immutable. Email address of the user to link
540  string email_address = 2 [(google.api.field_behavior) = IMMUTABLE];
541
542  // Roles directly assigned to this user for this account or property.
543  //
544  // Valid values:
545  // predefinedRoles/viewer
546  // predefinedRoles/analyst
547  // predefinedRoles/editor
548  // predefinedRoles/admin
549  // predefinedRoles/no-cost-data
550  // predefinedRoles/no-revenue-data
551  //
552  // Excludes roles that are inherited from a higher-level entity, group,
553  // or organization admin role.
554  //
555  // A UserLink that is updated to have an empty list of direct_roles will be
556  // deleted.
557  repeated string direct_roles = 3;
558}
559
560// Read-only resource used to summarize a principal's effective roles.
561message AuditUserLink {
562  // Example format: properties/1234/userLinks/5678
563  string name = 1;
564
565  // Email address of the linked user
566  string email_address = 2;
567
568  // Roles directly assigned to this user for this entity.
569  //
570  // Format: predefinedRoles/viewer
571  //
572  // Excludes roles that are inherited from an account (if this is for a
573  // property), group, or organization admin role.
574  repeated string direct_roles = 3;
575
576  // Union of all permissions a user has at this account or property (includes
577  // direct permissions, group-inherited permissions, etc.).
578  //
579  // Format: predefinedRoles/viewer
580  repeated string effective_roles = 4;
581}
582
583// A link between a GA4 property and a Firebase project.
584message FirebaseLink {
585  option (google.api.resource) = {
586    type: "analyticsadmin.googleapis.com/FirebaseLink"
587    pattern: "properties/{property}/firebaseLinks/{firebase_link}"
588  };
589
590  // Output only. Example format: properties/1234/firebaseLinks/5678
591  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
592
593  // Immutable. Firebase project resource name. When creating a FirebaseLink,
594  // you may provide this resource name using either a project number or project
595  // ID. Once this resource has been created, returned FirebaseLinks will always
596  // have a project_name that contains a project number.
597  //
598  // Format: 'projects/{project number}'
599  // Example: 'projects/1234'
600  string project = 2 [(google.api.field_behavior) = IMMUTABLE];
601
602  // Output only. Time when this FirebaseLink was originally created.
603  google.protobuf.Timestamp create_time = 3
604      [(google.api.field_behavior) = OUTPUT_ONLY];
605}
606
607// Read-only resource with the tag for sending data from a website to a
608// DataStream. Only present for web DataStream resources.
609message GlobalSiteTag {
610  option (google.api.resource) = {
611    type: "analyticsadmin.googleapis.com/GlobalSiteTag"
612    pattern: "properties/{property}/dataStreams/{data_stream}/globalSiteTag"
613  };
614
615  // Output only. Resource name for this GlobalSiteTag resource.
616  // Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag
617  // Example: "properties/123/dataStreams/456/globalSiteTag"
618  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
619
620  // Immutable. JavaScript code snippet to be pasted as the first item into the
621  // head tag of every webpage to measure.
622  string snippet = 2 [(google.api.field_behavior) = IMMUTABLE];
623}
624
625// A link between a GA4 property and a Google Ads account.
626message GoogleAdsLink {
627  option (google.api.resource) = {
628    type: "analyticsadmin.googleapis.com/GoogleAdsLink"
629    pattern: "properties/{property}/googleAdsLinks/{google_ads_link}"
630  };
631
632  // Output only. Format:
633  // properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
634  //
635  // Note: googleAdsLinkId is not the Google Ads customer ID.
636  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
637
638  // Immutable. Google Ads customer ID.
639  string customer_id = 3 [(google.api.field_behavior) = IMMUTABLE];
640
641  // Output only. If true, this link is for a Google Ads manager account.
642  bool can_manage_clients = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
643
644  // Enable personalized advertising features with this integration.
645  // Automatically publish my Google Analytics audience lists and Google
646  // Analytics remarketing events/parameters to the linked Google Ads account.
647  // If this field is not set on create/update, it will be defaulted to true.
648  google.protobuf.BoolValue ads_personalization_enabled = 5;
649
650  // Output only. Time when this link was originally created.
651  google.protobuf.Timestamp create_time = 7
652      [(google.api.field_behavior) = OUTPUT_ONLY];
653
654  // Output only. Time when this link was last updated.
655  google.protobuf.Timestamp update_time = 8
656      [(google.api.field_behavior) = OUTPUT_ONLY];
657
658  // Output only. Email address of the user that created the link.
659  // An empty string will be returned if the email address can't be retrieved.
660  string creator_email_address = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
661}
662
663// A resource message representing data sharing settings of a Google Analytics
664// account.
665message DataSharingSettings {
666  option (google.api.resource) = {
667    type: "analyticsadmin.googleapis.com/DataSharingSettings"
668    pattern: "accounts/{account}/dataSharingSettings"
669  };
670
671  // Output only. Resource name.
672  // Format: accounts/{account}/dataSharingSettings
673  // Example: "accounts/1000/dataSharingSettings"
674  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
675
676  // Allows Google support to access the data in order to help troubleshoot
677  // issues.
678  bool sharing_with_google_support_enabled = 2;
679
680  // Allows Google sales teams that are assigned to the customer to access the
681  // data in order to suggest configuration changes to improve results.
682  // Sales team restrictions still apply when enabled.
683  bool sharing_with_google_assigned_sales_enabled = 3;
684
685  // Allows any of Google sales to access the data in order to suggest
686  // configuration changes to improve results.
687  bool sharing_with_google_any_sales_enabled = 4;
688
689  // Allows Google to use the data to improve other Google products or services.
690  bool sharing_with_google_products_enabled = 5;
691
692  // Allows Google to share the data anonymously in aggregate form with others.
693  bool sharing_with_others_enabled = 6;
694}
695
696// A virtual resource representing an overview of an account and
697// all its child GA4 properties.
698message AccountSummary {
699  option (google.api.resource) = {
700    type: "analyticsadmin.googleapis.com/AccountSummary"
701    pattern: "accountSummaries/{account_summary}"
702  };
703
704  // Resource name for this account summary.
705  // Format: accountSummaries/{account_id}
706  // Example: "accountSummaries/1000"
707  string name = 1;
708
709  // Resource name of account referred to by this account summary
710  // Format: accounts/{account_id}
711  // Example: "accounts/1000"
712  string account = 2 [(google.api.resource_reference) = {
713    type: "analyticsadmin.googleapis.com/Account"
714  }];
715
716  // Display name for the account referred to in this account summary.
717  string display_name = 3;
718
719  // List of summaries for child accounts of this account.
720  repeated PropertySummary property_summaries = 4;
721}
722
723// A virtual resource representing metadata for a GA4 property.
724message PropertySummary {
725  // Resource name of property referred to by this property summary
726  // Format: properties/{property_id}
727  // Example: "properties/1000"
728  string property = 1 [(google.api.resource_reference) = {
729    type: "analyticsadmin.googleapis.com/Property"
730  }];
731
732  // Display name for the property referred to in this property summary.
733  string display_name = 2;
734
735  // The property's property type.
736  PropertyType property_type = 3;
737
738  // Resource name of this property's logical parent.
739  //
740  // Note: The Property-Moving UI can be used to change the parent.
741  // Format: accounts/{account}, properties/{property}
742  // Example: "accounts/100", "properties/200"
743  string parent = 4;
744}
745
746// A secret value used for sending hits to Measurement Protocol.
747message MeasurementProtocolSecret {
748  option (google.api.resource) = {
749    type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret"
750    pattern: "properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}"
751  };
752
753  // Output only. Resource name of this secret. This secret may be a child of
754  // any type of stream. Format:
755  // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
756  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
757
758  // Required. Human-readable display name for this secret.
759  string display_name = 2 [(google.api.field_behavior) = REQUIRED];
760
761  // Output only. The measurement protocol secret value. Pass this value to the
762  // api_secret field of the Measurement Protocol API when sending hits to this
763  // secret's parent property.
764  string secret_value = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
765}
766
767// A set of changes within a Google Analytics account or its child properties
768// that resulted from the same cause. Common causes would be updates made in the
769// Google Analytics UI, changes from customer support, or automatic Google
770// Analytics system changes.
771message ChangeHistoryEvent {
772  // ID of this change history event. This ID is unique across Google Analytics.
773  string id = 1;
774
775  // Time when change was made.
776  google.protobuf.Timestamp change_time = 2;
777
778  // The type of actor that made this change.
779  ActorType actor_type = 3;
780
781  // Email address of the Google account that made the change. This will be a
782  // valid email address if the actor field is set to USER, and empty otherwise.
783  // Google accounts that have been deleted will cause an error.
784  string user_actor_email = 4;
785
786  // If true, then the list of changes returned was filtered, and does not
787  // represent all changes that occurred in this event.
788  bool changes_filtered = 5;
789
790  // A list of changes made in this change history event that fit the filters
791  // specified in SearchChangeHistoryEventsRequest.
792  repeated ChangeHistoryChange changes = 6;
793}
794
795// A description of a change to a single Google Analytics resource.
796message ChangeHistoryChange {
797  // A snapshot of a resource as before or after the result of a change in
798  // change history.
799  message ChangeHistoryResource {
800    oneof resource {
801      // A snapshot of an Account resource in change history.
802      Account account = 1;
803
804      // A snapshot of a Property resource in change history.
805      Property property = 2;
806
807      // A snapshot of a FirebaseLink resource in change history.
808      FirebaseLink firebase_link = 6;
809
810      // A snapshot of a GoogleAdsLink resource in change history.
811      GoogleAdsLink google_ads_link = 7;
812
813      // A snapshot of a GoogleSignalsSettings resource in change history.
814      GoogleSignalsSettings google_signals_settings = 8;
815
816      // A snapshot of a DisplayVideo360AdvertiserLink resource in change
817      // history.
818      DisplayVideo360AdvertiserLink display_video_360_advertiser_link = 9;
819
820      // A snapshot of a DisplayVideo360AdvertiserLinkProposal resource in
821      // change history.
822      DisplayVideo360AdvertiserLinkProposal
823          display_video_360_advertiser_link_proposal = 10;
824
825      // A snapshot of a ConversionEvent resource in change history.
826      ConversionEvent conversion_event = 11;
827
828      // A snapshot of a MeasurementProtocolSecret resource in change history.
829      MeasurementProtocolSecret measurement_protocol_secret = 12;
830
831      // A snapshot of a CustomDimension resource in change history.
832      CustomDimension custom_dimension = 13;
833
834      // A snapshot of a CustomMetric resource in change history.
835      CustomMetric custom_metric = 14;
836
837      // A snapshot of a data retention settings resource in change history.
838      DataRetentionSettings data_retention_settings = 15;
839
840      // A snapshot of a SearchAds360Link resource in change history.
841      SearchAds360Link search_ads_360_link = 16;
842
843      // A snapshot of a DataStream resource in change history.
844      DataStream data_stream = 18;
845
846      // A snapshot of AttributionSettings resource in change history.
847      AttributionSettings attribution_settings = 20;
848
849      // A snapshot of an ExpandedDataSet resource in change history.
850      ExpandedDataSet expanded_data_set = 21;
851
852      // A snapshot of a ChannelGroup resource in change history.
853      ChannelGroup channel_group = 22;
854
855      // A snapshot of a BigQuery link resource in change history.
856      BigQueryLink bigquery_link = 23;
857
858      // A snapshot of EnhancedMeasurementSettings resource in change history.
859      EnhancedMeasurementSettings enhanced_measurement_settings = 24;
860    }
861  }
862
863  // Resource name of the resource whose changes are described by this entry.
864  string resource = 1;
865
866  // The type of action that changed this resource.
867  ActionType action = 2;
868
869  // Resource contents from before the change was made. If this resource was
870  // created in this change, this field will be missing.
871  ChangeHistoryResource resource_before_change = 3;
872
873  // Resource contents from after the change was made. If this resource was
874  // deleted in this change, this field will be missing.
875  ChangeHistoryResource resource_after_change = 4;
876}
877
878// A link between a GA4 property and a Display & Video 360 advertiser.
879message DisplayVideo360AdvertiserLink {
880  option (google.api.resource) = {
881    type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink"
882    pattern: "properties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link}"
883  };
884
885  // Output only. The resource name for this DisplayVideo360AdvertiserLink
886  // resource. Format:
887  // properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId}
888  //
889  // Note: linkId is not the Display & Video 360 Advertiser ID
890  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
891
892  // Immutable. The Display & Video 360 Advertiser's advertiser ID.
893  string advertiser_id = 2 [(google.api.field_behavior) = IMMUTABLE];
894
895  // Output only. The display name of the Display & Video 360 Advertiser.
896  string advertiser_display_name = 3
897      [(google.api.field_behavior) = OUTPUT_ONLY];
898
899  // Enables personalized advertising features with this integration.
900  // If this field is not set on create/update, it will be defaulted to true.
901  google.protobuf.BoolValue ads_personalization_enabled = 4;
902
903  // Immutable. Enables the import of campaign data from Display & Video 360
904  // into the GA4 property. After link creation, this can only be updated from
905  // the Display & Video 360 product. If this field is not set on create, it
906  // will be defaulted to true.
907  google.protobuf.BoolValue campaign_data_sharing_enabled = 5
908      [(google.api.field_behavior) = IMMUTABLE];
909
910  // Immutable. Enables the import of cost data from Display & Video 360 into
911  // the GA4 property. This can only be enabled if campaign_data_sharing_enabled
912  // is enabled. After link creation, this can only be updated from the Display
913  // & Video 360 product. If this field is not set on create, it will be
914  // defaulted to true.
915  google.protobuf.BoolValue cost_data_sharing_enabled = 6
916      [(google.api.field_behavior) = IMMUTABLE];
917}
918
919// A proposal for a link between a GA4 property and a Display & Video 360
920// advertiser.
921//
922// A proposal is converted to a DisplayVideo360AdvertiserLink once approved.
923// Google Analytics admins approve inbound proposals while Display & Video 360
924// admins approve outbound proposals.
925message DisplayVideo360AdvertiserLinkProposal {
926  option (google.api.resource) = {
927    type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal"
928    pattern: "properties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal}"
929  };
930
931  // Output only. The resource name for this
932  // DisplayVideo360AdvertiserLinkProposal resource. Format:
933  // properties/{propertyId}/displayVideo360AdvertiserLinkProposals/{proposalId}
934  //
935  // Note: proposalId is not the Display & Video 360 Advertiser ID
936  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
937
938  // Immutable. The Display & Video 360 Advertiser's advertiser ID.
939  string advertiser_id = 2 [(google.api.field_behavior) = IMMUTABLE];
940
941  // Output only. The status information for this link proposal.
942  LinkProposalStatusDetails link_proposal_status_details = 3
943      [(google.api.field_behavior) = OUTPUT_ONLY];
944
945  // Output only. The display name of the Display & Video Advertiser.
946  // Only populated for proposals that originated from Display & Video 360.
947  string advertiser_display_name = 4
948      [(google.api.field_behavior) = OUTPUT_ONLY];
949
950  // Input only. On a proposal being sent to Display & Video 360, this field
951  // must be set to the email address of an admin on the target advertiser. This
952  // is used to verify that the Google Analytics admin is aware of at least one
953  // admin on the Display & Video 360 Advertiser. This does not restrict
954  // approval of the proposal to a single user. Any admin on the Display & Video
955  // 360 Advertiser may approve the proposal.
956  string validation_email = 5 [(google.api.field_behavior) = INPUT_ONLY];
957
958  // Immutable. Enables personalized advertising features with this integration.
959  // If this field is not set on create, it will be defaulted to true.
960  google.protobuf.BoolValue ads_personalization_enabled = 6
961      [(google.api.field_behavior) = IMMUTABLE];
962
963  // Immutable. Enables the import of campaign data from Display & Video 360.
964  // If this field is not set on create, it will be defaulted to true.
965  google.protobuf.BoolValue campaign_data_sharing_enabled = 7
966      [(google.api.field_behavior) = IMMUTABLE];
967
968  // Immutable. Enables the import of cost data from Display & Video 360.
969  // This can only be enabled if campaign_data_sharing_enabled is enabled.
970  // If this field is not set on create, it will be defaulted to true.
971  google.protobuf.BoolValue cost_data_sharing_enabled = 8
972      [(google.api.field_behavior) = IMMUTABLE];
973}
974
975// A link between a GA4 property and a Search Ads 360 entity.
976message SearchAds360Link {
977  option (google.api.resource) = {
978    type: "analyticsadmin.googleapis.com/SearchAds360Link"
979    pattern: "properties/{property}/searchAds360Links/{search_ads_360_link}"
980  };
981
982  // Output only. The resource name for this SearchAds360Link resource.
983  // Format: properties/{propertyId}/searchAds360Links/{linkId}
984  //
985  // Note: linkId is not the Search Ads 360 advertiser ID
986  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
987
988  // Immutable. This field represents the Advertiser ID of the Search Ads 360
989  // Advertiser. that has been linked.
990  string advertiser_id = 2 [(google.api.field_behavior) = IMMUTABLE];
991
992  // Immutable. Enables the import of campaign data from Search Ads 360 into the
993  // GA4 property. After link creation, this can only be updated from the Search
994  // Ads 360 product.
995  // If this field is not set on create, it will be defaulted to true.
996  google.protobuf.BoolValue campaign_data_sharing_enabled = 3
997      [(google.api.field_behavior) = IMMUTABLE];
998
999  // Immutable. Enables the import of cost data from Search Ads 360 to the GA4
1000  // property. This can only be enabled if campaign_data_sharing_enabled is
1001  // enabled. After link creation, this can only be updated from
1002  // the Search Ads 360 product.
1003  // If this field is not set on create, it will be defaulted to true.
1004  google.protobuf.BoolValue cost_data_sharing_enabled = 4
1005      [(google.api.field_behavior) = IMMUTABLE];
1006
1007  // Output only. The display name of the Search Ads 360 Advertiser.
1008  // Allows users to easily identify the linked resource.
1009  string advertiser_display_name = 5
1010      [(google.api.field_behavior) = OUTPUT_ONLY];
1011
1012  // Enables personalized advertising features with this integration.
1013  // If this field is not set on create, it will be defaulted to true.
1014  google.protobuf.BoolValue ads_personalization_enabled = 6;
1015
1016  // Enables export of site stats with this integration.
1017  // If this field is not set on create, it will be defaulted to true.
1018  google.protobuf.BoolValue site_stats_sharing_enabled = 7;
1019}
1020
1021// Status information for a link proposal.
1022message LinkProposalStatusDetails {
1023  // Output only. The source of this proposal.
1024  LinkProposalInitiatingProduct link_proposal_initiating_product = 1
1025      [(google.api.field_behavior) = OUTPUT_ONLY];
1026
1027  // Output only. The email address of the user that proposed this linkage.
1028  string requestor_email = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
1029
1030  // Output only. The state of this proposal.
1031  LinkProposalState link_proposal_state = 3
1032      [(google.api.field_behavior) = OUTPUT_ONLY];
1033}
1034
1035// A conversion event in a Google Analytics property.
1036message ConversionEvent {
1037  option (google.api.resource) = {
1038    type: "analyticsadmin.googleapis.com/ConversionEvent"
1039    pattern: "properties/{property}/conversionEvents/{conversion_event}"
1040  };
1041
1042  // Output only. Resource name of this conversion event.
1043  // Format: properties/{property}/conversionEvents/{conversion_event}
1044  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
1045
1046  // Immutable. The event name for this conversion event.
1047  // Examples: 'click', 'purchase'
1048  string event_name = 2 [(google.api.field_behavior) = IMMUTABLE];
1049
1050  // Output only. Time when this conversion event was created in the property.
1051  google.protobuf.Timestamp create_time = 3
1052      [(google.api.field_behavior) = OUTPUT_ONLY];
1053
1054  // Output only. If set, this event can currently be deleted with
1055  // DeleteConversionEvent.
1056  bool deletable = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
1057
1058  // Output only. If set to true, this conversion event refers to a custom
1059  // event.  If set to false, this conversion event refers to a default event in
1060  // GA. Default events typically have special meaning in GA. Default events are
1061  // usually created for you by the GA system, but in some cases can be created
1062  // by property admins. Custom events count towards the maximum number of
1063  // custom conversion events that may be created per property.
1064  bool custom = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
1065}
1066
1067// Settings values for Google Signals.  This is a singleton resource.
1068message GoogleSignalsSettings {
1069  option (google.api.resource) = {
1070    type: "analyticsadmin.googleapis.com/GoogleSignalsSettings"
1071    pattern: "properties/{property}/googleSignalsSettings"
1072  };
1073
1074  // Output only. Resource name of this setting.
1075  // Format: properties/{property_id}/googleSignalsSettings
1076  // Example: "properties/1000/googleSignalsSettings"
1077  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
1078
1079  // Status of this setting.
1080  GoogleSignalsState state = 3;
1081
1082  // Output only. Terms of Service acceptance.
1083  GoogleSignalsConsent consent = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
1084}
1085
1086// A definition for a CustomDimension.
1087message CustomDimension {
1088  option (google.api.resource) = {
1089    type: "analyticsadmin.googleapis.com/CustomDimension"
1090    pattern: "properties/{property}/customDimensions/{custom_dimension}"
1091  };
1092
1093  // Valid values for the scope of this dimension.
1094  enum DimensionScope {
1095    // Scope unknown or not specified.
1096    DIMENSION_SCOPE_UNSPECIFIED = 0;
1097
1098    // Dimension scoped to an event.
1099    EVENT = 1;
1100
1101    // Dimension scoped to a user.
1102    USER = 2;
1103
1104    // Dimension scoped to eCommerce items
1105    ITEM = 3;
1106  }
1107
1108  // Output only. Resource name for this CustomDimension resource.
1109  // Format: properties/{property}/customDimensions/{customDimension}
1110  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
1111
1112  // Required. Immutable. Tagging parameter name for this custom dimension.
1113  //
1114  // If this is a user-scoped dimension, then this is the user property name.
1115  // If this is an event-scoped dimension, then this is the event parameter
1116  // name.
1117  //
1118  // If this is an item-scoped dimension, then this is the parameter
1119  // name found in the eCommerce items array.
1120  //
1121  // May only contain alphanumeric and underscore characters, starting with a
1122  // letter. Max length of 24 characters for user-scoped dimensions, 40
1123  // characters for event-scoped dimensions.
1124  string parameter_name = 2 [
1125    (google.api.field_behavior) = REQUIRED,
1126    (google.api.field_behavior) = IMMUTABLE
1127  ];
1128
1129  // Required. Display name for this custom dimension as shown in the Analytics
1130  // UI. Max length of 82 characters, alphanumeric plus space and underscore
1131  // starting with a letter. Legacy system-generated display names may contain
1132  // square brackets, but updates to this field will never permit square
1133  // brackets.
1134  string display_name = 3 [(google.api.field_behavior) = REQUIRED];
1135
1136  // Optional. Description for this custom dimension. Max length of 150
1137  // characters.
1138  string description = 4 [(google.api.field_behavior) = OPTIONAL];
1139
1140  // Required. Immutable. The scope of this dimension.
1141  DimensionScope scope = 5 [
1142    (google.api.field_behavior) = REQUIRED,
1143    (google.api.field_behavior) = IMMUTABLE
1144  ];
1145
1146  // Optional. If set to true, sets this dimension as NPA and excludes it from
1147  // ads personalization.
1148  //
1149  // This is currently only supported by user-scoped custom dimensions.
1150  bool disallow_ads_personalization = 6
1151      [(google.api.field_behavior) = OPTIONAL];
1152}
1153
1154// A definition for a custom metric.
1155message CustomMetric {
1156  option (google.api.resource) = {
1157    type: "analyticsadmin.googleapis.com/CustomMetric"
1158    pattern: "properties/{property}/customMetrics/{custom_metric}"
1159  };
1160
1161  // Possible types of representing the custom metric's value.
1162  //
1163  // Currency representation may change in the future, requiring a breaking API
1164  // change.
1165  enum MeasurementUnit {
1166    // MeasurementUnit unspecified or missing.
1167    MEASUREMENT_UNIT_UNSPECIFIED = 0;
1168
1169    // This metric uses default units.
1170    STANDARD = 1;
1171
1172    // This metric measures a currency.
1173    CURRENCY = 2;
1174
1175    // This metric measures feet.
1176    FEET = 3;
1177
1178    // This metric measures meters.
1179    METERS = 4;
1180
1181    // This metric measures kilometers.
1182    KILOMETERS = 5;
1183
1184    // This metric measures miles.
1185    MILES = 6;
1186
1187    // This metric measures milliseconds.
1188    MILLISECONDS = 7;
1189
1190    // This metric measures seconds.
1191    SECONDS = 8;
1192
1193    // This metric measures minutes.
1194    MINUTES = 9;
1195
1196    // This metric measures hours.
1197    HOURS = 10;
1198  }
1199
1200  // The scope of this metric.
1201  enum MetricScope {
1202    // Scope unknown or not specified.
1203    METRIC_SCOPE_UNSPECIFIED = 0;
1204
1205    // Metric scoped to an event.
1206    EVENT = 1;
1207  }
1208
1209  // Labels that mark the data in this custom metric as data that should be
1210  // restricted to specific users.
1211  enum RestrictedMetricType {
1212    // Type unknown or unspecified.
1213    RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0;
1214
1215    // Metric reports cost data.
1216    COST_DATA = 1;
1217
1218    // Metric reports revenue data.
1219    REVENUE_DATA = 2;
1220  }
1221
1222  // Output only. Resource name for this CustomMetric resource.
1223  // Format: properties/{property}/customMetrics/{customMetric}
1224  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
1225
1226  // Required. Immutable. Tagging name for this custom metric.
1227  //
1228  // If this is an event-scoped metric, then this is the event parameter
1229  // name.
1230  //
1231  // May only contain alphanumeric and underscore charactes, starting with a
1232  // letter. Max length of 40 characters for event-scoped metrics.
1233  string parameter_name = 2 [
1234    (google.api.field_behavior) = REQUIRED,
1235    (google.api.field_behavior) = IMMUTABLE
1236  ];
1237
1238  // Required. Display name for this custom metric as shown in the Analytics UI.
1239  // Max length of 82 characters, alphanumeric plus space and underscore
1240  // starting with a letter. Legacy system-generated display names may contain
1241  // square brackets, but updates to this field will never permit square
1242  // brackets.
1243  string display_name = 3 [(google.api.field_behavior) = REQUIRED];
1244
1245  // Optional. Description for this custom dimension.
1246  // Max length of 150 characters.
1247  string description = 4 [(google.api.field_behavior) = OPTIONAL];
1248
1249  // Required. The type for the custom metric's value.
1250  MeasurementUnit measurement_unit = 5 [(google.api.field_behavior) = REQUIRED];
1251
1252  // Required. Immutable. The scope of this custom metric.
1253  MetricScope scope = 6 [
1254    (google.api.field_behavior) = REQUIRED,
1255    (google.api.field_behavior) = IMMUTABLE
1256  ];
1257
1258  // Optional. Types of restricted data that this metric may contain. Required
1259  // for metrics with CURRENCY measurement unit. Must be empty for metrics with
1260  // a non-CURRENCY measurement unit.
1261  repeated RestrictedMetricType restricted_metric_type = 8
1262      [(google.api.field_behavior) = OPTIONAL];
1263}
1264
1265// Settings values for data retention. This is a singleton resource.
1266message DataRetentionSettings {
1267  option (google.api.resource) = {
1268    type: "analyticsadmin.googleapis.com/DataRetentionSettings"
1269    pattern: "properties/{property}/dataRetentionSettings"
1270  };
1271
1272  // Valid values for the data retention duration.
1273  enum RetentionDuration {
1274    // Data retention time duration is not specified.
1275    RETENTION_DURATION_UNSPECIFIED = 0;
1276
1277    // The data retention time duration is 2 months.
1278    TWO_MONTHS = 1;
1279
1280    // The data retention time duration is 14 months.
1281    FOURTEEN_MONTHS = 3;
1282
1283    // The data retention time duration is 26 months.
1284    // Available to 360 properties only.
1285    TWENTY_SIX_MONTHS = 4;
1286
1287    // The data retention time duration is 38 months.
1288    // Available to 360 properties only.
1289    THIRTY_EIGHT_MONTHS = 5;
1290
1291    // The data retention time duration is 50 months.
1292    // Available to 360 properties only.
1293    FIFTY_MONTHS = 6;
1294  }
1295
1296  // Output only. Resource name for this DataRetentionSetting resource.
1297  // Format: properties/{property}/dataRetentionSettings
1298  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
1299
1300  // The length of time that event-level data is retained.
1301  RetentionDuration event_data_retention = 2;
1302
1303  // If true, reset the retention period for the user identifier with every
1304  // event from that user.
1305  bool reset_user_data_on_new_activity = 3;
1306}
1307
1308// The attribution settings used for a given property. This is a singleton
1309// resource.
1310message AttributionSettings {
1311  option (google.api.resource) = {
1312    type: "analyticsadmin.googleapis.com/AttributionSettings"
1313    pattern: "properties/{property}/attributionSettings"
1314  };
1315
1316  // How far back in time events should be considered for inclusion in a
1317  // converting path which leads to the first install of an app or the first
1318  // visit to a site.
1319  enum AcquisitionConversionEventLookbackWindow {
1320    // Lookback window size unspecified.
1321    ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED = 0;
1322
1323    // 7-day lookback window.
1324    ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS = 1;
1325
1326    // 30-day lookback window.
1327    ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS = 2;
1328  }
1329
1330  // How far back in time events should be considered for inclusion in a
1331  // converting path for all conversions other than first app install/first site
1332  // visit.
1333  enum OtherConversionEventLookbackWindow {
1334    // Lookback window size unspecified.
1335    OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED = 0;
1336
1337    // 30-day lookback window.
1338    OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS = 1;
1339
1340    // 60-day lookback window.
1341    OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS = 2;
1342
1343    // 90-day lookback window.
1344    OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS = 3;
1345  }
1346
1347  // The reporting attribution model used to calculate conversion credit in this
1348  // property's reports.
1349  enum ReportingAttributionModel {
1350    // Reporting attribution model unspecified.
1351    REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED = 0;
1352
1353    // Data-driven attribution distributes credit for the conversion based on
1354    // data for each conversion event. Each Data-driven model is specific to
1355    // each advertiser and each conversion event.
1356    CROSS_CHANNEL_DATA_DRIVEN = 1;
1357
1358    // Ignores direct traffic and attributes 100% of the conversion value to the
1359    // last channel that the customer clicked through (or engaged view through
1360    // for YouTube) before converting.
1361    CROSS_CHANNEL_LAST_CLICK = 2;
1362
1363    // Gives all credit for the conversion to the first channel that a customer
1364    // clicked (or engaged view through for YouTube) before converting.
1365    CROSS_CHANNEL_FIRST_CLICK = 3;
1366
1367    // Distributes the credit for the conversion equally across all the channels
1368    // a customer clicked (or engaged view through for YouTube) before
1369    // converting.
1370    CROSS_CHANNEL_LINEAR = 4;
1371
1372    // Attributes 40% credit to the first and last interaction, and the
1373    // remaining 20% credit is distributed evenly to the middle interactions.
1374    CROSS_CHANNEL_POSITION_BASED = 5;
1375
1376    // Gives more credit to the touchpoints that happened closer in time to
1377    // the conversion.
1378    CROSS_CHANNEL_TIME_DECAY = 6;
1379
1380    // Attributes 100% of the conversion value to the last Google Ads channel
1381    // that the customer clicked through before converting.
1382    ADS_PREFERRED_LAST_CLICK = 7;
1383  }
1384
1385  // Output only. Resource name of this attribution settings resource.
1386  // Format: properties/{property_id}/attributionSettings
1387  // Example: "properties/1000/attributionSettings"
1388  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
1389
1390  // Required. The lookback window configuration for acquisition conversion
1391  // events. The default window size is 30 days.
1392  AcquisitionConversionEventLookbackWindow
1393      acquisition_conversion_event_lookback_window = 2
1394      [(google.api.field_behavior) = REQUIRED];
1395
1396  // Required. The lookback window for all other, non-acquisition conversion
1397  // events. The default window size is 90 days.
1398  OtherConversionEventLookbackWindow other_conversion_event_lookback_window = 3
1399      [(google.api.field_behavior) = REQUIRED];
1400
1401  // Required. The reporting attribution model used to calculate conversion
1402  // credit in this property's reports.
1403  //
1404  // Changing the attribution model will apply to both historical and future
1405  // data. These changes will be reflected in reports with conversion and
1406  // revenue data. User and session data will be unaffected.
1407  ReportingAttributionModel reporting_attribution_model = 4
1408      [(google.api.field_behavior) = REQUIRED];
1409}
1410
1411// A binding of a user to a set of roles.
1412message AccessBinding {
1413  option (google.api.resource) = {
1414    type: "analyticsadmin.googleapis.com/AccessBinding"
1415    pattern: "accounts/{account}/accessBindings/{access_binding}"
1416    pattern: "properties/{property}/accessBindings/{access_binding}"
1417  };
1418
1419  // The target for which to set roles for.
1420  oneof access_target {
1421    // If set, the email address of the user to set roles for.
1422    // Format: "[email protected]"
1423    string user = 2;
1424  }
1425
1426  // Output only. Resource name of this binding.
1427  //
1428  // Format: accounts/{account}/accessBindings/{access_binding} or
1429  // properties/{property}/accessBindings/{access_binding}
1430  //
1431  // Example:
1432  // "accounts/100/accessBindings/200"
1433  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
1434
1435  // A list of roles for to grant to the parent resource.
1436  //
1437  // Valid values:
1438  // predefinedRoles/viewer
1439  // predefinedRoles/analyst
1440  // predefinedRoles/editor
1441  // predefinedRoles/admin
1442  // predefinedRoles/no-cost-data
1443  // predefinedRoles/no-revenue-data
1444  //
1445  // For users, if an empty list of roles is set, this AccessBinding will be
1446  // deleted.
1447  repeated string roles = 3;
1448}
1449
1450// A link between a GA4 Property and BigQuery project.
1451message BigQueryLink {
1452  option (google.api.resource) = {
1453    type: "analyticsadmin.googleapis.com/BigQueryLink"
1454    pattern: "properties/{property}/bigQueryLinks/{bigquery_link}"
1455  };
1456
1457  // Output only. Resource name of this BigQuery link.
1458  // Format: 'properties/{property_id}/bigQueryLinks/{bigquery_link_id}'
1459  // Format: 'properties/1234/bigQueryLinks/abc567'
1460  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
1461
1462  // Immutable. The linked Google Cloud project. When creating a BigQueryLink,
1463  // you may provide this resource name using either a project number or project
1464  // ID. Once this resource has been created, the returned project will always
1465  // have a project that contains a project number.
1466  // Format: 'projects/{project number}'
1467  // Example: 'projects/1234'
1468  string project = 2 [(google.api.field_behavior) = IMMUTABLE];
1469
1470  // Output only. Time when the link was created.
1471  google.protobuf.Timestamp create_time = 3
1472      [(google.api.field_behavior) = OUTPUT_ONLY];
1473
1474  // If set true, enables daily data export to the linked Google Cloud project.
1475  bool daily_export_enabled = 4;
1476
1477  // If set true, enables streaming export to the linked Google Cloud project.
1478  bool streaming_export_enabled = 5;
1479
1480  // If set true, enables intraday export to the linked Google Cloud project.
1481  bool intraday_export_enabled = 9;
1482
1483  // If set true, exported data will include advertising identifiers for mobile
1484  // app streams.
1485  bool include_advertising_id = 6;
1486
1487  // The list of streams under the parent property for which data will be
1488  // exported.
1489  // Format: properties/{property_id}/dataStreams/{stream_id}
1490  // Example: ['properties/1000/dataStreams/2000']
1491  repeated string export_streams = 7;
1492
1493  // The list of event names that will be excluded from exports.
1494  repeated string excluded_events = 8;
1495}
1496
1497// Singleton resource under a WebDataStream, configuring measurement of
1498// additional site interactions and content.
1499message EnhancedMeasurementSettings {
1500  option (google.api.resource) = {
1501    type: "analyticsadmin.googleapis.com/EnhancedMeasurementSettings"
1502    pattern: "properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings"
1503  };
1504
1505  // Output only. Resource name of the Enhanced Measurement Settings.
1506  // Format:
1507  // properties/{property_id}/dataStreams/{data_stream}/enhancedMeasurementSettings
1508  // Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings"
1509  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
1510
1511  // Indicates whether Enhanced Measurement Settings will be used to
1512  // automatically measure interactions and content on this web stream.
1513  //
1514  // Changing this value does not affect the settings themselves, but determines
1515  // whether they are respected.
1516  bool stream_enabled = 2;
1517
1518  // If enabled, capture scroll events each time a visitor gets to the bottom of
1519  // a page.
1520  bool scrolls_enabled = 3;
1521
1522  // If enabled, capture an outbound click event each time a visitor clicks a
1523  // link that leads them away from your domain.
1524  bool outbound_clicks_enabled = 4;
1525
1526  // If enabled, capture a view search results event each time a visitor
1527  // performs a search on your site (based on a query parameter).
1528  bool site_search_enabled = 5;
1529
1530  // If enabled, capture video play, progress, and complete events as visitors
1531  // view embedded videos on your site.
1532  bool video_engagement_enabled = 6;
1533
1534  // If enabled, capture a file download event each time a link is clicked with
1535  // a common document, compressed file, application, video, or audio extension.
1536  bool file_downloads_enabled = 7;
1537
1538  // If enabled, capture a page view event each time the website changes the
1539  // browser history state.
1540  bool page_changes_enabled = 8;
1541
1542  // If enabled, capture a form interaction event each time a visitor interacts
1543  // with a form on your website.
1544  // False by default.
1545  bool form_interactions_enabled = 9;
1546
1547  // Required. URL query parameters to interpret as site search parameters.
1548  // Max length is 1024 characters. Must not be empty.
1549  string search_query_parameter = 10 [(google.api.field_behavior) = REQUIRED];
1550
1551  // Additional URL query parameters.
1552  // Max length is 1024 characters.
1553  string uri_query_parameter = 11;
1554}
1555
1556// Configuration for a specific Connected Site Tag.
1557message ConnectedSiteTag {
1558  // Required. User-provided display name for the connected site tag. Must be
1559  // less than 256 characters.
1560  string display_name = 1 [(google.api.field_behavior) = REQUIRED];
1561
1562  // Required. "Tag ID to forward events to. Also known as the Measurement ID,
1563  // or the "G-ID"  (For example: G-12345).
1564  string tag_id = 2 [(google.api.field_behavior) = REQUIRED];
1565}
1566