xref: /aosp_15_r20/external/googleapis/google/ads/googleads/v16/resources/conversion_action.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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
15syntax = "proto3";
16
17package google.ads.googleads.v16.resources;
18
19import "google/ads/googleads/v16/common/tag_snippet.proto";
20import "google/ads/googleads/v16/enums/attribution_model.proto";
21import "google/ads/googleads/v16/enums/conversion_action_category.proto";
22import "google/ads/googleads/v16/enums/conversion_action_counting_type.proto";
23import "google/ads/googleads/v16/enums/conversion_action_status.proto";
24import "google/ads/googleads/v16/enums/conversion_action_type.proto";
25import "google/ads/googleads/v16/enums/conversion_origin.proto";
26import "google/ads/googleads/v16/enums/data_driven_model_status.proto";
27import "google/ads/googleads/v16/enums/mobile_app_vendor.proto";
28import "google/api/field_behavior.proto";
29import "google/api/resource.proto";
30
31option csharp_namespace = "Google.Ads.GoogleAds.V16.Resources";
32option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v16/resources;resources";
33option java_multiple_files = true;
34option java_outer_classname = "ConversionActionProto";
35option java_package = "com.google.ads.googleads.v16.resources";
36option objc_class_prefix = "GAA";
37option php_namespace = "Google\\Ads\\GoogleAds\\V16\\Resources";
38option ruby_package = "Google::Ads::GoogleAds::V16::Resources";
39
40// Proto file describing the Conversion Action resource.
41
42// A conversion action.
43message ConversionAction {
44  option (google.api.resource) = {
45    type: "googleads.googleapis.com/ConversionAction"
46    pattern: "customers/{customer_id}/conversionActions/{conversion_action_id}"
47  };
48
49  // Settings related to this conversion action's attribution model.
50  message AttributionModelSettings {
51    // The attribution model type of this conversion action.
52    google.ads.googleads.v16.enums.AttributionModelEnum.AttributionModel
53        attribution_model = 1;
54
55    // Output only. The status of the data-driven attribution model for the
56    // conversion action.
57    google.ads.googleads.v16.enums.DataDrivenModelStatusEnum
58        .DataDrivenModelStatus data_driven_model_status = 2
59        [(google.api.field_behavior) = OUTPUT_ONLY];
60  }
61
62  // Settings related to the value for conversion events associated with this
63  // conversion action.
64  message ValueSettings {
65    // The value to use when conversion events for this conversion action are
66    // sent with an invalid, disallowed or missing value, or when
67    // this conversion action is configured to always use the default value.
68    optional double default_value = 4;
69
70    // The currency code to use when conversion events for this conversion
71    // action are sent with an invalid or missing currency code, or when this
72    // conversion action is configured to always use the default value.
73    optional string default_currency_code = 5;
74
75    // Controls whether the default value and default currency code are used in
76    // place of the value and currency code specified in conversion events for
77    // this conversion action.
78    optional bool always_use_default_value = 6;
79  }
80
81  // Settings related to a third party app analytics conversion action.
82  message ThirdPartyAppAnalyticsSettings {
83    // Output only. The event name of a third-party app analytics conversion.
84    optional string event_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
85
86    // Output only. Name of the third-party app analytics provider.
87    string provider_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
88  }
89
90  // Settings related to a Firebase conversion action.
91  message FirebaseSettings {
92    // Output only. The event name of a Firebase conversion.
93    optional string event_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
94
95    // Output only. The Firebase project ID of the conversion.
96    optional string project_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
97
98    // Output only. The GA property ID of the conversion.
99    int64 property_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
100
101    // Output only. The GA property name of the conversion.
102    string property_name = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
103  }
104
105  // Settings related to a Google Analytics 4 conversion action.
106  message GoogleAnalytics4Settings {
107    // Output only. The name of the GA 4 event.
108    string event_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
109
110    // Output only. The name of the GA 4 property.
111    string property_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
112
113    // Output only. The ID of the GA 4 property.
114    int64 property_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
115  }
116
117  // Immutable. The resource name of the conversion action.
118  // Conversion action resource names have the form:
119  //
120  // `customers/{customer_id}/conversionActions/{conversion_action_id}`
121  string resource_name = 1 [
122    (google.api.field_behavior) = IMMUTABLE,
123    (google.api.resource_reference) = {
124      type: "googleads.googleapis.com/ConversionAction"
125    }
126  ];
127
128  // Output only. The ID of the conversion action.
129  optional int64 id = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
130
131  // The name of the conversion action.
132  //
133  // This field is required and should not be empty when creating new
134  // conversion actions.
135  optional string name = 22;
136
137  // The status of this conversion action for conversion event accrual.
138  google.ads.googleads.v16.enums.ConversionActionStatusEnum
139      .ConversionActionStatus status = 4;
140
141  // Immutable. The type of this conversion action.
142  google.ads.googleads.v16.enums.ConversionActionTypeEnum.ConversionActionType
143      type = 5 [(google.api.field_behavior) = IMMUTABLE];
144
145  // Output only. The conversion origin of this conversion action.
146  google.ads.googleads.v16.enums.ConversionOriginEnum.ConversionOrigin origin =
147      30 [(google.api.field_behavior) = OUTPUT_ONLY];
148
149  // If a conversion action's primary_for_goal bit is false, the conversion
150  // action is non-biddable for all campaigns regardless of their customer
151  // conversion goal or campaign conversion goal.
152  // However, custom conversion goals do not respect primary_for_goal, so if
153  // a campaign has a custom conversion goal configured with a
154  // primary_for_goal = false conversion action, that conversion action is
155  // still biddable.
156  // By default, primary_for_goal will be true if not set. In V9,
157  // primary_for_goal can only be set to false after creation through an
158  // 'update' operation because it's not declared as optional.
159  optional bool primary_for_goal = 31;
160
161  // The category of conversions reported for this conversion action.
162  google.ads.googleads.v16.enums.ConversionActionCategoryEnum
163      .ConversionActionCategory category = 6;
164
165  // Output only. The resource name of the conversion action owner customer, or
166  // null if this is a system-defined conversion action.
167  optional string owner_customer = 23 [
168    (google.api.field_behavior) = OUTPUT_ONLY,
169    (google.api.resource_reference) = {
170      type: "googleads.googleapis.com/Customer"
171    }
172  ];
173
174  // Whether this conversion action should be included in the "conversions"
175  // metric.
176  optional bool include_in_conversions_metric = 24;
177
178  // The maximum number of days that may elapse between an interaction
179  // (for example, a click) and a conversion event.
180  optional int64 click_through_lookback_window_days = 25;
181
182  // The maximum number of days which may elapse between an impression and a
183  // conversion without an interaction.
184  optional int64 view_through_lookback_window_days = 26;
185
186  // Settings related to the value for conversion events associated with this
187  // conversion action.
188  ValueSettings value_settings = 11;
189
190  // How to count conversion events for the conversion action.
191  google.ads.googleads.v16.enums.ConversionActionCountingTypeEnum
192      .ConversionActionCountingType counting_type = 12;
193
194  // Settings related to this conversion action's attribution model.
195  AttributionModelSettings attribution_model_settings = 13;
196
197  // Output only. The snippets used for tracking conversions.
198  repeated google.ads.googleads.v16.common.TagSnippet tag_snippets = 14
199      [(google.api.field_behavior) = OUTPUT_ONLY];
200
201  // The phone call duration in seconds after which a conversion should be
202  // reported for this conversion action.
203  //
204  // The value must be between 0 and 10000, inclusive.
205  optional int64 phone_call_duration_seconds = 27;
206
207  // App ID for an app conversion action.
208  optional string app_id = 28;
209
210  // Output only. Mobile app vendor for an app conversion action.
211  google.ads.googleads.v16.enums.MobileAppVendorEnum.MobileAppVendor
212      mobile_app_vendor = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
213
214  // Output only. Firebase settings for Firebase conversion types.
215  FirebaseSettings firebase_settings = 18
216      [(google.api.field_behavior) = OUTPUT_ONLY];
217
218  // Output only. Third Party App Analytics settings for third party conversion
219  // types.
220  ThirdPartyAppAnalyticsSettings third_party_app_analytics_settings = 19
221      [(google.api.field_behavior) = OUTPUT_ONLY];
222
223  // Output only. Google Analytics 4 settings for Google Analytics 4 conversion
224  // types.
225  GoogleAnalytics4Settings google_analytics_4_settings = 34
226      [(google.api.field_behavior) = OUTPUT_ONLY];
227}
228