Skip to content

Commit 893a25b

Browse files
Google APIscopybara-github
authored andcommitted
feat: add FetchConnectedGa4Property method to the Admin API v1alpha
feat: add `GetChannelGroup`, `ListChannelGroups`, `CreateChannelGroup`, `UpdateChannelGroup` methods to the Admin API v1alpha feat: add `ChannelGroupFilter`, `ChannelGroupFilterExpression`, `ChannelGroupFilterExpressionList`, `GroupingRule`, `ChannelGroup` types to the Admin API v1alpha PiperOrigin-RevId: 526740438
1 parent 24f5ec0 commit 893a25b

6 files changed

Lines changed: 351 additions & 14 deletions

File tree

google/analytics/admin/v1alpha/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ proto_library(
2424
"access_report.proto",
2525
"analytics_admin.proto",
2626
"audience.proto",
27+
"channel_group.proto",
2728
"expanded_data_set.proto",
2829
"resources.proto",
2930
],
@@ -135,7 +136,7 @@ go_gapic_library(
135136
name = "admin_go_gapic",
136137
srcs = [":admin_proto_with_info"],
137138
grpc_service_config = "admin_grpc_service_config.json",
138-
importpath = "cloud.google.com/go/analytics/admin/apiv1alpha;admin",
139+
importpath = "google.golang.org/google/analytics/admin/v1alpha;adminpb",
139140
metadata = True,
140141
release_level = "alpha",
141142
rest_numeric_enums = True,

google/analytics/admin/v1alpha/analytics_admin.proto

Lines changed: 170 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package google.analytics.admin.v1alpha;
1818

1919
import "google/analytics/admin/v1alpha/access_report.proto";
2020
import "google/analytics/admin/v1alpha/audience.proto";
21+
import "google/analytics/admin/v1alpha/channel_group.proto";
2122
import "google/analytics/admin/v1alpha/expanded_data_set.proto";
2223
import "google/analytics/admin/v1alpha/resources.proto";
2324
import "google/api/annotations.proto";
@@ -1087,6 +1088,50 @@ service AnalyticsAdminService {
10871088
option (google.api.method_signature) = "name";
10881089
}
10891090

1091+
// Lookup for a single ChannelGroup.
1092+
rpc GetChannelGroup(GetChannelGroupRequest) returns (ChannelGroup) {
1093+
option (google.api.http) = {
1094+
get: "/v1alpha/{name=properties/*/channelGroups/*}"
1095+
};
1096+
option (google.api.method_signature) = "name";
1097+
}
1098+
1099+
// Lists ChannelGroups on a property.
1100+
rpc ListChannelGroups(ListChannelGroupsRequest)
1101+
returns (ListChannelGroupsResponse) {
1102+
option (google.api.http) = {
1103+
get: "/v1alpha/{parent=properties/*}/channelGroups"
1104+
};
1105+
option (google.api.method_signature) = "parent";
1106+
}
1107+
1108+
// Creates a ChannelGroup.
1109+
rpc CreateChannelGroup(CreateChannelGroupRequest) returns (ChannelGroup) {
1110+
option (google.api.http) = {
1111+
post: "/v1alpha/{parent=properties/*}/channelGroups"
1112+
body: "channel_group"
1113+
};
1114+
option (google.api.method_signature) = "parent,channel_group";
1115+
}
1116+
1117+
// Updates a ChannelGroup.
1118+
rpc UpdateChannelGroup(UpdateChannelGroupRequest) returns (ChannelGroup) {
1119+
option (google.api.http) = {
1120+
patch: "/v1alpha/{channel_group.name=properties/*/channelGroups/*}"
1121+
body: "channel_group"
1122+
};
1123+
option (google.api.method_signature) = "channel_group,update_mask";
1124+
}
1125+
1126+
// Deletes a ChannelGroup on a property.
1127+
rpc DeleteChannelGroup(DeleteChannelGroupRequest)
1128+
returns (google.protobuf.Empty) {
1129+
option (google.api.http) = {
1130+
delete: "/v1alpha/{name=properties/*/channelGroups/*}"
1131+
};
1132+
option (google.api.method_signature) = "name";
1133+
}
1134+
10901135
// Sets the opt out status for the automated GA4 setup process for a UA
10911136
// property.
10921137
// Note: this has no effect on GA4 property.
@@ -1184,6 +1229,15 @@ service AnalyticsAdminService {
11841229
body: "*"
11851230
};
11861231
}
1232+
1233+
// Given a specified UA property, looks up the GA4 property connected to it.
1234+
// Note: this cannot be used with GA4 properties.
1235+
rpc FetchConnectedGa4Property(FetchConnectedGa4PropertyRequest)
1236+
returns (FetchConnectedGa4PropertyResponse) {
1237+
option (google.api.http) = {
1238+
get: "/v1alpha/properties:fetchConnectedGa4Property"
1239+
};
1240+
}
11871241
}
11881242

