Sitelet https://github.com/googleapis/googleapis/commit/751dfcf15903ebf451a8b808e0d213a73342a8f5
Skip to content

Commit 751dfcf

Browse files
Google APIscopybara-github
authored andcommitted
feat: add UpdateConversionEvent method to the Admin API v1 beta
feat: add the `counting_method` field to the `ConversionEvent` type feat: add the `ConversionCountingMethod` enum feat: add the `ITEM` option to the `DimensionScope` enum feat: make the field `default_uri` of `WebStreamData` mutable fix!: add the missing `REQUIRED` annotation to the `update_mask` field of `UpdateMeasurementProtocolSecretRequest` PiperOrigin-RevId: 559470845
1 parent 3028d5c commit 751dfcf

3 files changed

Lines changed: 69 additions & 9 deletions

File tree

‎google/analytics/admin/v1beta/analytics_admin.proto‎

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,16 @@ service AnalyticsAdminService {
315315
option (google.api.method_signature) = "parent,conversion_event";
316316
}
317317

318+
// Updates a conversion event with the specified attributes.
319+
rpc UpdateConversionEvent(UpdateConversionEventRequest)
320+
returns (ConversionEvent) {
321+
option (google.api.http) = {
322+
patch: "/v1beta/{conversion_event.name=properties/*/conversionEvents/*}"
323+
body: "conversion_event"
324+
};
325+
option (google.api.method_signature) = "conversion_event,update_mask";
326+
}
327+
318328
// Retrieve a single conversion event.
319329
rpc GetConversionEvent(GetConversionEventRequest) returns (ConversionEvent) {
320330
option (google.api.http) = {
@@ -1126,8 +1136,10 @@ message UpdateMeasurementProtocolSecretRequest {
11261136
MeasurementProtocolSecret measurement_protocol_secret = 1
11271137
[(google.api.field_behavior) = REQUIRED];
11281138

1129-
// The list of fields to be updated. Omitted fields will not be updated.
1130-
google.protobuf.FieldMask update_mask = 2;
1139+
// Required. The list of fields to be updated. Omitted fields will not be
1140+
// updated.
1141+
google.protobuf.FieldMask update_mask = 2
1142+
[(google.api.field_behavior) = REQUIRED];
11311143
}
11321144

11331145
// Request message for ListMeasurementProtocolSecret RPC
@@ -1179,6 +1191,20 @@ message CreateConversionEventRequest {
11791191
];
11801192
}
11811193

1194+
// Request message for UpdateConversionEvent RPC
1195+
message UpdateConversionEventRequest {
1196+
// Required. The conversion event to update.
1197+
// The `name` field is used to identify the settings to be updated.
1198+
ConversionEvent conversion_event = 1 [(google.api.field_behavior) = REQUIRED];
1199+
1200+
// Required. The list of fields to be updated. Field names must be in snake
1201+
// case (e.g., "field_to_update"). Omitted fields will not be updated. To
1202+
// replace the entire entity, use one path with the string "*" to match all
1203+
// fields.
1204+
google.protobuf.FieldMask update_mask = 2
1205+
[(google.api.field_behavior) = REQUIRED];
1206+
}
1207+
11821208
// Request message for GetConversionEvent RPC
11831209
message GetConversionEventRequest {
11841210
// Required. The resource name of the conversion event to retrieve.

‎google/analytics/admin/v1beta/analyticsadmin_v1beta.yaml‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ title: Google Analytics Admin API
66
apis:
77
- name: google.analytics.admin.v1beta.AnalyticsAdminService
88

9+
documentation:
10+
summary: |-
11+
Manage properties in Google Analytics. Warning: Creating multiple Customer
12+
Applications, Accounts, or Projects to simulate or act as a single
13+
Customer Application, Account, or Project (respectively) or to circumvent
14+
Service-specific usage limits or quotas is a direct violation of Google
15+
Cloud Platform Terms of Service as well as Google APIs Terms of Service.
16+
These actions can result in immediate termination of your GCP project(s)
17+
without any warning.
18+
919
authentication:
1020
rules:
1121
- selector: 'google.analytics.admin.v1beta.AnalyticsAdminService.*'
@@ -112,6 +122,3 @@ authentication:
112122
canonical_scopes: |-
113123
https://www.googleapis.com/auth/analytics.edit,
114124
https://www.googleapis.com/auth/analytics.readonly
115-
116-
publishing:
117-
{}

‎google/analytics/admin/v1beta/resources.proto‎

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,17 +336,18 @@ message DataStream {
336336

337337
// Data specific to web streams.
338338
message WebStreamData {
339-
// Output only. Analytics "Measurement ID", without the "G-" prefix.
340-
// Example: "G-1A2BCD345E" would just be "1A2BCD345E"
339+
// Output only. Analytics Measurement ID.
340+
//
341+
// Example: "G-1A2BCD345E"
341342
string measurement_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
342343

343344
// Output only. ID of the corresponding web app in Firebase, if any.
344345
// This ID can change if the web app is deleted and recreated.
345346
string firebase_app_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
346347

347-
// Immutable. Domain name of the web app being measured, or empty.
348+
// Domain name of the web app being measured, or empty.
348349
// Example: "http://www.google.com", "https://www.google.com"
349-
string default_uri = 3 [(google.api.field_behavior) = IMMUTABLE];
350+
string default_uri = 3;
350351
}
351352

352353
// Data specific to Android app streams.
@@ -680,6 +681,20 @@ message ConversionEvent {
680681
pattern: "properties/{property}/conversionEvents/{conversion_event}"
681682
};
682683

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+
683698
// Output only. Resource name of this conversion event.
684699
// Format: properties/{property}/conversionEvents/{conversion_event}
685700
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -703,6 +718,12 @@ message ConversionEvent {
703718
// by property admins. Custom events count towards the maximum number of
704719
// custom conversion events that may be created per property.
705720
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];
706727
}
707728

708729
// A definition for a CustomDimension.
@@ -722,6 +743,9 @@ message CustomDimension {
722743

723744
// Dimension scoped to a user.
724745
USER = 2;
746+
747+
// Dimension scoped to eCommerce items
748+
ITEM = 3;
725749
}
726750

727751
// Output only. Resource name for this CustomDimension resource.
@@ -734,6 +758,9 @@ message CustomDimension {
734758
// If this is an event-scoped dimension, then this is the event parameter
735759
// name.
736760
//
761+
// If this is an item-scoped dimension, then this is the parameter
762+
// name found in the eCommerce items array.
763+
//
737764
// May only contain alphanumeric and underscore characters, starting with a
738765
// letter. Max length of 24 characters for user-scoped dimensions, 40
739766
// characters for event-scoped dimensions.

0 commit comments

Comments
 (0)