resources.proto 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000
  1. // Copyright 2021 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.v1alpha;
  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/v1alpha;admin";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "ResourcesProto";
  23. option java_package = "com.google.analytics.admin.v1alpha";
  24. // Maximum access settings that Firebase user receive on the linked Analytics
  25. // property.
  26. enum MaximumUserAccess {
  27. // Unspecified maximum user access.
  28. MAXIMUM_USER_ACCESS_UNSPECIFIED = 0;
  29. // Firebase users have no access to the Analytics property.
  30. NO_ACCESS = 1;
  31. // Firebase users have Read & Analyze access to the Analytics property.
  32. READ_AND_ANALYZE = 2;
  33. // Firebase users have edit access to the Analytics property, but may not
  34. // manage the Firebase link.
  35. EDITOR_WITHOUT_LINK_MANAGEMENT = 3;
  36. // Firebase users have edit access to the Analytics property and may manage
  37. // the Firebase link.
  38. EDITOR_INCLUDING_LINK_MANAGEMENT = 4;
  39. }
  40. // The category selected for this property, used for industry benchmarking.
  41. enum IndustryCategory {
  42. // Industry category unspecified
  43. INDUSTRY_CATEGORY_UNSPECIFIED = 0;
  44. // Automotive
  45. AUTOMOTIVE = 1;
  46. // Business and industrial markets
  47. BUSINESS_AND_INDUSTRIAL_MARKETS = 2;
  48. // Finance
  49. FINANCE = 3;
  50. // Healthcare
  51. HEALTHCARE = 4;
  52. // Technology
  53. TECHNOLOGY = 5;
  54. // Travel
  55. TRAVEL = 6;
  56. // Other
  57. OTHER = 7;
  58. // Arts and entertainment
  59. ARTS_AND_ENTERTAINMENT = 8;
  60. // Beauty and fitness
  61. BEAUTY_AND_FITNESS = 9;
  62. // Books and literature
  63. BOOKS_AND_LITERATURE = 10;
  64. // Food and drink
  65. FOOD_AND_DRINK = 11;
  66. // Games
  67. GAMES = 12;
  68. // Hobbies and leisure
  69. HOBBIES_AND_LEISURE = 13;
  70. // Home and garden
  71. HOME_AND_GARDEN = 14;
  72. // Internet and telecom
  73. INTERNET_AND_TELECOM = 15;
  74. // Law and government
  75. LAW_AND_GOVERNMENT = 16;
  76. // News
  77. NEWS = 17;
  78. // Online communities
  79. ONLINE_COMMUNITIES = 18;
  80. // People and society
  81. PEOPLE_AND_SOCIETY = 19;
  82. // Pets and animals
  83. PETS_AND_ANIMALS = 20;
  84. // Real estate
  85. REAL_ESTATE = 21;
  86. // Reference
  87. REFERENCE = 22;
  88. // Science
  89. SCIENCE = 23;
  90. // Sports
  91. SPORTS = 24;
  92. // Jobs and education
  93. JOBS_AND_EDUCATION = 25;
  94. // Shopping
  95. SHOPPING = 26;
  96. }
  97. // Different kinds of actors that can make changes to Google Analytics
  98. // resources.
  99. enum ActorType {
  100. // Unknown or unspecified actor type.
  101. ACTOR_TYPE_UNSPECIFIED = 0;
  102. // Changes made by the user specified in actor_email.
  103. USER = 1;
  104. // Changes made by the Google Analytics system.
  105. SYSTEM = 2;
  106. // Changes made by Google Analytics support team staff.
  107. SUPPORT = 3;
  108. }
  109. // Types of actions that may change a resource.
  110. enum ActionType {
  111. // Action type unknown or not specified.
  112. ACTION_TYPE_UNSPECIFIED = 0;
  113. // Resource was created in this change.
  114. CREATED = 1;
  115. // Resource was updated in this change.
  116. UPDATED = 2;
  117. // Resource was deleted in this change.
  118. DELETED = 3;
  119. }
  120. // Types of resources whose changes may be returned from change history.
  121. enum ChangeHistoryResourceType {
  122. // Resource type unknown or not specified.
  123. CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0;
  124. // Account resource
  125. ACCOUNT = 1;
  126. // Property resource
  127. PROPERTY = 2;
  128. // WebDataStream resource
  129. WEB_DATA_STREAM = 3;
  130. // AndroidAppDataStream resource
  131. ANDROID_APP_DATA_STREAM = 4;
  132. // IosAppDataStream resource
  133. IOS_APP_DATA_STREAM = 5;
  134. // FirebaseLink resource
  135. FIREBASE_LINK = 6;
  136. // GoogleAdsLink resource
  137. GOOGLE_ADS_LINK = 7;
  138. // GoogleSignalsSettings resource
  139. GOOGLE_SIGNALS_SETTINGS = 8;
  140. // ConversionEvent resource
  141. CONVERSION_EVENT = 9;
  142. // MeasurementProtocolSecret resource
  143. MEASUREMENT_PROTOCOL_SECRET = 10;
  144. // CustomDimension resource
  145. CUSTOM_DIMENSION = 11;
  146. // CustomMetric resource
  147. CUSTOM_METRIC = 12;
  148. }
  149. // Status of the Google Signals settings (i.e., whether this feature has been
  150. // enabled for the property).
  151. enum GoogleSignalsState {
  152. // Google Signals status defaults to GOOGLE_SIGNALS_STATE_UNSPECIFIED to
  153. // represent that the user has not made an explicit choice.
  154. GOOGLE_SIGNALS_STATE_UNSPECIFIED = 0;
  155. // Google Signals is enabled.
  156. GOOGLE_SIGNALS_ENABLED = 1;
  157. // Google Signals is disabled.
  158. GOOGLE_SIGNALS_DISABLED = 2;
  159. }
  160. // Consent field of the Google Signals settings (i.e., whether the user has
  161. // consented to the Google Signals terms of service.)
  162. enum GoogleSignalsConsent {
  163. // Google Signals consent value defaults to
  164. // GOOGLE_SIGNALS_CONSENT_UNSPECIFIED. This will be treated as
  165. // GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED.
  166. GOOGLE_SIGNALS_CONSENT_UNSPECIFIED = 0;
  167. // Terms of service have been accepted
  168. GOOGLE_SIGNALS_CONSENT_CONSENTED = 2;
  169. // Terms of service have not been accepted
  170. GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED = 1;
  171. }
  172. // A resource message representing a Google Analytics account.
  173. message Account {
  174. option (google.api.resource) = {
  175. type: "analyticsadmin.googleapis.com/Account"
  176. pattern: "accounts/{account}"
  177. };
  178. // Output only. Resource name of this account.
  179. // Format: accounts/{account}
  180. // Example: "accounts/100"
  181. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  182. // Output only. Time when this account was originally created.
  183. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  184. // Output only. Time when account payload fields were last updated.
  185. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  186. // Required. Human-readable display name for this account.
  187. string display_name = 4 [(google.api.field_behavior) = REQUIRED];
  188. // Country of business. Must be a Unicode CLDR region code.
  189. string region_code = 5;
  190. // Output only. Indicates whether this Account is soft-deleted or not. Deleted
  191. // accounts are excluded from List results unless specifically requested.
  192. bool deleted = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  193. }
  194. // A resource message representing a Google Analytics GA4 property.
  195. message Property {
  196. option (google.api.resource) = {
  197. type: "analyticsadmin.googleapis.com/Property"
  198. pattern: "properties/{property}"
  199. };
  200. // Output only. Resource name of this property.
  201. // Format: properties/{property_id}
  202. // Example: "properties/1000"
  203. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  204. // Output only. Time when the entity was originally created.
  205. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  206. // Output only. Time when entity payload fields were last updated.
  207. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  208. // Immutable. Resource name of this property's logical parent.
  209. //
  210. // Note: The Property-Moving UI can be used to change the parent.
  211. // Format: accounts/{account}
  212. // Example: "accounts/100"
  213. string parent = 2 [(google.api.field_behavior) = IMMUTABLE];
  214. // Required. Human-readable display name for this property.
  215. //
  216. // The max allowed display name length is 100 UTF-16 code units.
  217. string display_name = 5 [(google.api.field_behavior) = REQUIRED];
  218. // Industry associated with this property
  219. // Example: AUTOMOTIVE, FOOD_AND_DRINK
  220. IndustryCategory industry_category = 6;
  221. // Required. Reporting Time Zone, used as the day boundary for reports, regardless of
  222. // where the data originates. If the time zone honors DST, Analytics will
  223. // automatically adjust for the changes.
  224. //
  225. // NOTE: Changing the time zone only affects data going forward, and is not
  226. // applied retroactively.
  227. //
  228. // Format: https://www.iana.org/time-zones
  229. // Example: "America/Los_Angeles"
  230. string time_zone = 7 [(google.api.field_behavior) = REQUIRED];
  231. // The currency type used in reports involving monetary values.
  232. //
  233. //
  234. // Format: https://en.wikipedia.org/wiki/ISO_4217
  235. // Examples: "USD", "EUR", "JPY"
  236. string currency_code = 8;
  237. // Output only. If set, the time at which this property was trashed. If not set, then this
  238. // property is not currently in the trash can.
  239. google.protobuf.Timestamp delete_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  240. // Output only. If set, the time at which this trashed property will be permanently
  241. // deleted. If not set, then this property is not currently in the trash can
  242. // and is not slated to be deleted.
  243. google.protobuf.Timestamp expire_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  244. }
  245. // A resource message representing a Google Analytics Android app stream.
  246. message AndroidAppDataStream {
  247. option (google.api.resource) = {
  248. type: "analyticsadmin.googleapis.com/AndroidAppDataStream"
  249. pattern: "properties/{property}/androidAppDataStreams/{android_app_data_stream}"
  250. };
  251. // Output only. Resource name of this Data Stream.
  252. // Format: properties/{property_id}/androidAppDataStreams/{stream_id}
  253. // Example: "properties/1000/androidAppDataStreams/2000"
  254. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  255. // Output only. ID of the corresponding Android app in Firebase, if any.
  256. // This ID can change if the Android app is deleted and recreated.
  257. string firebase_app_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  258. // Output only. Time when this stream was originally created.
  259. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  260. // Output only. Time when stream payload fields were last updated.
  261. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  262. // Immutable. The package name for the app being measured.
  263. // Example: "com.example.myandroidapp"
  264. string package_name = 5 [(google.api.field_behavior) = IMMUTABLE];
  265. // Human-readable display name for the Data Stream.
  266. //
  267. // The max allowed display name length is 255 UTF-16 code units.
  268. string display_name = 6;
  269. }
  270. // A resource message representing a Google Analytics IOS app stream.
  271. message IosAppDataStream {
  272. option (google.api.resource) = {
  273. type: "analyticsadmin.googleapis.com/IosAppDataStream"
  274. pattern: "properties/{property}/iosAppDataStreams/{ios_app_data_stream}"
  275. };
  276. // Output only. Resource name of this Data Stream.
  277. // Format: properties/{property_id}/iosAppDataStreams/{stream_id}
  278. // Example: "properties/1000/iosAppDataStreams/2000"
  279. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  280. // Output only. ID of the corresponding iOS app in Firebase, if any.
  281. // This ID can change if the iOS app is deleted and recreated.
  282. string firebase_app_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  283. // Output only. Time when this stream was originally created.
  284. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  285. // Output only. Time when stream payload fields were last updated.
  286. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  287. // Required. Immutable. The Apple App Store Bundle ID for the app
  288. // Example: "com.example.myiosapp"
  289. string bundle_id = 5 [
  290. (google.api.field_behavior) = IMMUTABLE,
  291. (google.api.field_behavior) = REQUIRED
  292. ];
  293. // Human-readable display name for the Data Stream.
  294. //
  295. // The max allowed display name length is 255 UTF-16 code units.
  296. string display_name = 6;
  297. }
  298. // A resource message representing a Google Analytics web stream.
  299. message WebDataStream {
  300. option (google.api.resource) = {
  301. type: "analyticsadmin.googleapis.com/WebDataStream"
  302. pattern: "properties/{property}/webDataStreams/{web_data_stream}"
  303. };
  304. // Output only. Resource name of this Data Stream.
  305. // Format: properties/{property_id}/webDataStreams/{stream_id}
  306. // Example: "properties/1000/webDataStreams/2000"
  307. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  308. // Output only. Analytics "Measurement ID", without the "G-" prefix.
  309. // Example: "G-1A2BCD345E" would just be "1A2BCD345E"
  310. string measurement_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  311. // Output only. ID of the corresponding web app in Firebase, if any.
  312. // This ID can change if the web app is deleted and recreated.
  313. string firebase_app_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  314. // Output only. Time when this stream was originally created.
  315. google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  316. // Output only. Time when stream payload fields were last updated.
  317. google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  318. // Immutable. Domain name of the web app being measured, or empty.
  319. // Example: "http://www.google.com", "https://www.google.com"
  320. string default_uri = 6 [(google.api.field_behavior) = IMMUTABLE];
  321. // Required. Human-readable display name for the Data Stream.
  322. //
  323. // The max allowed display name length is 100 UTF-16 code units.
  324. string display_name = 7 [(google.api.field_behavior) = REQUIRED];
  325. }
  326. // A resource message representing a user's permissions on an Account or
  327. // Property resource.
  328. message UserLink {
  329. option (google.api.resource) = {
  330. type: "analyticsadmin.googleapis.com/UserLink"
  331. pattern: "accounts/{account}/userLinks/{user_link}"
  332. pattern: "properties/{property}/userLinks/{user_link}"
  333. };
  334. // Output only. Example format: properties/1234/userLinks/5678
  335. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  336. // Immutable. Email address of the user to link
  337. string email_address = 2 [(google.api.field_behavior) = IMMUTABLE];
  338. // Roles directly assigned to this user for this account or property.
  339. //
  340. // Valid values:
  341. // predefinedRoles/read
  342. // predefinedRoles/collaborate
  343. // predefinedRoles/edit
  344. // predefinedRoles/manage-users
  345. //
  346. // Excludes roles that are inherited from a higher-level entity, group,
  347. // or organization admin role.
  348. //
  349. // A UserLink that is updated to have an empty list of direct_roles will be
  350. // deleted.
  351. repeated string direct_roles = 3;
  352. }
  353. // Read-only resource used to summarize a principal's effective roles.
  354. message AuditUserLink {
  355. // Example format: properties/1234/userLinks/5678
  356. string name = 1;
  357. // Email address of the linked user
  358. string email_address = 2;
  359. // Roles directly assigned to this user for this entity.
  360. //
  361. // Format: predefinedRoles/read
  362. //
  363. // Excludes roles that are inherited from an account (if this is for a
  364. // property), group, or organization admin role.
  365. repeated string direct_roles = 3;
  366. // Union of all permissions a user has at this account or property (includes
  367. // direct permissions, group-inherited permissions, etc.).
  368. //
  369. // Format: predefinedRoles/read
  370. repeated string effective_roles = 4;
  371. }
  372. // Singleton resource under a WebDataStream, configuring measurement of
  373. // additional site interactions and content.
  374. message EnhancedMeasurementSettings {
  375. option (google.api.resource) = {
  376. type: "analyticsadmin.googleapis.com/EnhancedMeasurementSettings"
  377. pattern: "properties/{property}/webDataStreams/{web_data_stream}/enhancedMeasurementSettings"
  378. };
  379. // Output only. Resource name of this Data Stream.
  380. // Format:
  381. // properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings
  382. // Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings"
  383. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  384. // Indicates whether Enhanced Measurement Settings will be used to
  385. // automatically measure interactions and content on this web stream.
  386. //
  387. // Changing this value does not affect the settings themselves, but determines
  388. // whether they are respected.
  389. bool stream_enabled = 2;
  390. // Output only. If enabled, capture a page view event each time a page loads or the
  391. // website changes the browser history state.
  392. bool page_views_enabled = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  393. // If enabled, capture scroll events each time a visitor gets to the bottom of
  394. // a page.
  395. bool scrolls_enabled = 4;
  396. // If enabled, capture an outbound click event each time a visitor clicks a
  397. // link that leads them away from your domain.
  398. bool outbound_clicks_enabled = 5;
  399. // If enabled, capture a view search results event each time a visitor
  400. // performs a search on your site (based on a query parameter).
  401. bool site_search_enabled = 7;
  402. // If enabled, capture video play, progress, and complete events as visitors
  403. // view embedded videos on your site.
  404. bool video_engagement_enabled = 9;
  405. // If enabled, capture a file download event each time a link is clicked with
  406. // a common document, compressed file, application, video, or audio extension.
  407. bool file_downloads_enabled = 10;
  408. // Output only. If enabled, capture a page view event each time a page loads.
  409. bool page_loads_enabled = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  410. // If enabled, capture a page view event each time the website changes the
  411. // browser history state.
  412. bool page_changes_enabled = 13;
  413. // Required. URL query parameters to interpret as site search parameters.
  414. // Max length is 1024 characters. Must not be empty.
  415. string search_query_parameter = 16 [(google.api.field_behavior) = REQUIRED];
  416. // Additional URL query parameters.
  417. // Max length is 1024 characters.
  418. string uri_query_parameter = 17;
  419. }
  420. // A link between an GA4 property and a Firebase project.
  421. message FirebaseLink {
  422. option (google.api.resource) = {
  423. type: "analyticsadmin.googleapis.com/FirebaseLink"
  424. pattern: "properties/{property}/firebaseLinks/{firebase_link}"
  425. };
  426. // Output only. Example format: properties/1234/firebaseLinks/5678
  427. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  428. // Immutable. Firebase project resource name. When creating a FirebaseLink, you may
  429. // provide this resource name using either a project number or project ID.
  430. // Once this resource has been created, returned FirebaseLinks will always
  431. // have a project_name that contains a project number.
  432. //
  433. // Format: 'projects/{project number}'
  434. // Example: 'projects/1234'
  435. string project = 2 [(google.api.field_behavior) = IMMUTABLE];
  436. // Output only. Time when this FirebaseLink was originally created.
  437. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  438. // Maximum user access to the GA4 property allowed to admins of
  439. // the linked Firebase project.
  440. MaximumUserAccess maximum_user_access = 4;
  441. }
  442. // Read-only resource with the tag for sending data from a website to a
  443. // WebDataStream.
  444. message GlobalSiteTag {
  445. option (google.api.resource) = {
  446. type: "analyticsadmin.googleapis.com/GlobalSiteTag"
  447. pattern: "properties/{property}/globalSiteTag"
  448. };
  449. // Output only. Resource name for this GlobalSiteTag resource.
  450. // Format: properties/{propertyId}/globalSiteTag
  451. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  452. // Immutable. JavaScript code snippet to be pasted as the first item into the head tag of
  453. // every webpage to measure.
  454. string snippet = 2 [(google.api.field_behavior) = IMMUTABLE];
  455. }
  456. // A link between an GA4 property and a Google Ads account.
  457. message GoogleAdsLink {
  458. option (google.api.resource) = {
  459. type: "analyticsadmin.googleapis.com/GoogleAdsLink"
  460. pattern: "properties/{property}/googleAdsLinks/{google_ads_link}"
  461. };
  462. // Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
  463. //
  464. // Note: googleAdsLinkId is not the Google Ads customer ID.
  465. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  466. // Immutable. Google Ads customer ID.
  467. string customer_id = 3 [(google.api.field_behavior) = IMMUTABLE];
  468. // Output only. If true, this link is for a Google Ads manager account.
  469. bool can_manage_clients = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  470. // Enable personalized advertising features with this integration.
  471. // Automatically publish my Google Analytics audience lists and Google
  472. // Analytics remarketing events/parameters to the linked Google Ads account.
  473. // If this field is not set on create/update, it will be defaulted to true.
  474. google.protobuf.BoolValue ads_personalization_enabled = 5;
  475. // Output only. Email address of the user that created the link.
  476. // An empty string will be returned if the email address can't be retrieved.
  477. string email_address = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  478. // Output only. Time when this link was originally created.
  479. google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  480. // Output only. Time when this link was last updated.
  481. google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  482. }
  483. // A resource message representing data sharing settings of a Google Analytics
  484. // account.
  485. message DataSharingSettings {
  486. option (google.api.resource) = {
  487. type: "analyticsadmin.googleapis.com/DataSharingSettings"
  488. pattern: "accounts/{account}/dataSharingSettings"
  489. };
  490. // Output only. Resource name.
  491. // Format: accounts/{account}/dataSharingSettings
  492. // Example: "accounts/1000/dataSharingSettings"
  493. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  494. // Allows Google support to access the data in order to help troubleshoot
  495. // issues.
  496. bool sharing_with_google_support_enabled = 2;
  497. // Allows Google sales teams that are assigned to the customer to access the
  498. // data in order to suggest configuration changes to improve results.
  499. // Sales team restrictions still apply when enabled.
  500. bool sharing_with_google_assigned_sales_enabled = 3;
  501. // Allows any of Google sales to access the data in order to suggest
  502. // configuration changes to improve results.
  503. bool sharing_with_google_any_sales_enabled = 4;
  504. // Allows Google to use the data to improve other Google products or services.
  505. bool sharing_with_google_products_enabled = 5;
  506. // Allows Google to share the data anonymously in aggregate form with others.
  507. bool sharing_with_others_enabled = 6;
  508. }
  509. // A virtual resource representing an overview of an account and
  510. // all its child GA4 properties.
  511. message AccountSummary {
  512. option (google.api.resource) = {
  513. type: "analyticsadmin.googleapis.com/AccountSummary"
  514. pattern: "accountSummaries/{account_summary}"
  515. };
  516. // Resource name for this account summary.
  517. // Format: accountSummaries/{account_id}
  518. // Example: "accountSummaries/1000"
  519. string name = 1;
  520. // Resource name of account referred to by this account summary
  521. // Format: accounts/{account_id}
  522. // Example: "accounts/1000"
  523. string account = 2 [(google.api.resource_reference) = {
  524. type: "analyticsadmin.googleapis.com/Account"
  525. }];
  526. // Display name for the account referred to in this account summary.
  527. string display_name = 3;
  528. // List of summaries for child accounts of this account.
  529. repeated PropertySummary property_summaries = 4;
  530. }
  531. // A virtual resource representing metadata for an GA4 property.
  532. message PropertySummary {
  533. // Resource name of property referred to by this property summary
  534. // Format: properties/{property_id}
  535. // Example: "properties/1000"
  536. string property = 1 [(google.api.resource_reference) = {
  537. type: "analyticsadmin.googleapis.com/Property"
  538. }];
  539. // Display name for the property referred to in this account summary.
  540. string display_name = 2;
  541. }
  542. // A secret value used for sending hits to Measurement Protocol.
  543. message MeasurementProtocolSecret {
  544. option (google.api.resource) = {
  545. type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret"
  546. pattern: "properties/{property}/webDataStreams/{web_data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}"
  547. };
  548. // Output only. Resource name of this secret. This secret may be a child of any type of
  549. // stream.
  550. // Format:
  551. // properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
  552. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  553. // Required. Human-readable display name for this secret.
  554. string display_name = 2 [(google.api.field_behavior) = REQUIRED];
  555. // Output only. The measurement protocol secret value. Pass this value to the api_secret
  556. // field of the Measurement Protocol API when sending hits to this
  557. // secret's parent property.
  558. string secret_value = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  559. }
  560. // A set of changes within a Google Analytics account or its child properties
  561. // that resulted from the same cause. Common causes would be updates made in the
  562. // Google Analytics UI, changes from customer support, or automatic Google
  563. // Analytics system changes.
  564. message ChangeHistoryEvent {
  565. // ID of this change history event. This ID is unique across Google Analytics.
  566. string id = 1;
  567. // Time when change was made.
  568. google.protobuf.Timestamp change_time = 2;
  569. // The type of actor that made this change.
  570. ActorType actor_type = 3;
  571. // Email address of the Google account that made the change. This will be a
  572. // valid email address if the actor field is set to USER, and empty otherwise.
  573. // Google accounts that have been deleted will cause an error.
  574. string user_actor_email = 4;
  575. // If true, then the list of changes returned was filtered, and does not
  576. // represent all changes that occurred in this event.
  577. bool changes_filtered = 5;
  578. // A list of changes made in this change history event that fit the filters
  579. // specified in SearchChangeHistoryEventsRequest.
  580. repeated ChangeHistoryChange changes = 6;
  581. }
  582. // A description of a change to a single Google Analytics resource.
  583. message ChangeHistoryChange {
  584. // A snapshot of a resource as before or after the result of a change in
  585. // change history.
  586. message ChangeHistoryResource {
  587. oneof resource {
  588. // A snapshot of an Account resource in change history.
  589. Account account = 1;
  590. // A snapshot of a Property resource in change history.
  591. Property property = 2;
  592. // A snapshot of a WebDataStream resource in change history.
  593. WebDataStream web_data_stream = 3;
  594. // A snapshot of an AndroidAppDataStream resource in change history.
  595. AndroidAppDataStream android_app_data_stream = 4;
  596. // A snapshot of an IosAppDataStream resource in change history.
  597. IosAppDataStream ios_app_data_stream = 5;
  598. // A snapshot of a FirebaseLink resource in change history.
  599. FirebaseLink firebase_link = 6;
  600. // A snapshot of a GoogleAdsLink resource in change history.
  601. GoogleAdsLink google_ads_link = 7;
  602. // A snapshot of a GoogleSignalsSettings resource in change history.
  603. GoogleSignalsSettings google_signals_settings = 8;
  604. // A snapshot of a ConversionEvent resource in change history.
  605. ConversionEvent conversion_event = 11;
  606. // A snapshot of a MeasurementProtocolSecret resource in change history.
  607. MeasurementProtocolSecret measurement_protocol_secret = 12;
  608. // A snapshot of a CustomDimension resource in change history.
  609. CustomDimension custom_dimension = 13;
  610. // A snapshot of a CustomMetric resource in change history.
  611. CustomMetric custom_metric = 14;
  612. }
  613. }
  614. // Resource name of the resource whose changes are described by this entry.
  615. string resource = 1;
  616. // The type of action that changed this resource.
  617. ActionType action = 2;
  618. // Resource contents from before the change was made. If this resource was
  619. // created in this change, this field will be missing.
  620. ChangeHistoryResource resource_before_change = 3;
  621. // Resource contents from after the change was made. If this resource was
  622. // deleted in this change, this field will be missing.
  623. ChangeHistoryResource resource_after_change = 4;
  624. }
  625. // A conversion event in a Google Analytics property.
  626. message ConversionEvent {
  627. option (google.api.resource) = {
  628. type: "analyticsadmin.googleapis.com/ConversionEvent"
  629. pattern: "properties/{property}/conversionEvents/{conversion_event}"
  630. };
  631. // Output only. Resource name of this conversion event.
  632. // Format: properties/{property}/conversionEvents/{conversion_event}
  633. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  634. // Immutable. The event name for this conversion event.
  635. // Examples: 'click', 'purchase'
  636. string event_name = 2 [(google.api.field_behavior) = IMMUTABLE];
  637. // Output only. Time when this conversion event was created in the property.
  638. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  639. // Output only. If set, this event can currently be deleted via DeleteConversionEvent.
  640. bool is_deletable = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  641. }
  642. // Settings values for Google Signals. This is a singleton resource.
  643. message GoogleSignalsSettings {
  644. option (google.api.resource) = {
  645. type: "analyticsadmin.googleapis.com/GoogleSignalsSettings"
  646. pattern: "properties/{property}/googleSignalsSettings"
  647. };
  648. // Output only. Resource name of this setting.
  649. // Format: properties/{property_id}/googleSignalsSettings
  650. // Example: "properties/1000/googleSignalsSettings"
  651. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  652. // Status of this setting.
  653. GoogleSignalsState state = 3;
  654. // Output only. Terms of Service acceptance.
  655. GoogleSignalsConsent consent = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  656. }
  657. // A definition for a CustomDimension.
  658. message CustomDimension {
  659. option (google.api.resource) = {
  660. type: "analyticsadmin.googleapis.com/CustomDimension"
  661. pattern: "properties/{property}/customDimensions"
  662. };
  663. // Valid values for the scope of this dimension.
  664. enum DimensionScope {
  665. // Scope unknown or not specified.
  666. DIMENSION_SCOPE_UNSPECIFIED = 0;
  667. // Dimension scoped to an event.
  668. EVENT = 1;
  669. // Dimension scoped to a user.
  670. USER = 2;
  671. }
  672. // Output only. Resource name for this CustomDimension resource.
  673. // Format: properties/{property}/customDimensions/{customDimension}
  674. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  675. // Required. Immutable. Tagging parameter name for this custom dimension.
  676. //
  677. // If this is a user-scoped dimension, then this is the user property name.
  678. // If this is an event-scoped dimension, then this is the event parameter
  679. // name.
  680. //
  681. // May only contain alphanumeric and underscore characters, starting with a
  682. // letter. Max length of 24 characters for user-scoped dimensions, 40
  683. // characters for event-scoped dimensions.
  684. string parameter_name = 2 [
  685. (google.api.field_behavior) = REQUIRED,
  686. (google.api.field_behavior) = IMMUTABLE
  687. ];
  688. // Required. Display name for this custom dimension as shown in the Analytics UI.
  689. // Max length of 82 characters, alphanumeric plus space and underscore
  690. // starting with a letter. Legacy system-generated display names may contain
  691. // square brackets, but updates to this field will never permit square
  692. // brackets.
  693. string display_name = 3 [(google.api.field_behavior) = REQUIRED];
  694. // Optional. Description for this custom dimension. Max length of 150 characters.
  695. string description = 4 [(google.api.field_behavior) = OPTIONAL];
  696. // Required. Immutable. The scope of this dimension.
  697. DimensionScope scope = 5 [
  698. (google.api.field_behavior) = REQUIRED,
  699. (google.api.field_behavior) = IMMUTABLE
  700. ];
  701. // Optional. If set to true, sets this dimension as NPA and excludes it from ads
  702. // personalization.
  703. //
  704. // This is currently only supported by user-scoped custom dimensions.
  705. bool disallow_ads_personalization = 6 [(google.api.field_behavior) = OPTIONAL];
  706. }
  707. // A definition for a custom metric.
  708. message CustomMetric {
  709. option (google.api.resource) = {
  710. type: "analyticsadmin.googleapis.com/CustomMetric"
  711. pattern: "properties/{property}/customMetrics"
  712. };
  713. // Possible types of representing the custom metric's value.
  714. //
  715. // Currency representation may change in the future, requiring a breaking API
  716. // change.
  717. enum MeasurementUnit {
  718. // MeasurementUnit unspecified or missing.
  719. MEASUREMENT_UNIT_UNSPECIFIED = 0;
  720. // This metric uses default units.
  721. STANDARD = 1;
  722. // This metric measures a currency.
  723. CURRENCY = 2;
  724. // This metric measures feet.
  725. FEET = 3;
  726. // This metric measures meters.
  727. METERS = 4;
  728. // This metric measures kilometers.
  729. KILOMETERS = 5;
  730. // This metric measures miles.
  731. MILES = 6;
  732. // This metric measures milliseconds.
  733. MILLISECONDS = 7;
  734. // This metric measures seconds.
  735. SECONDS = 8;
  736. // This metric measures minutes.
  737. MINUTES = 9;
  738. // This metric measures hours.
  739. HOURS = 10;
  740. }
  741. // The scope of this metric.
  742. enum MetricScope {
  743. // Scope unknown or not specified.
  744. METRIC_SCOPE_UNSPECIFIED = 0;
  745. // Metric scoped to an event.
  746. EVENT = 1;
  747. }
  748. // Output only. Resource name for this CustomMetric resource.
  749. // Format: properties/{property}/customMetrics/{customMetric}
  750. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  751. // Required. Immutable. Tagging name for this custom metric.
  752. //
  753. // If this is an event-scoped metric, then this is the event parameter
  754. // name.
  755. //
  756. // May only contain alphanumeric and underscore charactes, starting with a
  757. // letter. Max length of 40 characters for event-scoped metrics.
  758. string parameter_name = 2 [
  759. (google.api.field_behavior) = REQUIRED,
  760. (google.api.field_behavior) = IMMUTABLE
  761. ];
  762. // Required. Display name for this custom metric as shown in the Analytics UI.
  763. // Max length of 82 characters, alphanumeric plus space and underscore
  764. // starting with a letter. Legacy system-generated display names may contain
  765. // square brackets, but updates to this field will never permit square
  766. // brackets.
  767. string display_name = 3 [(google.api.field_behavior) = REQUIRED];
  768. // Optional. Description for this custom dimension.
  769. // Max length of 150 characters.
  770. string description = 4 [(google.api.field_behavior) = OPTIONAL];
  771. // Required. Immutable. The type for the custom metric's value.
  772. MeasurementUnit measurement_unit = 5 [
  773. (google.api.field_behavior) = REQUIRED,
  774. (google.api.field_behavior) = IMMUTABLE
  775. ];
  776. // Required. Immutable. The scope of this custom metric.
  777. MetricScope scope = 6 [
  778. (google.api.field_behavior) = REQUIRED,
  779. (google.api.field_behavior) = IMMUTABLE
  780. ];
  781. }