11891243
// The request for a Data Access Record Report.
@@ -3065,7 +3119,7 @@ message DeleteExpandedDataSetRequest {
30653119

30663120
// Request message for GetExpandedDataSet RPC.
30673121
message GetExpandedDataSetRequest {
3068-
// Required. The name of the Audience to get.
3122+
// Required. The name of the ExpandedDataSet to get.
30693123
// Example format: properties/1234/expandedDataSets/5678
30703124
string name = 1 [
30713125
(google.api.field_behavior) = REQUIRED,
@@ -3109,6 +3163,95 @@ message ListExpandedDataSetsResponse {
31093163
string next_page_token = 2;
31103164
}
31113165

3166+
// Request message for CreateChannelGroup RPC.
3167+
message CreateChannelGroupRequest {
3168+
// Required. The property for which to create a ChannelGroup.
3169+
// Example format: properties/1234
3170+
string parent = 1 [
3171+
(google.api.field_behavior) = REQUIRED,
3172+
(google.api.resource_reference) = {
3173+
child_type: "analyticsadmin.googleapis.com/ChannelGroup"
3174+
}
3175+
];
3176+
3177+
// Required. The ChannelGroup to create.
3178+
ChannelGroup channel_group = 2 [(google.api.field_behavior) = REQUIRED];
3179+
}
3180+
3181+
// Request message for UpdateChannelGroup RPC.
3182+
message UpdateChannelGroupRequest {
3183+
// Required. The ChannelGroup to update.
3184+
// The resource's `name` field is used to identify the ChannelGroup to be
3185+
// updated.
3186+
ChannelGroup channel_group = 1 [(google.api.field_behavior) = REQUIRED];
3187+
3188+
// Required. The list of fields to be updated. Field names must be in snake
3189+
// case (e.g., "field_to_update"). Omitted fields will not be updated. To
3190+
// replace the entire entity, use one path with the string "*" to match all
3191+
// fields.
3192+
google.protobuf.FieldMask update_mask = 2
3193+
[(google.api.field_behavior) = REQUIRED];
3194+
}
3195+
3196+
// Request message for DeleteChannelGroup RPC.
3197+
message DeleteChannelGroupRequest {
3198+
// Required. The ChannelGroup to delete.
3199+
// Example format: properties/1234/channelGroups/5678
3200+
string name = 1 [
3201+
(google.api.field_behavior) = REQUIRED,
3202+
(google.api.resource_reference) = {
3203+
type: "analyticsadmin.googleapis.com/ChannelGroup"
3204+
}
3205+
];
3206+
}
3207+
3208+
// Request message for GetChannelGroup RPC.
3209+
message GetChannelGroupRequest {
3210+
// Required. The ChannelGroup to get.
3211+
// Example format: properties/1234/channelGroups/5678
3212+
string name = 1 [
3213+
(google.api.field_behavior) = REQUIRED,
3214+
(google.api.resource_reference) = {
3215+
type: "analyticsadmin.googleapis.com/ChannelGroup"
3216+
}
3217+
];
3218+
}
3219+
3220+
// Request message for ListChannelGroups RPC.
3221+
message ListChannelGroupsRequest {
3222+
// Required. The property for which to list ChannelGroups.
3223+
// Example format: properties/1234
3224+
string parent = 1 [
3225+
(google.api.field_behavior) = REQUIRED,
3226+
(google.api.resource_reference) = {
3227+
child_type: "analyticsadmin.googleapis.com/ChannelGroup"
3228+
}
3229+
];
3230+
3231+
// The maximum number of resources to return.
3232+
// If unspecified, at most 50 resources will be returned.
3233+
// The maximum value is 200 (higher values will be coerced to the maximum).
3234+
int32 page_size = 2;
3235+
3236+
// A page token, received from a previous `ListChannelGroups` call. Provide
3237+
// this to retrieve the subsequent page.
3238+
//
3239+
// When paginating, all other parameters provided to `ListChannelGroups`
3240+
// must match the call that provided the page token.
3241+
string page_token = 3;
3242+
}
3243+
3244+
// Response message for ListChannelGroups RPC.
3245+
message ListChannelGroupsResponse {
3246+
// List of ChannelGroup. These will be ordered stably, but in an arbitrary
3247+
// order.
3248+
repeated ChannelGroup channel_groups = 1;
3249+
3250+
// A token, which can be sent as `page_token` to retrieve the next page.
3251+
// If this field is omitted, there are no subsequent pages.
3252+
string next_page_token = 2;
3253+
}
3254+
31123255
// Request for setting the opt out status for the automated GA4 setup process.
31133256
message SetAutomatedGa4ConfigurationOptOutRequest {
31143257
// Required. The UA property to set the opt out status. Note this request uses
@@ -3262,3 +3405,29 @@ message ListConnectedSiteTagsResponse {
32623405
// connected site tags will be returned.
32633406
repeated ConnectedSiteTag connected_site_tags = 1;
32643407
}
3408+
3409+
// Request for looking up GA4 property connected to a UA property.
3410+
message FetchConnectedGa4PropertyRequest {
3411+
// Required. The UA property for which to look up the connected GA4 property.
3412+
// Note this request uses the
3413+
// internal property ID, not the tracking ID of the form UA-XXXXXX-YY.
3414+
// Format: properties/{internal_web_property_id}
3415+
// Example: properties/1234
3416+
string property = 1 [
3417+
(google.api.field_behavior) = REQUIRED,
3418+
(google.api.resource_reference) = {
3419+
type: "analyticsadmin.googleapis.com/Property"
3420+
}
3421+
];
3422+
}
3423+
3424+
// Response for looking up GA4 property connected to a UA property.
3425+
message FetchConnectedGa4PropertyResponse {
3426+
// The GA4 property connected to the UA property. An empty string is returned
3427+
// when there is no connected GA4 property.
3428+
// Format: properties/{property_id}
3429+
// Example: properties/1234
3430+
string property = 1 [(google.api.resource_reference) = {
3431+
type: "analyticsadmin.googleapis.com/Property"
3432+
}];
3433+
}

google/analytics/admin/v1alpha/analyticsadmin_v1alpha.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ authentication:
7272
canonical_scopes: |-
7373
https://www.googleapis.com/auth/analytics.edit,
7474
https://www.googleapis.com/auth/analytics.readonly
75+
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.FetchConnectedGa4Property
76+
oauth:
77+
canonical_scopes: |-
78+
https://www.googleapis.com/auth/analytics.edit,
79+
https://www.googleapis.com/auth/analytics.readonly
7580
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.GetAccessBinding
7681
oauth:
7782
canonical_scopes: |-
@@ -97,6 +102,11 @@ authentication:
97102
canonical_scopes: |-
98103
https://www.googleapis.com/auth/analytics.edit,
99104
https://www.googleapis.com/auth/analytics.readonly
105+
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.GetChannelGroup
106+
oauth:
107+
canonical_scopes: |-
108+
https://www.googleapis.com/auth/analytics.edit,
109+
https://www.googleapis.com/auth/analytics.readonly
100110
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.GetConversionEvent
101111
oauth:
102112
canonical_scopes: |-
@@ -202,6 +212,11 @@ authentication:
202212
canonical_scopes: |-
203213
https://www.googleapis.com/auth/analytics.edit,
204214
https://www.googleapis.com/auth/analytics.readonly
215+
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.ListChannelGroups
216+
oauth:
217+
canonical_scopes: |-
218+
https://www.googleapis.com/auth/analytics.edit,
219+
https://www.googleapis.com/auth/analytics.readonly
205220
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.ListConnectedSiteTags
206221
oauth:
207222
canonical_scopes: |-
@@ -285,13 +300,3 @@ authentication:
285300
oauth:
286301
canonical_scopes: |-
287302
https://www.googleapis.com/auth/analytics.manage.users
288-
289-
publishing:
290-
organization: CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED
291-
new_issue_uri: ''
292-
documentation_uri: ''
293-
api_short_name: ''
294-
github_label: ''
295-
doc_tag_prefix: ''
296-
codeowner_github_teams:
297-
library_settings:

0 commit comments

Comments
 (0)