xref: /aosp_15_r20/external/googleapis/google/analytics/admin/v1beta/resources.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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.v1beta;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/protobuf/timestamp.proto";
22import "google/protobuf/wrappers.proto";
23
24option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1beta;admin";
25option java_multiple_files = true;
26option java_outer_classname = "ResourcesProto";
27option java_package = "com.google.analytics.admin.v1beta";
28
29// The category selected for this property, used for industry benchmarking.
30enum IndustryCategory {
31  // Industry category unspecified
32  INDUSTRY_CATEGORY_UNSPECIFIED = 0;
33
34  // Automotive
35  AUTOMOTIVE = 1;
36
37  // Business and industrial markets
38  BUSINESS_AND_INDUSTRIAL_MARKETS = 2;
39
40  // Finance
41  FINANCE = 3;
42
43  // Healthcare
44  HEALTHCARE = 4;
45
46  // Technology
47  TECHNOLOGY = 5;
48
49  // Travel
50  TRAVEL = 6;
51
52  // Other
53  OTHER = 7;
54
55  // Arts and entertainment
56  ARTS_AND_ENTERTAINMENT = 8;
57
58  // Beauty and fitness
59  BEAUTY_AND_FITNESS = 9;
60
61  // Books and literature
62  BOOKS_AND_LITERATURE = 10;
63
64  // Food and drink
65  FOOD_AND_DRINK = 11;
66
67  // Games
68  GAMES = 12;
69
70  // Hobbies and leisure
71  HOBBIES_AND_LEISURE = 13;
72
73  // Home and garden
74  HOME_AND_GARDEN = 14;
75
76  // Internet and telecom
77  INTERNET_AND_TELECOM = 15;
78
79  // Law and government
80  LAW_AND_GOVERNMENT = 16;
81
82  // News
83  NEWS = 17;
84
85  // Online communities
86  ONLINE_COMMUNITIES = 18;
87
88  // People and society
89  PEOPLE_AND_SOCIETY = 19;
90
91  // Pets and animals
92  PETS_AND_ANIMALS = 20;
93
94  // Real estate
95  REAL_ESTATE = 21;
96
97  // Reference
98  REFERENCE = 22;
99
100  // Science
101  SCIENCE = 23;
102
103  // Sports
104  SPORTS = 24;
105
106  // Jobs and education
107  JOBS_AND_EDUCATION = 25;
108
109  // Shopping
110  SHOPPING = 26;
111}
112
113// Various levels of service for Google Analytics.
114enum ServiceLevel {
115  // Service level not specified or invalid.
116  SERVICE_LEVEL_UNSPECIFIED = 0;
117
118  // The standard version of Google Analytics.
119  GOOGLE_ANALYTICS_STANDARD = 1;
120
121  // The paid, premium version of Google Analytics.
122  GOOGLE_ANALYTICS_360 = 2;
123}
124
125// Different kinds of actors that can make changes to Google Analytics
126// resources.
127enum ActorType {
128  // Unknown or unspecified actor type.
129  ACTOR_TYPE_UNSPECIFIED = 0;
130
131  // Changes made by the user specified in actor_email.
132  USER = 1;
133
134  // Changes made by the Google Analytics system.
135  SYSTEM = 2;
136
137  // Changes made by Google Analytics support team staff.
138  SUPPORT = 3;
139}
140
141// Types of actions that may change a resource.
142enum ActionType {
143  // Action type unknown or not specified.
144  ACTION_TYPE_UNSPECIFIED = 0;
145
146  // Resource was created in this change.
147  CREATED = 1;
148
149  // Resource was updated in this change.
150  UPDATED = 2;
151
152  // Resource was deleted in this change.
153  DELETED = 3;
154}
155
156// Types of resources whose changes may be returned from change history.
157enum ChangeHistoryResourceType {
158  // Resource type unknown or not specified.
159  CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0;
160
161  // Account resource
162  ACCOUNT = 1;
163
164  // Property resource
165  PROPERTY = 2;
166
167  // FirebaseLink resource
168  FIREBASE_LINK = 6;
169
170  // GoogleAdsLink resource
171  GOOGLE_ADS_LINK = 7;
172
173  // GoogleSignalsSettings resource
174  GOOGLE_SIGNALS_SETTINGS = 8;
175
176  // ConversionEvent resource
177  CONVERSION_EVENT = 9;
178
179  // MeasurementProtocolSecret resource
180  MEASUREMENT_PROTOCOL_SECRET = 10;
181
182  // DataRetentionSettings resource
183  DATA_RETENTION_SETTINGS = 13;
184
185  // DisplayVideo360AdvertiserLink resource
186  DISPLAY_VIDEO_360_ADVERTISER_LINK = 14;
187
188  // DisplayVideo360AdvertiserLinkProposal resource
189  DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL = 15;
190
191  // DataStream resource
192  DATA_STREAM = 18;
193
194  // AttributionSettings resource
195  ATTRIBUTION_SETTINGS = 20;
196}
197
198// Types of Property resources.
199enum PropertyType {
200  // Unknown or unspecified property type
201  PROPERTY_TYPE_UNSPECIFIED = 0;
202
203  // Ordinary GA4 property
204  PROPERTY_TYPE_ORDINARY = 1;
205
206  // GA4 subproperty
207  PROPERTY_TYPE_SUBPROPERTY = 2;
208
209  // GA4 rollup property
210  PROPERTY_TYPE_ROLLUP = 3;
211}
212
213// A resource message representing a Google Analytics account.
214message Account {
215  option (google.api.resource) = {
216    type: "analyticsadmin.googleapis.com/Account"
217    pattern: "accounts/{account}"
218  };
219
220  // Output only. Resource name of this account.
221  // Format: accounts/{account}
222  // Example: "accounts/100"
223  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
224
225  // Output only. Time when this account was originally created.
226  google.protobuf.Timestamp create_time = 2
227      [(google.api.field_behavior) = OUTPUT_ONLY];
228
229  // Output only. Time when account payload fields were last updated.
230  google.protobuf.Timestamp update_time = 3
231      [(google.api.field_behavior) = OUTPUT_ONLY];
232
233  // Required. Human-readable display name for this account.
234  string display_name = 4 [(google.api.field_behavior) = REQUIRED];
235
236  // Country of business. Must be a Unicode CLDR region code.
237  string region_code = 5;
238
239  // Output only. Indicates whether this Account is soft-deleted or not. Deleted
240  // accounts are excluded from List results unless specifically requested.
241  bool deleted = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
242}
243
244// A resource message representing a Google Analytics GA4 property.
245message Property {
246  option (google.api.resource) = {
247    type: "analyticsadmin.googleapis.com/Property"
248    pattern: "properties/{property}"
249  };
250
251  // Output only. Resource name of this property.
252  // Format: properties/{property_id}
253  // Example: "properties/1000"
254  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
255
256  // Immutable. The property type for this Property resource. When creating a
257  // property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then
258  // "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY"
259  // types cannot yet be created with the Google Analytics Admin API.
260  PropertyType property_type = 14 [(google.api.field_behavior) = IMMUTABLE];
261
262  // Output only. Time when the entity was originally created.
263  google.protobuf.Timestamp create_time = 3
264      [(google.api.field_behavior) = OUTPUT_ONLY];
265
266  // Output only. Time when entity payload fields were last updated.
267  google.protobuf.Timestamp update_time = 4
268      [(google.api.field_behavior) = OUTPUT_ONLY];
269
270  // Immutable. Resource name of this property's logical parent.
271  //
272  // Note: The Property-Moving UI can be used to change the parent.
273  // Format: accounts/{account}, properties/{property}
274  // Example: "accounts/100", "properties/101"
275  string parent = 2 [(google.api.field_behavior) = IMMUTABLE];
276
277  // Required. Human-readable display name for this property.
278  //
279  // The max allowed display name length is 100 UTF-16 code units.
280  string display_name = 5 [(google.api.field_behavior) = REQUIRED];
281
282  // Industry associated with this property
283  // Example: AUTOMOTIVE, FOOD_AND_DRINK
284  IndustryCategory industry_category = 6;
285
286  // Required. Reporting Time Zone, used as the day boundary for reports,
287  // regardless of where the data originates. If the time zone honors DST,
288  // Analytics will automatically adjust for the changes.
289  //
290  // NOTE: Changing the time zone only affects data going forward, and is not
291  // applied retroactively.
292  //
293  // Format: https://www.iana.org/time-zones
294  // Example: "America/Los_Angeles"
295  string time_zone = 7 [(google.api.field_behavior) = REQUIRED];
296
297  // The currency type used in reports involving monetary values.
298  //
299  //
300  // Format: https://en.wikipedia.org/wiki/ISO_4217
301  // Examples: "USD", "EUR", "JPY"
302  string currency_code = 8;
303
304  // Output only. The Google Analytics service level that applies to this
305  // property.
306  ServiceLevel service_level = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
307
308  // Output only. If set, the time at which this property was trashed. If not
309  // set, then this property is not currently in the trash can.
310  google.protobuf.Timestamp delete_time = 11
311      [(google.api.field_behavior) = OUTPUT_ONLY];
312
313  // Output only. If set, the time at which this trashed property will be
314  // permanently deleted. If not set, then this property is not currently in the
315  // trash can and is not slated to be deleted.
316  google.protobuf.Timestamp expire_time = 12
317      [(google.api.field_behavior) = OUTPUT_ONLY];
318
319  // Immutable. The resource name of the parent account
320  // Format: accounts/{account_id}
321  // Example: "accounts/123"
322  string account = 13 [
323    (google.api.field_behavior) = IMMUTABLE,
324    (google.api.resource_reference) = {
325      type: "analyticsadmin.googleapis.com/Account"
326    }
327  ];
328}
329
330// A resource message representing a data stream.
331message DataStream {
332  option (google.api.resource) = {
333    type: "analyticsadmin.googleapis.com/DataStream"
334    pattern: "properties/{property}/dataStreams/{data_stream}"
335  };
336
337  // Data specific to web streams.
338  message WebStreamData {
339    // Output only. Analytics Measurement ID.
340    //
341    // Example: "G-1A2BCD345E"
342    string measurement_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
343
344    // Output only. ID of the corresponding web app in Firebase, if any.
345    // This ID can change if the web app is deleted and recreated.
346    string firebase_app_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
347
348    // Domain name of the web app being measured, or empty.
349    // Example: "http://www.google.com", "https://www.google.com"
350    string default_uri = 3;
351  }
352
353  // Data specific to Android app streams.
354  message AndroidAppStreamData {
355    // Output only. ID of the corresponding Android app in Firebase, if any.
356    // This ID can change if the Android app is deleted and recreated.
357    string firebase_app_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
358
359    // Immutable. The package name for the app being measured.
360    // Example: "com.example.myandroidapp"
361    string package_name = 2 [(google.api.field_behavior) = IMMUTABLE];
362  }
363
364  // Data specific to iOS app streams.
365  message IosAppStreamData {
366    // Output only. ID of the corresponding iOS app in Firebase, if any.
367    // This ID can change if the iOS app is deleted and recreated.
368    string firebase_app_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
369
370    // Required. Immutable. The Apple App Store Bundle ID for the app
371    // Example: "com.example.myiosapp"
372    string bundle_id = 2 [
373      (google.api.field_behavior) = IMMUTABLE,
374      (google.api.field_behavior) = REQUIRED
375    ];
376  }
377
378  // The type of the data stream.
379  enum DataStreamType {
380    // Type unknown or not specified.
381    DATA_STREAM_TYPE_UNSPECIFIED = 0;
382
383    // Web data stream.
384    WEB_DATA_STREAM = 1;
385
386    // Android app data stream.
387    ANDROID_APP_DATA_STREAM = 2;
388
389    // iOS app data stream.
390    IOS_APP_DATA_STREAM = 3;
391  }
392
393  // Data for specific data stream types. The message that will be
394  // set corresponds to the type of this stream.
395  oneof stream_data {
396    // Data specific to web streams. Must be populated if type is
397    // WEB_DATA_STREAM.
398    WebStreamData web_stream_data = 6;
399
400    // Data specific to Android app streams. Must be populated if type is
401    // ANDROID_APP_DATA_STREAM.
402    AndroidAppStreamData android_app_stream_data = 7;
403
404    // Data specific to iOS app streams. Must be populated if type is
405    // IOS_APP_DATA_STREAM.
406    IosAppStreamData ios_app_stream_data = 8;
407  }
408
409  // Output only. Resource name of this Data Stream.
410  // Format: properties/{property_id}/dataStreams/{stream_id}
411  // Example: "properties/1000/dataStreams/2000"
412  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
413
414  // Required. Immutable. The type of this DataStream resource.
415  DataStreamType type = 2 [
416    (google.api.field_behavior) = IMMUTABLE,
417    (google.api.field_behavior) = REQUIRED
418  ];
419
420  // Human-readable display name for the Data Stream.
421  //
422  // Required for web data streams.
423  //
424  // The max allowed display name length is 255 UTF-16 code units.
425  string display_name = 3;
426
427  // Output only. Time when this stream was originally created.
428  google.protobuf.Timestamp create_time = 4
429      [(google.api.field_behavior) = OUTPUT_ONLY];
430
431  // Output only. Time when stream payload fields were last updated.
432  google.protobuf.Timestamp update_time = 5
433      [(google.api.field_behavior) = OUTPUT_ONLY];
434}
435
436// A link between a GA4 property and a Firebase project.
437message FirebaseLink {
438  option (google.api.resource) = {
439    type: "analyticsadmin.googleapis.com/FirebaseLink"
440    pattern: "properties/{property}/firebaseLinks/{firebase_link}"
441  };
442
443  // Output only. Example format: properties/1234/firebaseLinks/5678
444  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
445
446  // Immutable. Firebase project resource name. When creating a FirebaseLink,
447  // you may provide this resource name using either a project number or project
448  // ID. Once this resource has been created, returned FirebaseLinks will always
449  // have a project_name that contains a project number.
450  //
451  // Format: 'projects/{project number}'
452  // Example: 'projects/1234'
453  string project = 2 [(google.api.field_behavior) = IMMUTABLE];
454
455  // Output only. Time when this FirebaseLink was originally created.
456  google.protobuf.Timestamp create_time = 3
457      [(google.api.field_behavior) = OUTPUT_ONLY];
458}
459
460// A link between a GA4 property and a Google Ads account.
461message GoogleAdsLink {
462  option (google.api.resource) = {
463    type: "analyticsadmin.googleapis.com/GoogleAdsLink"
464    pattern: "properties/{property}/googleAdsLinks/{google_ads_link}"
465  };
466
467  // Output only. Format:
468  // properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
469  //
470  // Note: googleAdsLinkId is not the Google Ads customer ID.
471  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
472
473  // Immutable. Google Ads customer ID.
474  string customer_id = 3 [(google.api.field_behavior) = IMMUTABLE];
475
476  // Output only. If true, this link is for a Google Ads manager account.
477  bool can_manage_clients = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
478
479  // Enable personalized advertising features with this integration.
480  // Automatically publish my Google Analytics audience lists and Google
481  // Analytics remarketing events/parameters to the linked Google Ads account.
482  // If this field is not set on create/update, it will be defaulted to true.
483  google.protobuf.BoolValue ads_personalization_enabled = 5;
484
485  // Output only. Time when this link was originally created.
486  google.protobuf.Timestamp create_time = 7
487      [(google.api.field_behavior) = OUTPUT_ONLY];
488
489  // Output only. Time when this link was last updated.
490  google.protobuf.Timestamp update_time = 8
491      [(google.api.field_behavior) = OUTPUT_ONLY];
492
493  // Output only. Email address of the user that created the link.
494  // An empty string will be returned if the email address can't be retrieved.
495  string creator_email_address = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
496}
497
498// A resource message representing data sharing settings of a Google Analytics
499// account.
500message DataSharingSettings {
501  option (google.api.resource) = {
502    type: "analyticsadmin.googleapis.com/DataSharingSettings"
503    pattern: "accounts/{account}/dataSharingSettings"
504  };
505
506  // Output only. Resource name.
507  // Format: accounts/{account}/dataSharingSettings
508  // Example: "accounts/1000/dataSharingSettings"
509  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
510
511  // Allows Google support to access the data in order to help troubleshoot
512  // issues.
513  bool sharing_with_google_support_enabled = 2;
514
515  // Allows Google sales teams that are assigned to the customer to access the
516  // data in order to suggest configuration changes to improve results.
517  // Sales team restrictions still apply when enabled.
518  bool sharing_with_google_assigned_sales_enabled = 3;
519
520  // Allows any of Google sales to access the data in order to suggest
521  // configuration changes to improve results.
522  bool sharing_with_google_any_sales_enabled = 4;
523
524  // Allows Google to use the data to improve other Google products or services.
525  bool sharing_with_google_products_enabled = 5;
526
527  // Allows Google to share the data anonymously in aggregate form with others.
528  bool sharing_with_others_enabled = 6;
529}
530
531// A virtual resource representing an overview of an account and
532// all its child GA4 properties.
533message AccountSummary {
534  option (google.api.resource) = {
535    type: "analyticsadmin.googleapis.com/AccountSummary"
536    pattern: "accountSummaries/{account_summary}"
537  };
538
539  // Resource name for this account summary.
540  // Format: accountSummaries/{account_id}
541  // Example: "accountSummaries/1000"
542  string name = 1;
543
544  // Resource name of account referred to by this account summary
545  // Format: accounts/{account_id}
546  // Example: "accounts/1000"
547  string account = 2 [(google.api.resource_reference) = {
548    type: "analyticsadmin.googleapis.com/Account"
549  }];
550
551  // Display name for the account referred to in this account summary.
552  string display_name = 3;
553
554  // List of summaries for child accounts of this account.
555  repeated PropertySummary property_summaries = 4;
556}
557
558// A virtual resource representing metadata for a GA4 property.
559message PropertySummary {
560  // Resource name of property referred to by this property summary
561  // Format: properties/{property_id}
562  // Example: "properties/1000"
563  string property = 1 [(google.api.resource_reference) = {
564    type: "analyticsadmin.googleapis.com/Property"
565  }];
566
567  // Display name for the property referred to in this property summary.
568  string display_name = 2;
569
570  // The property's property type.
571  PropertyType property_type = 3;
572
573  // Resource name of this property's logical parent.
574  //
575  // Note: The Property-Moving UI can be used to change the parent.
576  // Format: accounts/{account}, properties/{property}
577  // Example: "accounts/100", "properties/200"
578  string parent = 4;
579}
580
581// A secret value used for sending hits to Measurement Protocol.
582message MeasurementProtocolSecret {
583  option (google.api.resource) = {
584    type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret"
585    pattern: "properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}"
586  };
587
588  // Output only. Resource name of this secret. This secret may be a child of
589  // any type of stream. Format:
590  // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
591  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
592
593  // Required. Human-readable display name for this secret.
594  string display_name = 2 [(google.api.field_behavior) = REQUIRED];
595
596  // Output only. The measurement protocol secret value. Pass this value to the
597  // api_secret field of the Measurement Protocol API when sending hits to this
598  // secret's parent property.
599  string secret_value = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
600}
601
602// A set of changes within a Google Analytics account or its child properties
603// that resulted from the same cause. Common causes would be updates made in the
604// Google Analytics UI, changes from customer support, or automatic Google
605// Analytics system changes.
606message ChangeHistoryEvent {
607  // ID of this change history event. This ID is unique across Google Analytics.
608  string id = 1;
609
610  // Time when change was made.
611  google.protobuf.Timestamp change_time = 2;
612
613  // The type of actor that made this change.
614  ActorType actor_type = 3;
615
616  // Email address of the Google account that made the change. This will be a
617  // valid email address if the actor field is set to USER, and empty otherwise.
618  // Google accounts that have been deleted will cause an error.
619  string user_actor_email = 4;
620
621  // If true, then the list of changes returned was filtered, and does not
622  // represent all changes that occurred in this event.
623  bool changes_filtered = 5;
624
625  // A list of changes made in this change history event that fit the filters
626  // specified in SearchChangeHistoryEventsRequest.
627  repeated ChangeHistoryChange changes = 6;
628}
629
630// A description of a change to a single Google Analytics resource.
631message ChangeHistoryChange {
632  // A snapshot of a resource as before or after the result of a change in
633  // change history.
634  message ChangeHistoryResource {
635    oneof resource {
636      // A snapshot of an Account resource in change history.
637      Account account = 1;
638
639      // A snapshot of a Property resource in change history.
640      Property property = 2;
641
642      // A snapshot of a FirebaseLink resource in change history.
643      FirebaseLink firebase_link = 6;
644
645      // A snapshot of a GoogleAdsLink resource in change history.
646      GoogleAdsLink google_ads_link = 7;
647
648      // A snapshot of a ConversionEvent resource in change history.
649      ConversionEvent conversion_event = 11;
650
651      // A snapshot of a MeasurementProtocolSecret resource in change history.
652      MeasurementProtocolSecret measurement_protocol_secret = 12;
653
654      // A snapshot of a data retention settings resource in change history.
655      DataRetentionSettings data_retention_settings = 15;
656
657      // A snapshot of a DataStream resource in change history.
658      DataStream data_stream = 18;
659    }
660  }
661
662  // Resource name of the resource whose changes are described by this entry.
663  string resource = 1;
664
665  // The type of action that changed this resource.
666  ActionType action = 2;
667
668  // Resource contents from before the change was made. If this resource was
669  // created in this change, this field will be missing.
670  ChangeHistoryResource resource_before_change = 3;
671
672  // Resource contents from after the change was made. If this resource was
673  // deleted in this change, this field will be missing.
674  ChangeHistoryResource resource_after_change = 4;
675}
676
677// A conversion event in a Google Analytics property.
678message ConversionEvent {
679  option (google.api.resource) = {
680    type: "analyticsadmin.googleapis.com/ConversionEvent"
681    pattern: "properties/{property}/conversionEvents/{conversion_event}"
682  };
683
684  // The method by which conversions will be counted across multiple events
685  // within a session.
686  enum ConversionCountingMethod {
687    // Counting method not specified.
688    CONVERSION_COUNTING_METHOD_UNSPECIFIED = 0;
689
690    // Each Event instance is considered a Conversion.
691    ONCE_PER_EVENT = 1;
692
693    // An Event instance is considered a Conversion at most once per session per
694    // user.
695    ONCE_PER_SESSION = 2;
696  }
697
698  // Output only. Resource name of this conversion event.
699  // Format: properties/{property}/conversionEvents/{conversion_event}
700  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
701
702  // Immutable. The event name for this conversion event.
703  // Examples: 'click', 'purchase'
704  string event_name = 2 [(google.api.field_behavior) = IMMUTABLE];
705
706  // Output only. Time when this conversion event was created in the property.
707  google.protobuf.Timestamp create_time = 3
708      [(google.api.field_behavior) = OUTPUT_ONLY];
709
710  // Output only. If set, this event can currently be deleted with
711  // DeleteConversionEvent.
712  bool deletable = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
713
714  // Output only. If set to true, this conversion event refers to a custom
715  // event.  If set to false, this conversion event refers to a default event in
716  // GA. Default events typically have special meaning in GA. Default events are
717  // usually created for you by the GA system, but in some cases can be created
718  // by property admins. Custom events count towards the maximum number of
719  // custom conversion events that may be created per property.
720  bool custom = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
721
722  // Optional. The method by which conversions will be counted across multiple
723  // events within a session. If this value is not provided, it will be set to
724  // `ONCE_PER_EVENT`.
725  ConversionCountingMethod counting_method = 6
726      [(google.api.field_behavior) = OPTIONAL];
727}
728
729// A definition for a CustomDimension.
730message CustomDimension {
731  option (google.api.resource) = {
732    type: "analyticsadmin.googleapis.com/CustomDimension"
733    pattern: "properties/{property}/customDimensions/{custom_dimension}"
734  };
735
736  // Valid values for the scope of this dimension.
737  enum DimensionScope {
738    // Scope unknown or not specified.
739    DIMENSION_SCOPE_UNSPECIFIED = 0;
740
741    // Dimension scoped to an event.
742    EVENT = 1;
743
744    // Dimension scoped to a user.
745    USER = 2;
746
747    // Dimension scoped to eCommerce items
748    ITEM = 3;
749  }
750
751  // Output only. Resource name for this CustomDimension resource.
752  // Format: properties/{property}/customDimensions/{customDimension}
753  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
754
755  // Required. Immutable. Tagging parameter name for this custom dimension.
756  //
757  // If this is a user-scoped dimension, then this is the user property name.
758  // If this is an event-scoped dimension, then this is the event parameter
759  // name.
760  //
761  // If this is an item-scoped dimension, then this is the parameter
762  // name found in the eCommerce items array.
763  //
764  // May only contain alphanumeric and underscore characters, starting with a
765  // letter. Max length of 24 characters for user-scoped dimensions, 40
766  // characters for event-scoped dimensions.
767  string parameter_name = 2 [
768    (google.api.field_behavior) = REQUIRED,
769    (google.api.field_behavior) = IMMUTABLE
770  ];
771
772  // Required. Display name for this custom dimension as shown in the Analytics
773  // UI. Max length of 82 characters, alphanumeric plus space and underscore
774  // starting with a letter. Legacy system-generated display names may contain
775  // square brackets, but updates to this field will never permit square
776  // brackets.
777  string display_name = 3 [(google.api.field_behavior) = REQUIRED];
778
779  // Optional. Description for this custom dimension. Max length of 150
780  // characters.
781  string description = 4 [(google.api.field_behavior) = OPTIONAL];
782
783  // Required. Immutable. The scope of this dimension.
784  DimensionScope scope = 5 [
785    (google.api.field_behavior) = REQUIRED,
786    (google.api.field_behavior) = IMMUTABLE
787  ];
788
789  // Optional. If set to true, sets this dimension as NPA and excludes it from
790  // ads personalization.
791  //
792  // This is currently only supported by user-scoped custom dimensions.
793  bool disallow_ads_personalization = 6
794      [(google.api.field_behavior) = OPTIONAL];
795}
796
797// A definition for a custom metric.
798message CustomMetric {
799  option (google.api.resource) = {
800    type: "analyticsadmin.googleapis.com/CustomMetric"
801    pattern: "properties/{property}/customMetrics/{custom_metric}"
802  };
803
804  // Possible types of representing the custom metric's value.
805  //
806  // Currency representation may change in the future, requiring a breaking API
807  // change.
808  enum MeasurementUnit {
809    // MeasurementUnit unspecified or missing.
810    MEASUREMENT_UNIT_UNSPECIFIED = 0;
811
812    // This metric uses default units.
813    STANDARD = 1;
814
815    // This metric measures a currency.
816    CURRENCY = 2;
817
818    // This metric measures feet.
819    FEET = 3;
820
821    // This metric measures meters.
822    METERS = 4;
823
824    // This metric measures kilometers.
825    KILOMETERS = 5;
826
827    // This metric measures miles.
828    MILES = 6;
829
830    // This metric measures milliseconds.
831    MILLISECONDS = 7;
832
833    // This metric measures seconds.
834    SECONDS = 8;
835
836    // This metric measures minutes.
837    MINUTES = 9;
838
839    // This metric measures hours.
840    HOURS = 10;
841  }
842
843  // The scope of this metric.
844  enum MetricScope {
845    // Scope unknown or not specified.
846    METRIC_SCOPE_UNSPECIFIED = 0;
847
848    // Metric scoped to an event.
849    EVENT = 1;
850  }
851
852  // Labels that mark the data in this custom metric as data that should be
853  // restricted to specific users.
854  enum RestrictedMetricType {
855    // Type unknown or unspecified.
856    RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0;
857
858    // Metric reports cost data.
859    COST_DATA = 1;
860
861    // Metric reports revenue data.
862    REVENUE_DATA = 2;
863  }
864
865  // Output only. Resource name for this CustomMetric resource.
866  // Format: properties/{property}/customMetrics/{customMetric}
867  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
868
869  // Required. Immutable. Tagging name for this custom metric.
870  //
871  // If this is an event-scoped metric, then this is the event parameter
872  // name.
873  //
874  // May only contain alphanumeric and underscore charactes, starting with a
875  // letter. Max length of 40 characters for event-scoped metrics.
876  string parameter_name = 2 [
877    (google.api.field_behavior) = REQUIRED,
878    (google.api.field_behavior) = IMMUTABLE
879  ];
880
881  // Required. Display name for this custom metric as shown in the Analytics UI.
882  // Max length of 82 characters, alphanumeric plus space and underscore
883  // starting with a letter. Legacy system-generated display names may contain
884  // square brackets, but updates to this field will never permit square
885  // brackets.
886  string display_name = 3 [(google.api.field_behavior) = REQUIRED];
887
888  // Optional. Description for this custom dimension.
889  // Max length of 150 characters.
890  string description = 4 [(google.api.field_behavior) = OPTIONAL];
891
892  // Required. The type for the custom metric's value.
893  MeasurementUnit measurement_unit = 5 [(google.api.field_behavior) = REQUIRED];
894
895  // Required. Immutable. The scope of this custom metric.
896  MetricScope scope = 6 [
897    (google.api.field_behavior) = REQUIRED,
898    (google.api.field_behavior) = IMMUTABLE
899  ];
900
901  // Optional. Types of restricted data that this metric may contain. Required
902  // for metrics with CURRENCY measurement unit. Must be empty for metrics with
903  // a non-CURRENCY measurement unit.
904  repeated RestrictedMetricType restricted_metric_type = 8
905      [(google.api.field_behavior) = OPTIONAL];
906}
907
908// Settings values for data retention. This is a singleton resource.
909message DataRetentionSettings {
910  option (google.api.resource) = {
911    type: "analyticsadmin.googleapis.com/DataRetentionSettings"
912    pattern: "properties/{property}/dataRetentionSettings"
913  };
914
915  // Valid values for the data retention duration.
916  enum RetentionDuration {
917    // Data retention time duration is not specified.
918    RETENTION_DURATION_UNSPECIFIED = 0;
919
920    // The data retention time duration is 2 months.
921    TWO_MONTHS = 1;
922
923    // The data retention time duration is 14 months.
924    FOURTEEN_MONTHS = 3;
925
926    // The data retention time duration is 26 months.
927    // Available to 360 properties only.
928    TWENTY_SIX_MONTHS = 4;
929
930    // The data retention time duration is 38 months.
931    // Available to 360 properties only.
932    THIRTY_EIGHT_MONTHS = 5;
933
934    // The data retention time duration is 50 months.
935    // Available to 360 properties only.
936    FIFTY_MONTHS = 6;
937  }
938
939  // Output only. Resource name for this DataRetentionSetting resource.
940  // Format: properties/{property}/dataRetentionSettings
941  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
942
943  // The length of time that event-level data is retained.
944  RetentionDuration event_data_retention = 2;
945
946  // If true, reset the retention period for the user identifier with every
947  // event from that user.
948  bool reset_user_data_on_new_activity = 3;
949}
950