Skip to content

Commit

Permalink
fix!: rename the enterprise_daily_export_enabled field to `fresh_da…
Browse files Browse the repository at this point in the history
…ily_export_enabled` in the `BigQueryLink` resource

feat: add `GetSKAdNetworkConversionValueSchema`, `CreateSKAdNetworkConversionValueSchema`, `DeleteSKAdNetworkConversionValueSchema`, `UpdateSKAdNetworkConversionValueSchema`, `ListSKAdNetworkConversionValueSchemas` methods to the Admin API v1 alpha
feat: add the `skadnetwork_conversion_value_schema` field to the `ChangeHistoryResource.resource` oneof type
feat: add the `SKADNETWORK_CONVERSION_VALUE_SCHEMA` option to the `ChangeHistoryResourceType` enum
feat: add `CoarseValue`, `ConversionValues`, `EventMapping`, `SKAdNetworkConversionValueSchema` types

PiperOrigin-RevId: 561159616
  • Loading branch information
Google APIs authored and Copybara-Service committed Aug 29, 2023
1 parent 8bc102a commit ba06e6c
Show file tree
Hide file tree
Showing 4 changed files with 310 additions and 3 deletions.
1 change: 0 additions & 1 deletion google/analytics/admin/v1alpha/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ load(

csharp_proto_library(
name = "admin_csharp_proto",
extra_opts = [],
deps = [":admin_proto"],
)

Expand Down
150 changes: 150 additions & 0 deletions google/analytics/admin/v1alpha/analytics_admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,61 @@ service AnalyticsAdminService {
};
}

// Looks up a single SKAdNetworkConversionValueSchema.
rpc GetSKAdNetworkConversionValueSchema(
GetSKAdNetworkConversionValueSchemaRequest)
returns (SKAdNetworkConversionValueSchema) {
option (google.api.http) = {
get: "/v1alpha/{name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}"
};
option (google.api.method_signature) = "name";
}

// Creates a SKAdNetworkConversionValueSchema.
rpc CreateSKAdNetworkConversionValueSchema(
CreateSKAdNetworkConversionValueSchemaRequest)
returns (SKAdNetworkConversionValueSchema) {
option (google.api.http) = {
post: "/v1alpha/{parent=properties/*/dataStreams/*}/sKAdNetworkConversionValueSchema"
body: "skadnetwork_conversion_value_schema"
};
option (google.api.method_signature) =
"parent,skadnetwork_conversion_value_schema";
}

// Deletes target SKAdNetworkConversionValueSchema.
rpc DeleteSKAdNetworkConversionValueSchema(
DeleteSKAdNetworkConversionValueSchemaRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1alpha/{name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}"
};
option (google.api.method_signature) = "name";
}

// Updates a SKAdNetworkConversionValueSchema.
rpc UpdateSKAdNetworkConversionValueSchema(
UpdateSKAdNetworkConversionValueSchemaRequest)
returns (SKAdNetworkConversionValueSchema) {
option (google.api.http) = {
patch: "/v1alpha/{skadnetwork_conversion_value_schema.name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}"
body: "skadnetwork_conversion_value_schema"
};
option (google.api.method_signature) =
"skadnetwork_conversion_value_schema,update_mask";
}

// Lists SKAdNetworkConversionValueSchema on a stream.
// Properties can have at most one SKAdNetworkConversionValueSchema.
rpc ListSKAdNetworkConversionValueSchemas(
ListSKAdNetworkConversionValueSchemasRequest)
returns (ListSKAdNetworkConversionValueSchemasResponse) {
option (google.api.http) = {
get: "/v1alpha/{parent=properties/*/dataStreams/*}/sKAdNetworkConversionValueSchema"
};
option (google.api.method_signature) = "parent";
}

// Searches through all changes to an account or its children given the
// specified set of filters.
rpc SearchChangeHistoryEvents(SearchChangeHistoryEventsRequest)
Expand Down Expand Up @@ -2211,6 +2266,101 @@ message ListMeasurementProtocolSecretsResponse {
string next_page_token = 2;
}

// Request message for GetSKAdNetworkConversionValueSchema RPC.
message GetSKAdNetworkConversionValueSchemaRequest {
// Required. The resource name of SKAdNetwork conversion value schema to look
// up. Format:
// properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema"
}
];
}

// Request message for CreateSKAdNetworkConversionValueSchema RPC.
message CreateSKAdNetworkConversionValueSchemaRequest {
// Required. The parent resource where this schema will be created.
// Format: properties/{property}/dataStreams/{dataStream}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema"
}
];

// Required. SKAdNetwork conversion value schema to create.
SKAdNetworkConversionValueSchema skadnetwork_conversion_value_schema = 2
[(google.api.field_behavior) = REQUIRED];
}

// Request message for DeleteSKAdNetworkConversionValueSchema RPC.
message DeleteSKAdNetworkConversionValueSchemaRequest {
// Required. The name of the SKAdNetworkConversionValueSchema to delete.
// Format:
// properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema"
}
];
}

