resources.proto 30 KB

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