reach_plan_service.proto 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.ads.googleads.v10.services;
  16. import "google/ads/googleads/v10/common/criteria.proto";
  17. import "google/ads/googleads/v10/common/dates.proto";
  18. import "google/ads/googleads/v10/enums/frequency_cap_time_unit.proto";
  19. import "google/ads/googleads/v10/enums/reach_plan_ad_length.proto";
  20. import "google/ads/googleads/v10/enums/reach_plan_age_range.proto";
  21. import "google/ads/googleads/v10/enums/reach_plan_network.proto";
  22. import "google/api/annotations.proto";
  23. import "google/api/client.proto";
  24. import "google/api/field_behavior.proto";
  25. option csharp_namespace = "Google.Ads.GoogleAds.V10.Services";
  26. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/services;services";
  27. option java_multiple_files = true;
  28. option java_outer_classname = "ReachPlanServiceProto";
  29. option java_package = "com.google.ads.googleads.v10.services";
  30. option objc_class_prefix = "GAA";
  31. option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Services";
  32. option ruby_package = "Google::Ads::GoogleAds::V10::Services";
  33. // Proto file describing the reach plan service.
  34. // Reach Plan Service gives users information about audience size that can
  35. // be reached through advertisement on YouTube. In particular,
  36. // GenerateReachForecast provides estimated number of people of specified
  37. // demographics that can be reached by an ad in a given market by a campaign of
  38. // certain duration with a defined budget.
  39. service ReachPlanService {
  40. option (google.api.default_host) = "googleads.googleapis.com";
  41. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  42. // Returns the list of plannable locations (for example, countries).
  43. //
  44. // List of thrown errors:
  45. // [AuthenticationError]()
  46. // [AuthorizationError]()
  47. // [HeaderError]()
  48. // [InternalError]()
  49. // [QuotaError]()
  50. // [RequestError]()
  51. rpc ListPlannableLocations(ListPlannableLocationsRequest) returns (ListPlannableLocationsResponse) {
  52. option (google.api.http) = {
  53. post: "/v10:listPlannableLocations"
  54. body: "*"
  55. };
  56. }
  57. // Returns the list of per-location plannable YouTube ad formats with allowed
  58. // targeting.
  59. //
  60. // List of thrown errors:
  61. // [AuthenticationError]()
  62. // [AuthorizationError]()
  63. // [HeaderError]()
  64. // [InternalError]()
  65. // [QuotaError]()
  66. // [RequestError]()
  67. rpc ListPlannableProducts(ListPlannableProductsRequest) returns (ListPlannableProductsResponse) {
  68. option (google.api.http) = {
  69. post: "/v10:listPlannableProducts"
  70. body: "*"
  71. };
  72. option (google.api.method_signature) = "plannable_location_id";
  73. }
  74. // Generates a product mix ideas given a set of preferences. This method
  75. // helps the advertiser to obtain a good mix of ad formats and budget
  76. // allocations based on its preferences.
  77. //
  78. // List of thrown errors:
  79. // [AuthenticationError]()
  80. // [AuthorizationError]()
  81. // [HeaderError]()
  82. // [InternalError]()
  83. // [QuotaError]()
  84. // [ReachPlanError]()
  85. // [RequestError]()
  86. rpc GenerateProductMixIdeas(GenerateProductMixIdeasRequest) returns (GenerateProductMixIdeasResponse) {
  87. option (google.api.http) = {
  88. post: "/v10/customers/{customer_id=*}:generateProductMixIdeas"
  89. body: "*"
  90. };
  91. option (google.api.method_signature) = "customer_id,plannable_location_id,currency_code,budget_micros";
  92. }
  93. // Generates a reach forecast for a given targeting / product mix.
  94. //
  95. // List of thrown errors:
  96. // [AuthenticationError]()
  97. // [AuthorizationError]()
  98. // [FieldError]()
  99. // [HeaderError]()
  100. // [InternalError]()
  101. // [QuotaError]()
  102. // [RangeError]()
  103. // [ReachPlanError]()
  104. // [RequestError]()
  105. rpc GenerateReachForecast(GenerateReachForecastRequest) returns (GenerateReachForecastResponse) {
  106. option (google.api.http) = {
  107. post: "/v10/customers/{customer_id=*}:generateReachForecast"
  108. body: "*"
  109. };
  110. option (google.api.method_signature) = "customer_id,campaign_duration,planned_products";
  111. }
  112. }
  113. // Request message for [ReachPlanService.ListPlannableLocations][google.ads.googleads.v10.services.ReachPlanService.ListPlannableLocations].
  114. message ListPlannableLocationsRequest {
  115. }
  116. // The list of plannable locations.
  117. message ListPlannableLocationsResponse {
  118. // The list of locations available for planning.
  119. // See
  120. // https://developers.google.com/google-ads/api/reference/data/geotargets
  121. // for sample locations.
  122. repeated PlannableLocation plannable_locations = 1;
  123. }
  124. // A plannable location: country, metro region, province, etc.
  125. message PlannableLocation {
  126. // The location identifier.
  127. optional string id = 4;
  128. // The unique location name in English.
  129. optional string name = 5;
  130. // The parent country (not present if location is a country).
  131. // If present, will always be a GeoTargetConstant ID. Additional information
  132. // such as country name is provided by
  133. // [ReachPlanService.ListPlannableLocations][google.ads.googleads.v10.services.ReachPlanService.ListPlannableLocations] or
  134. // [GoogleAdsService.Search/SearchStream][].
  135. optional int64 parent_country_id = 6;
  136. // The ISO-3166-1 alpha-2 country code that is associated with the location.
  137. optional string country_code = 7;
  138. // The location's type. Location types correspond to target_type returned by
  139. // searching location type in [GoogleAdsService.Search/SearchStream][].
  140. optional string location_type = 8;
  141. }
  142. // Request to list available products in a given location.
  143. message ListPlannableProductsRequest {
  144. // Required. The ID of the selected location for planning. To list the available
  145. // plannable location IDs use [ReachPlanService.ListPlannableLocations][google.ads.googleads.v10.services.ReachPlanService.ListPlannableLocations].
  146. string plannable_location_id = 2 [(google.api.field_behavior) = REQUIRED];
  147. }
  148. // A response with all available products.
  149. message ListPlannableProductsResponse {
  150. // The list of products available for planning and related targeting metadata.
  151. repeated ProductMetadata product_metadata = 1;
  152. }
  153. // The metadata associated with an available plannable product.
  154. message ProductMetadata {
  155. // The code associated with the ad product (for example: BUMPER,
  156. // TRUEVIEW_IN_STREAM).
  157. // To list the available plannable product codes use
  158. // [ReachPlanService.ListPlannableProducts][google.ads.googleads.v10.services.ReachPlanService.ListPlannableProducts].
  159. optional string plannable_product_code = 4;
  160. // The name associated with the ad product.
  161. string plannable_product_name = 3;
  162. // The allowed plannable targeting for this product.
  163. PlannableTargeting plannable_targeting = 2;
  164. }
  165. // The targeting for which traffic metrics will be reported.
  166. message PlannableTargeting {
  167. // Allowed plannable age ranges for the product for which metrics will be
  168. // reported. Actual targeting is computed by mapping this age range onto
  169. // standard Google common.AgeRangeInfo values.
  170. repeated google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
  171. // Targetable genders for the ad product.
  172. repeated google.ads.googleads.v10.common.GenderInfo genders = 2;
  173. // Targetable devices for the ad product.
  174. // TABLET device targeting is automatically applied to reported metrics
  175. // when MOBILE targeting is selected for CPM_MASTHEAD,
  176. // GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
  177. repeated google.ads.googleads.v10.common.DeviceInfo devices = 3;
  178. // Targetable networks for the ad product.
  179. repeated google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
  180. }
  181. // Request message for [ReachPlanService.GenerateProductMixIdeas][google.ads.googleads.v10.services.ReachPlanService.GenerateProductMixIdeas].
  182. message GenerateProductMixIdeasRequest {
  183. // Required. The ID of the customer.
  184. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  185. // Required. The ID of the location, this is one of the IDs returned by
  186. // [ReachPlanService.ListPlannableLocations][google.ads.googleads.v10.services.ReachPlanService.ListPlannableLocations].
  187. string plannable_location_id = 6 [(google.api.field_behavior) = REQUIRED];
  188. // Required. Currency code.
  189. // Three-character ISO 4217 currency code.
  190. string currency_code = 7 [(google.api.field_behavior) = REQUIRED];
  191. // Required. Total budget.
  192. // Amount in micros. One million is equivalent to one unit.
  193. int64 budget_micros = 8 [(google.api.field_behavior) = REQUIRED];
  194. // The preferences of the suggested product mix.
  195. // An unset preference is interpreted as all possible values are allowed,
  196. // unless explicitly specified.
  197. Preferences preferences = 5;
  198. }
  199. // Set of preferences about the planned mix.
  200. message Preferences {
  201. // True if ad skippable.
  202. // If not set, default is any value.
  203. optional bool is_skippable = 6;
  204. // True if ad start with sound.
  205. // If not set, default is any value.
  206. optional bool starts_with_sound = 7;
  207. // The length of the ad.
  208. // If not set, default is any value.
  209. google.ads.googleads.v10.enums.ReachPlanAdLengthEnum.ReachPlanAdLength ad_length = 3;
  210. // True if ad will only show on the top content.
  211. // If not set, default is false.
  212. optional bool top_content_only = 8;
  213. // True if the price is guaranteed. The cost of serving the ad is agreed
  214. // upfront and not subject to an auction.
  215. // If not set, default is any value.
  216. optional bool has_guaranteed_price = 9;
  217. }
  218. // The suggested product mix.
  219. message GenerateProductMixIdeasResponse {
  220. // A list of products (ad formats) and the associated budget allocation idea.
  221. repeated ProductAllocation product_allocation = 1;
  222. }
  223. // An allocation of a part of the budget on a given product.
  224. message ProductAllocation {
  225. // Selected product for planning. The product codes returned are within the
  226. // set of the ones returned by ListPlannableProducts when using the same
  227. // location ID.
  228. optional string plannable_product_code = 3;
  229. // The value to be allocated for the suggested product in requested currency.
  230. // Amount in micros. One million is equivalent to one unit.
  231. optional int64 budget_micros = 4;
  232. }
  233. // Request message for [ReachPlanService.GenerateReachForecast][google.ads.googleads.v10.services.ReachPlanService.GenerateReachForecast].
  234. message GenerateReachForecastRequest {
  235. // Required. The ID of the customer.
  236. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  237. // The currency code.
  238. // Three-character ISO 4217 currency code.
  239. optional string currency_code = 9;
  240. // Required. Campaign duration.
  241. CampaignDuration campaign_duration = 3 [(google.api.field_behavior) = REQUIRED];
  242. // Desired cookie frequency cap to be applied to each planned product.
  243. // This is equivalent to the frequency cap exposed in Google Ads when creating
  244. // a campaign, it represents the maximum number of times an ad can be shown to
  245. // the same user.
  246. // If not specified, no cap is applied.
  247. //
  248. // This field is deprecated in v4 and will eventually be removed.
  249. // Please use cookie_frequency_cap_setting instead.
  250. optional int32 cookie_frequency_cap = 10;
  251. // Desired cookie frequency cap to be applied to each planned product.
  252. // This is equivalent to the frequency cap exposed in Google Ads when creating
  253. // a campaign, it represents the maximum number of times an ad can be shown to
  254. // the same user during a specified time interval.
  255. // If not specified, a default of 0 (no cap) is applied.
  256. //
  257. // This field replaces the deprecated cookie_frequency_cap field.
  258. FrequencyCap cookie_frequency_cap_setting = 8;
  259. // Desired minimum effective frequency (the number of times a person was
  260. // exposed to the ad) for the reported reach metrics [1-10].
  261. // This won't affect the targeting, but just the reporting.
  262. // If not specified, a default of 1 is applied.
  263. //
  264. // This field cannot be combined with the effective_frequency_limit field.
  265. optional int32 min_effective_frequency = 11;
  266. // The highest minimum effective frequency (the number of times a person was
  267. // exposed to the ad) value [1-10] to include in
  268. // Forecast.effective_frequency_breakdowns.
  269. // If not specified, Forecast.effective_frequency_breakdowns will not be
  270. // provided.
  271. //
  272. // The effective frequency value provided here will also be used as the
  273. // minimum effective frequency for the reported reach metrics.
  274. //
  275. // This field cannot be combined with the min_effective_frequency field.
  276. optional EffectiveFrequencyLimit effective_frequency_limit = 12;
  277. // The targeting to be applied to all products selected in the product mix.
  278. //
  279. // This is planned targeting: execution details might vary based on the
  280. // advertising product, please consult an implementation specialist.
  281. //
  282. // See specific metrics for details on how targeting affects them.
  283. Targeting targeting = 6;
  284. // Required. The products to be forecast.
  285. // The max number of allowed planned products is 15.
  286. repeated PlannedProduct planned_products = 7 [(google.api.field_behavior) = REQUIRED];
  287. }
  288. // Effective frequency limit.
  289. message EffectiveFrequencyLimit {
  290. // The highest effective frequency value to include in
  291. // Forecast.effective_frequency_breakdowns.
  292. // This field supports frequencies 1-10, inclusive.
  293. int32 effective_frequency_breakdown_limit = 1;
  294. }
  295. // A rule specifying the maximum number of times an ad can be shown to a user
  296. // over a particular time period.
  297. message FrequencyCap {
  298. // Required. The number of impressions, inclusive.
  299. int32 impressions = 3 [(google.api.field_behavior) = REQUIRED];
  300. // Required. The type of time unit.
  301. google.ads.googleads.v10.enums.FrequencyCapTimeUnitEnum.FrequencyCapTimeUnit time_unit = 2 [(google.api.field_behavior) = REQUIRED];
  302. }
  303. // The targeting for which traffic metrics will be reported.
  304. message Targeting {
  305. // Required. The ID of the selected location. Plannable location IDs can be
  306. // obtained from [ReachPlanService.ListPlannableLocations][google.ads.googleads.v10.services.ReachPlanService.ListPlannableLocations].
  307. optional string plannable_location_id = 6;
  308. // Targeted age range.
  309. // An unset value is equivalent to targeting all ages.
  310. google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_range = 2;
  311. // Targeted genders.
  312. // An unset value is equivalent to targeting MALE and FEMALE.
  313. repeated google.ads.googleads.v10.common.GenderInfo genders = 3;
  314. // Targeted devices.
  315. // If not specified, targets all applicable devices. Applicable devices vary
  316. // by product and region and can be obtained from
  317. // [ReachPlanService.ListPlannableProducts][google.ads.googleads.v10.services.ReachPlanService.ListPlannableProducts].
  318. repeated google.ads.googleads.v10.common.DeviceInfo devices = 4;
  319. // Targetable network for the ad product.
  320. // If not specified, targets all applicable networks. Applicable networks vary
  321. // by product and region and can be obtained from
  322. // [ReachPlanService.ListPlannableProducts][google.ads.googleads.v10.services.ReachPlanService.ListPlannableProducts].
  323. google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork network = 5;
  324. }
  325. // The duration of a planned campaign.
  326. message CampaignDuration {
  327. // The duration value in days.
  328. //
  329. // This field cannot be combined with the date_range field.
  330. optional int32 duration_in_days = 2;
  331. // Date range of the campaign.
  332. // Dates are in the yyyy-mm-dd format and inclusive.
  333. // The end date must be < 1 year in the future and the
  334. // date range must be <= 92 days long.
  335. //
  336. // This field cannot be combined with the duration_in_days field.
  337. google.ads.googleads.v10.common.DateRange date_range = 3;
  338. }
  339. // A product being planned for reach.
  340. message PlannedProduct {
  341. // Required. Selected product for planning.
  342. // The code associated with the ad product (for example: Trueview, Bumper).
  343. // To list the available plannable product codes use
  344. // [ReachPlanService.ListPlannableProducts][google.ads.googleads.v10.services.ReachPlanService.ListPlannableProducts].
  345. optional string plannable_product_code = 3;
  346. // Required. Maximum budget allocation in micros for the selected product.
  347. // The value is specified in the selected planning currency_code.
  348. // For example: 1 000 000$ = 1 000 000 000 000 micros.
  349. optional int64 budget_micros = 4;
  350. }
  351. // Response message containing the generated reach curve.
  352. message GenerateReachForecastResponse {
  353. // Reference on target audiences for this curve.
  354. OnTargetAudienceMetrics on_target_audience_metrics = 1;
  355. // The generated reach curve for the planned product mix.
  356. ReachCurve reach_curve = 2;
  357. }
  358. // The reach curve for the planned products.
  359. message ReachCurve {
  360. // All points on the reach curve.
  361. repeated ReachForecast reach_forecasts = 1;
  362. }
  363. // A point on reach curve.
  364. message ReachForecast {
  365. // The cost in micros.
  366. int64 cost_micros = 5;
  367. // Forecasted traffic metrics for this point.
  368. Forecast forecast = 2;
  369. // The forecasted allocation and traffic metrics for each planned product
  370. // at this point on the reach curve.
  371. repeated PlannedProductReachForecast planned_product_reach_forecasts = 4;
  372. }
  373. // Forecasted traffic metrics for the planned products and targeting.
  374. message Forecast {
  375. // Number of unique people reached at least
  376. // GenerateReachForecastRequest.min_effective_frequency or
  377. // GenerateReachForecastRequest.effective_frequency_limit times that exactly
  378. // matches the Targeting.
  379. //
  380. // Note that a minimum number of unique people must be reached in order for
  381. // data to be reported. If the minimum number is not met, the on_target_reach
  382. // value will be rounded to 0.
  383. optional int64 on_target_reach = 5;
  384. // Total number of unique people reached at least
  385. // GenerateReachForecastRequest.min_effective_frequency or
  386. // GenerateReachForecastRequest.effective_frequency_limit times. This includes
  387. // people that may fall outside the specified Targeting.
  388. //
  389. // Note that a minimum number of unique people must be reached in order for
  390. // data to be reported. If the minimum number is not met, the total_reach
  391. // value will be rounded to 0.
  392. optional int64 total_reach = 6;
  393. // Number of ad impressions that exactly matches the Targeting.
  394. optional int64 on_target_impressions = 7;
  395. // Total number of ad impressions. This includes impressions that may fall
  396. // outside the specified Targeting, due to insufficient information on
  397. // signed-in users.
  398. optional int64 total_impressions = 8;
  399. // Number of times the ad's impressions were considered viewable.
  400. // See https://support.google.com/google-ads/answer/7029393 for
  401. // more information about what makes an ad viewable and how
  402. // viewability is measured.
  403. optional int64 viewable_impressions = 9;
  404. // A list of effective frequency forecasts. The list is ordered starting with
  405. // 1+ and ending with the value set in
  406. // GenerateReachForecastRequest.effective_frequency_limit. If no
  407. // effective_frequency_limit was set, this list will be empty.
  408. repeated EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
  409. }
  410. // The forecasted allocation and traffic metrics for a specific product
  411. // at a point on the reach curve.
  412. message PlannedProductReachForecast {
  413. // Selected product for planning. The product codes returned are within the
  414. // set of the ones returned by ListPlannableProducts when using the same
  415. // location ID.
  416. string plannable_product_code = 1;
  417. // The cost in micros. This may differ from the product's input allocation
  418. // if one or more planned products cannot fulfill the budget because of
  419. // limited inventory.
  420. int64 cost_micros = 2;
  421. // Forecasted traffic metrics for this product.
  422. PlannedProductForecast planned_product_forecast = 3;
  423. }
  424. // Forecasted traffic metrics for a planned product.
  425. message PlannedProductForecast {
  426. // Number of unique people reached that exactly matches the Targeting.
  427. //
  428. // Note that a minimum number of unique people must be reached in order for
  429. // data to be reported. If the minimum number is not met, the on_target_reach
  430. // value will be rounded to 0.
  431. int64 on_target_reach = 1;
  432. // Number of unique people reached. This includes people that may fall
  433. // outside the specified Targeting.
  434. //
  435. // Note that a minimum number of unique people must be reached in order for
  436. // data to be reported. If the minimum number is not met, the total_reach
  437. // value will be rounded to 0.
  438. int64 total_reach = 2;
  439. // Number of ad impressions that exactly matches the Targeting.
  440. int64 on_target_impressions = 3;
  441. // Total number of ad impressions. This includes impressions that may fall
  442. // outside the specified Targeting, due to insufficient information on
  443. // signed-in users.
  444. int64 total_impressions = 4;
  445. // Number of times the ad's impressions were considered viewable.
  446. // See https://support.google.com/google-ads/answer/7029393 for
  447. // more information about what makes an ad viewable and how
  448. // viewability is measured.
  449. optional int64 viewable_impressions = 5;
  450. }
  451. // Audience metrics for the planned products.
  452. // These metrics consider the following targeting dimensions:
  453. //
  454. // - Location
  455. // - PlannableAgeRange
  456. // - Gender
  457. message OnTargetAudienceMetrics {
  458. // Reference audience size matching the considered targeting for YouTube.
  459. optional int64 youtube_audience_size = 3;
  460. // Reference audience size matching the considered targeting for Census.
  461. optional int64 census_audience_size = 4;
  462. }
  463. // A breakdown of the number of unique people reached at a given effective
  464. // frequency.
  465. message EffectiveFrequencyBreakdown {
  466. // The effective frequency [1-10].
  467. int32 effective_frequency = 1;
  468. // The number of unique people reached at least effective_frequency times that
  469. // exactly matches the Targeting.
  470. //
  471. // Note that a minimum number of unique people must be reached in order for
  472. // data to be reported. If the minimum number is not met, the on_target_reach
  473. // value will be rounded to 0.
  474. int64 on_target_reach = 2;
  475. // Total number of unique people reached at least effective_frequency times.
  476. // This includes people that may fall outside the specified Targeting.
  477. //
  478. // Note that a minimum number of unique people must be reached in order for
  479. // data to be reported. If the minimum number is not met, the total_reach
  480. // value will be rounded to 0.
  481. int64 total_reach = 3;
  482. }