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.v14.resources; 18 19import "google/ads/googleads/v14/enums/conversion_tracking_status_enum.proto"; 20import "google/ads/googleads/v14/enums/customer_pay_per_conversion_eligibility_failure_reason.proto"; 21import "google/ads/googleads/v14/enums/customer_status.proto"; 22import "google/ads/googleads/v14/enums/offline_conversion_diagnostic_status_enum.proto"; 23import "google/ads/googleads/v14/enums/offline_event_upload_client_enum.proto"; 24import "google/ads/googleads/v14/errors/collection_size_error.proto"; 25import "google/ads/googleads/v14/errors/conversion_adjustment_upload_error.proto"; 26import "google/ads/googleads/v14/errors/conversion_upload_error.proto"; 27import "google/ads/googleads/v14/errors/date_error.proto"; 28import "google/ads/googleads/v14/errors/distinct_error.proto"; 29import "google/ads/googleads/v14/errors/field_error.proto"; 30import "google/ads/googleads/v14/errors/mutate_error.proto"; 31import "google/ads/googleads/v14/errors/not_allowlisted_error.proto"; 32import "google/ads/googleads/v14/errors/string_format_error.proto"; 33import "google/ads/googleads/v14/errors/string_length_error.proto"; 34import "google/api/field_behavior.proto"; 35import "google/api/resource.proto"; 36 37option csharp_namespace = "Google.Ads.GoogleAds.V14.Resources"; 38option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/resources;resources"; 39option java_multiple_files = true; 40option java_outer_classname = "CustomerProto"; 41option java_package = "com.google.ads.googleads.v14.resources"; 42option objc_class_prefix = "GAA"; 43option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Resources"; 44option ruby_package = "Google::Ads::GoogleAds::V14::Resources"; 45 46// Proto file describing the Customer resource. 47 48// A customer. 49message Customer { 50 option (google.api.resource) = { 51 type: "googleads.googleapis.com/Customer" 52 pattern: "customers/{customer_id}" 53 }; 54 55 // Immutable. The resource name of the customer. 56 // Customer resource names have the form: 57 // 58 // `customers/{customer_id}` 59 string resource_name = 1 [ 60 (google.api.field_behavior) = IMMUTABLE, 61 (google.api.resource_reference) = { 62 type: "googleads.googleapis.com/Customer" 63 } 64 ]; 65 66 // Output only. The ID of the customer. 67 optional int64 id = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; 68 69 // Optional, non-unique descriptive name of the customer. 70 optional string descriptive_name = 20; 71 72 // Immutable. The currency in which the account operates. 73 // A subset of the currency codes from the ISO 4217 standard is 74 // supported. 75 optional string currency_code = 21 [(google.api.field_behavior) = IMMUTABLE]; 76 77 // Immutable. The local timezone ID of the customer. 78 optional string time_zone = 22 [(google.api.field_behavior) = IMMUTABLE]; 79 80 // The URL template for constructing a tracking URL out of parameters. 81 // Only mutable in an `update` operation. 82 optional string tracking_url_template = 23; 83 84 // The URL template for appending params to the final URL. 85 // Only mutable in an `update` operation. 86 optional string final_url_suffix = 24; 87 88 // Whether auto-tagging is enabled for the customer. 89 optional bool auto_tagging_enabled = 25; 90 91 // Output only. Whether the Customer has a Partners program badge. If the 92 // Customer is not associated with the Partners program, this will be false. 93 // For more information, see 94 // https://support.google.com/partners/answer/3125774. 95 optional bool has_partners_badge = 26 96 [(google.api.field_behavior) = OUTPUT_ONLY]; 97 98 // Output only. Whether the customer is a manager. 99 optional bool manager = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; 100 101 // Output only. Whether the customer is a test account. 102 optional bool test_account = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; 103 104 // Call reporting setting for a customer. Only mutable in an `update` 105 // operation. 106 CallReportingSetting call_reporting_setting = 10; 107 108 // Output only. Conversion tracking setting for a customer. 109 ConversionTrackingSetting conversion_tracking_setting = 14 110 [(google.api.field_behavior) = OUTPUT_ONLY]; 111 112 // Output only. Remarketing setting for a customer. 113 RemarketingSetting remarketing_setting = 15 114 [(google.api.field_behavior) = OUTPUT_ONLY]; 115 116 // Output only. Reasons why the customer is not eligible to use 117 // PaymentMode.CONVERSIONS. If the list is empty, the customer is eligible. 118 // This field is read-only. 119 repeated google.ads.googleads.v14.enums 120 .CustomerPayPerConversionEligibilityFailureReasonEnum 121 .CustomerPayPerConversionEligibilityFailureReason 122 pay_per_conversion_eligibility_failure_reasons = 16 123 [(google.api.field_behavior) = OUTPUT_ONLY]; 124 125 // Output only. Optimization score of the customer. 126 // 127 // Optimization score is an estimate of how well a customer's campaigns are 128 // set to perform. It ranges from 0% (0.0) to 100% (1.0). This field is null 129 // for all manager customers, and for unscored non-manager customers. 130 // 131 // See "About optimization score" at 132 // https://support.google.com/google-ads/answer/9061546. 133 // 134 // This field is read-only. 135 optional double optimization_score = 29 136 [(google.api.field_behavior) = OUTPUT_ONLY]; 137 138 // Output only. Optimization score weight of the customer. 139 // 140 // Optimization score weight can be used to compare/aggregate optimization 141 // scores across multiple non-manager customers. The aggregate optimization 142 // score of a manager is computed as the sum over all of their customers of 143 // `Customer.optimization_score * Customer.optimization_score_weight`. This 144 // field is 0 for all manager customers, and for unscored non-manager 145 // customers. 146 // 147 // This field is read-only. 148 double optimization_score_weight = 30 149 [(google.api.field_behavior) = OUTPUT_ONLY]; 150 151 // Output only. The status of the customer. 152 google.ads.googleads.v14.enums.CustomerStatusEnum.CustomerStatus status = 36 153 [(google.api.field_behavior) = OUTPUT_ONLY]; 154 155 // Output only. True if feed based location has been migrated to asset based 156 // location. 157 optional bool location_asset_auto_migration_done = 38 158 [(google.api.field_behavior) = OUTPUT_ONLY]; 159 160 // Output only. True if feed based image has been migrated to asset based 161 // image. 162 optional bool image_asset_auto_migration_done = 39 163 [(google.api.field_behavior) = OUTPUT_ONLY]; 164 165 // Output only. Timestamp of migration from feed based location to asset base 166 // location in yyyy-MM-dd HH:mm:ss format. 167 optional string location_asset_auto_migration_done_date_time = 40 168 [(google.api.field_behavior) = OUTPUT_ONLY]; 169 170 // Output only. Timestamp of migration from feed based image to asset base 171 // image in yyyy-MM-dd HH:mm:ss format. 172 optional string image_asset_auto_migration_done_date_time = 41 173 [(google.api.field_behavior) = OUTPUT_ONLY]; 174 175 // Output only. Offline conversion upload diagnostics. 176 repeated OfflineConversionClientSummary offline_conversion_client_summaries = 177 43 [(google.api.field_behavior) = OUTPUT_ONLY]; 178 179 // Output only. Customer Agreement Setting for a customer. 180 CustomerAgreementSetting customer_agreement_setting = 44 181 [(google.api.field_behavior) = OUTPUT_ONLY]; 182} 183 184// Call reporting setting for a customer. Only mutable in an `update` operation. 185message CallReportingSetting { 186 // Enable reporting of phone call events by redirecting them through Google 187 // System. 188 optional bool call_reporting_enabled = 10; 189 190 // Whether to enable call conversion reporting. 191 optional bool call_conversion_reporting_enabled = 11; 192 193 // Customer-level call conversion action to attribute a call conversion to. 194 // If not set a default conversion action is used. Only in effect when 195 // call_conversion_reporting_enabled is set to true. 196 optional string call_conversion_action = 12 197 [(google.api.resource_reference) = { 198 type: "googleads.googleapis.com/ConversionAction" 199 }]; 200} 201 202// A collection of customer-wide settings related to Google Ads Conversion 203// Tracking. 204message ConversionTrackingSetting { 205 // Output only. The conversion tracking id used for this account. This id 206 // doesn't indicate whether the customer uses conversion tracking 207 // (conversion_tracking_status does). This field is read-only. 208 optional int64 conversion_tracking_id = 3 209 [(google.api.field_behavior) = OUTPUT_ONLY]; 210 211 // Output only. The conversion tracking id of the customer's manager. This is 212 // set when the customer is opted into cross account conversion tracking, and 213 // it overrides conversion_tracking_id. This field can only be managed through 214 // the Google Ads UI. This field is read-only. 215 optional int64 cross_account_conversion_tracking_id = 4 216 [(google.api.field_behavior) = OUTPUT_ONLY]; 217 218 // Output only. Whether the customer has accepted customer data terms. If 219 // using cross-account conversion tracking, this value is inherited from the 220 // manager. This field is read-only. For more 221 // information, see https://support.google.com/adspolicy/answer/7475709. 222 bool accepted_customer_data_terms = 5 223 [(google.api.field_behavior) = OUTPUT_ONLY]; 224 225 // Output only. Conversion tracking status. It indicates whether the customer 226 // is using conversion tracking, and who is the conversion tracking owner of 227 // this customer. If this customer is using cross-account conversion tracking, 228 // the value returned will differ based on the `login-customer-id` of the 229 // request. 230 google.ads.googleads.v14.enums.ConversionTrackingStatusEnum 231 .ConversionTrackingStatus conversion_tracking_status = 6 232 [(google.api.field_behavior) = OUTPUT_ONLY]; 233 234 // Output only. Whether the customer is opted-in for enhanced conversions 235 // for leads. If using cross-account conversion tracking, this value is 236 // inherited from the manager. This field is read-only. 237 bool enhanced_conversions_for_leads_enabled = 7 238 [(google.api.field_behavior) = OUTPUT_ONLY]; 239 240 // Output only. The resource name of the customer where conversions are 241 // created and managed. This field is read-only. 242 string google_ads_conversion_customer = 8 243 [(google.api.field_behavior) = OUTPUT_ONLY]; 244} 245 246// Remarketing setting for a customer. 247message RemarketingSetting { 248 // Output only. The Google tag. 249 optional string google_global_site_tag = 2 250 [(google.api.field_behavior) = OUTPUT_ONLY]; 251} 252 253// Offline conversion upload diagnostic summarized by client. This proto 254// contains general information, breakdown by date/job and alerts for offline 255// conversion upload results. 256message OfflineConversionClientSummary { 257 // Output only. Client type of the upload event. 258 google.ads.googleads.v14.enums.OfflineEventUploadClientEnum 259 .OfflineEventUploadClient client = 1 260 [(google.api.field_behavior) = OUTPUT_ONLY]; 261 262 // Output only. Overall status for offline conversion client summary. Status 263 // is generated from most recent calendar day with upload stats. 264 google.ads.googleads.v14.enums.OfflineConversionDiagnosticStatusEnum 265 .OfflineConversionDiagnosticStatus status = 2 266 [(google.api.field_behavior) = OUTPUT_ONLY]; 267 268 // Output only. Total count of uploaded events. 269 int64 total_event_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 270 271 // Output only. Total count of successful uploaded events. 272 int64 successful_event_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 273 274 // Output only. Successful rate. 275 double success_rate = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 276 277 // Output only. Date for the latest upload batch. 278 string last_upload_date_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 279 280 // Output only. Summary of history stats by last N days. 281 repeated OfflineConversionUploadSummary daily_summaries = 7 282 [(google.api.field_behavior) = OUTPUT_ONLY]; 283 284 // Output only. Summary of history stats by last N jobs. 285 repeated OfflineConversionUploadSummary job_summaries = 8 286 [(google.api.field_behavior) = OUTPUT_ONLY]; 287 288 // Output only. Details for each error code. Alerts are generated from most 289 // recent calendar day with upload stats. 290 repeated OfflineConversionUploadAlert alerts = 9 291 [(google.api.field_behavior) = OUTPUT_ONLY]; 292} 293 294// Historical upload summary, grouped by upload date or job. 295message OfflineConversionUploadSummary { 296 // Output only. Total count of successful event. 297 int64 successful_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 298 299 // Output only. Total count of failed event. 300 int64 failed_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 301 302 // Dimension key for summary. 303 oneof dimension_key { 304 // Output only. Dimension key for last N jobs. 305 int64 job_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 306 307 // Output only. Dimension key for last N days. 308 string upload_date = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 309 } 310} 311 312// Alert for offline conversion client summary. 313message OfflineConversionUploadAlert { 314 // Output only. Error for offline conversion client alert. 315 OfflineConversionUploadError error = 1 316 [(google.api.field_behavior) = OUTPUT_ONLY]; 317 318 // Output only. Percentage of the error. 319 double error_percentage = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 320} 321 322// Possible errors for offline conversion client summary. 323message OfflineConversionUploadError { 324 // Error with description. 325 oneof error_code { 326 // Output only. Collection size error. 327 google.ads.googleads.v14.errors.CollectionSizeErrorEnum.CollectionSizeError 328 collection_size_error = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 329 330 // Output only. Conversion adjustment upload error. 331 google.ads.googleads.v14.errors.ConversionAdjustmentUploadErrorEnum 332 .ConversionAdjustmentUploadError conversion_adjustment_upload_error = 2 333 [(google.api.field_behavior) = OUTPUT_ONLY]; 334 335 // Output only. Conversion upload error. 336 google.ads.googleads.v14.errors.ConversionUploadErrorEnum 337 .ConversionUploadError conversion_upload_error = 3 338 [(google.api.field_behavior) = OUTPUT_ONLY]; 339 340 // Output only. Date error. 341 google.ads.googleads.v14.errors.DateErrorEnum.DateError date_error = 4 342 [(google.api.field_behavior) = OUTPUT_ONLY]; 343 344 // Output only. Distinct error. 345 google.ads.googleads.v14.errors.DistinctErrorEnum.DistinctError 346 distinct_error = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 347 348 // Output only. Field error. 349 google.ads.googleads.v14.errors.FieldErrorEnum.FieldError field_error = 6 350 [(google.api.field_behavior) = OUTPUT_ONLY]; 351 352 // Output only. Mutate error. 353 google.ads.googleads.v14.errors.MutateErrorEnum.MutateError mutate_error = 7 354 [(google.api.field_behavior) = OUTPUT_ONLY]; 355 356 // Output only. Not allowlisted error. 357 google.ads.googleads.v14.errors.NotAllowlistedErrorEnum.NotAllowlistedError 358 not_allowlisted_error = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 359 360 // Output only. String format error. 361 google.ads.googleads.v14.errors.StringFormatErrorEnum.StringFormatError 362 string_format_error = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 363 364 // Output only. String length error. 365 google.ads.googleads.v14.errors.StringLengthErrorEnum.StringLengthError 366 string_length_error = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 367 } 368} 369 370// Customer Agreement Setting for a customer. 371message CustomerAgreementSetting { 372 // Output only. Whether the customer has accepted lead form term of service. 373 bool accepted_lead_form_terms = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 374} 375