// Request message for UpdateSKAdNetworkConversionValueSchema RPC.
message UpdateSKAdNetworkConversionValueSchemaRequest {
// Required. SKAdNetwork conversion value schema to update.
SKAdNetworkConversionValueSchema skadnetwork_conversion_value_schema = 1
[(google.api.field_behavior) = REQUIRED];

// Required. The list of fields to be updated. Omitted fields will not be
// updated.
google.protobuf.FieldMask update_mask = 2
[(google.api.field_behavior) = REQUIRED];
}

// Request message for ListSKAdNetworkConversionValueSchemas RPC
message ListSKAdNetworkConversionValueSchemasRequest {
// Required. Format:
// properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema
// Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema"
}
];

// The maximum number of resources to return. The service may return
// fewer than this value, even if there are additional pages.
// If unspecified, at most 50 resources will be returned.
// The maximum value is 200; (higher values will be coerced to the maximum)
int32 page_size = 2;

// A page token, received from a previous
// `ListSKAdNetworkConversionValueSchemas` call. Provide this to retrieve the
// subsequent page. When paginating, all other parameters provided to
// `ListSKAdNetworkConversionValueSchema` must match the call that provided
// the page token.
string page_token = 3;
}

// Response message for ListSKAdNetworkConversionValueSchemas RPC
message ListSKAdNetworkConversionValueSchemasResponse {
// List of SKAdNetworkConversionValueSchemas. This will have at most one
// value.
repeated SKAdNetworkConversionValueSchema
skadnetwork_conversion_value_schemas = 1;

// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
// Currently, Google Analytics supports only one
// SKAdNetworkConversionValueSchema per dataStream, so this will never be
// populated.
string next_page_token = 2;
}

// Request message for GetGoogleSignalsSettings RPC
message GetGoogleSignalsSettingsRequest {
// Required. The name of the google signals settings to retrieve.
Expand Down
10 changes: 10 additions & 0 deletions google/analytics/admin/v1alpha/analyticsadmin_v1alpha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ authentication:
canonical_scopes: |-
https://www.googleapis.com/auth/analytics.edit,
https://www.googleapis.com/auth/analytics.readonly
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.GetSKAdNetworkConversionValueSchema
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/analytics.edit,
https://www.googleapis.com/auth/analytics.readonly
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.GetSearchAds360Link
oauth:
canonical_scopes: |-
Expand Down Expand Up @@ -297,6 +302,11 @@ authentication:
canonical_scopes: |-
https://www.googleapis.com/auth/analytics.edit,
https://www.googleapis.com/auth/analytics.readonly
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.ListSKAdNetworkConversionValueSchemas
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/analytics.edit,
https://www.googleapis.com/auth/analytics.readonly
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.ListSearchAds360Links
oauth:
canonical_scopes: |-
Expand Down
152 changes: 150 additions & 2 deletions google/analytics/admin/v1alpha/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ enum ChangeHistoryResourceType {
// EnhancedMeasurementSettings resource
ENHANCED_MEASUREMENT_SETTINGS = 24;

// SKAdNetworkConversionValueSchema resource
SKADNETWORK_CONVERSION_VALUE_SCHEMA = 26;

// AdSenseLink resource
ADSENSE_LINK = 27;

Expand Down Expand Up @@ -313,6 +316,24 @@ enum PropertyType {
PROPERTY_TYPE_ROLLUP = 3;
}

// The coarse conversion value set on the updatePostbackConversionValue SDK call
// when a ConversionValues.event_mappings conditions are satisfied. For
// more information, see
// [SKAdNetwork.CoarseConversionValue](https://developer.apple.com/documentation/storekit/skadnetwork/coarseconversionvalue).
enum CoarseValue {
// Coarse value not specified.
COARSE_VALUE_UNSPECIFIED = 0;

// Coarse value of low.
COARSE_VALUE_LOW = 1;

// Coarse value of medium.
COARSE_VALUE_MEDIUM = 2;

// Coarse value of high.
COARSE_VALUE_HIGH = 3;
}

// A resource message representing a Google Analytics account.
message Account {
option (google.api.resource) = {
Expand Down Expand Up @@ -776,6 +797,129 @@ message MeasurementProtocolSecret {
string secret_value = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// SKAdNetwork conversion value schema of an iOS stream.
message SKAdNetworkConversionValueSchema {
option (google.api.resource) = {
type: "analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema"
pattern: "properties/{property}/dataStreams/{data_stream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}"
};

// Output only. Resource name of the schema. This will be child of ONLY an iOS
// stream, and there can be at most one such child under an iOS stream.
// Format:
// properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Required. The conversion value settings for the first postback window.
// These differ from values for postback window two and three in that they
// contain a "Fine" grained conversion value (a numeric value).
//
// Conversion values for this postback window must be set. The other windows
// are optional and may inherit this window's settings if unset or disabled.
PostbackWindow postback_window_one = 2
[(google.api.field_behavior) = REQUIRED];

// The conversion value settings for the second postback window.
//
// This field should only be configured if there is a need to define different
// conversion values for this postback window.
//
// If enable_postback_window_settings is set to false for this postback
// window, the values from postback_window_one will be used.
PostbackWindow postback_window_two = 3;

// The conversion value settings for the third postback window.
//
// This field should only be set if the user chose to define different
// conversion values for this postback window. It is allowed to configure
// window 3 without setting window 2. In case window 1 & 2 settings are set
// and enable_postback_window_settings for this postback window is set to
// false, the schema will inherit settings from postback_window_two.
PostbackWindow postback_window_three = 4;

// If enabled, the GA SDK will set conversion values using this schema
// definition, and schema will be exported to any Google Ads accounts linked
// to this property. If disabled, the GA SDK will not automatically set
// conversion values, and also the schema will not be exported to Ads.
bool apply_conversion_values = 5;
}

// Settings for a SKAdNetwork conversion postback window.
message PostbackWindow {
// Ordering of the repeated field will be used to prioritize the conversion
// value settings. Lower indexed entries are prioritized higher. The first
// conversion value setting that evaluates to true will be selected. It must
// have at least one entry if enable_postback_window_settings is set to
// true. It can have maximum of 128 entries.
repeated ConversionValues conversion_values = 1;

// If enable_postback_window_settings is true, conversion_values
// must be populated and will be used for determining when and how to set the
// Conversion Value on a client device and exporting schema to linked Ads
// accounts. If false, the settings are not used, but are retained in case
// they may be used in the future. This must always be true for
// postback_window_one.
bool postback_window_settings_enabled = 2;
}

// Conversion value settings for a postback window for SKAdNetwork conversion
// value schema.
message ConversionValues {
// Display name of the SKAdNetwork conversion value.
// The max allowed display name length is 50 UTF-16 code units.
string display_name = 1;

// The fine-grained conversion value. This is applicable only to the first
// postback window. Its valid values are [0,63], both inclusive. It must be
// set for postback window 1, and must not be set for postback window 2 & 3.
// This value is not guaranteed to be unique.
//
// If the configuration for the first postback window is re-used for second or
// third postback windows this field has no effect.
optional int32 fine_value = 2;

// Required. A coarse grained conversion value.
//
// This value is not guaranteed to be unique.
CoarseValue coarse_value = 3 [(google.api.field_behavior) = REQUIRED];

// Event conditions that must be met for this Conversion Value to be achieved.
// The conditions in this list are ANDed together. It must have minimum of 1
// entry and maximum of 3 entries, if the postback window is enabled.
repeated EventMapping event_mappings = 4;

// If true, the SDK should lock to this conversion value for the current
// postback window.
bool lock_enabled = 5;
}

// Event setting conditions to match an event.
message EventMapping {
// Required. Name of the GA4 event. It must always be set.
// The max allowed display name length is 40 UTF-16 code units.
string event_name = 1 [(google.api.field_behavior) = REQUIRED];

// At least one of the following four min/max values must be set. The
// values set will be ANDed together to qualify an event.
// The minimum number of times the event occurred. If not set, minimum event
// count won't be checked.
optional int64 min_event_count = 2;

// The maximum number of times the event occurred. If not set, maximum event
// count won't be checked.
optional int64 max_event_count = 3;

// The minimum revenue generated due to the event. Revenue currency will be
// defined at the property level. If not set, minimum event value won't be
// checked.
optional double min_event_value = 4;

// The maximum revenue generated due to the event. Revenue currency will be
// defined at the property level. If not set, maximum event value won't be
// checked.
optional double max_event_value = 5;
}

// A set of changes within a Google Analytics account or its child properties
// that resulted from the same cause. Common causes would be updates made in the
// Google Analytics UI, changes from customer support, or automatic Google
Expand Down Expand Up @@ -870,6 +1014,10 @@ message ChangeHistoryChange {
// A snapshot of EnhancedMeasurementSettings resource in change history.
EnhancedMeasurementSettings enhanced_measurement_settings = 24;

// A snapshot of SKAdNetworkConversionValueSchema resource in change
// history.
SKAdNetworkConversionValueSchema skadnetwork_conversion_value_schema = 26;

// A snapshot of an AdSenseLink resource in change history.
AdSenseLink adsense_link = 27;

Expand Down Expand Up @@ -1579,8 +1727,8 @@ message BigQueryLink {
// If set true, enables streaming export to the linked Google Cloud project.
bool streaming_export_enabled = 5;

// If set true, enables enterprise export to the linked Google Cloud project.
bool enterprise_export_enabled = 9;
// If set true, enables fresh daily export to the linked Google Cloud project.
bool fresh_daily_export_enabled = 9;

// If set true, exported data will include advertising identifiers for mobile
// app streams.
Expand Down

0 comments on commit ba06e6c

Please sign in to comment.