Specifying a Media PlanStay organized with collectionsSave and categorize content based on your preferences.
AI-generated Key Takeaways
This feature is only available to allowlisted accounts; contact your Google representative for access.
TheReachPlanServicehelps in formulating media plans by providing methods to generate a reach curve based on audience targeting and product mix.
Audience targeting criteria include audiences, age ranges, genders, devices, locations, and networks, each referencing specific Google Ads API components.
The product mix, specified to generate a curve, can be determined using theListPlannableProductsmethod, and assigning budgets to products is necessary for generating the curve.
To generate a reach forecast request, you must set customer ID, campaign duration, and planned products, with optional fields available for further customization.
Google offers a variety of products and audiences you can use to build
campaigns, though you might not know how to formulate a plan. To help with
this,ReachPlanServiceprovides discovery
methods you can use togenerate a
curve.
Audience targeting
The first component of a media plan is audience targeting, which can include
the following target criteria:
defshow_plannable_products(client:GoogleAdsClient,location_id:str):"""Lists plannable products for a given location.Args:client: an initialized GoogleAdsClient instance.location_id: The location ID to plan for."""reach_plan_service:ReachPlanServiceClient=client.get_service("ReachPlanService")response:ListPlannableProductsResponse=(reach_plan_service.list_plannable_products(plannable_location_id=location_id))print(f"Plannable Products for Location ID{location_id}")product_metadata:ProductMetadataforproduct_metadatainresponse.product_metadata:print(f"{product_metadata.plannable_product_code}: "f"{product_metadata.plannable_product_name}")print("Age Ranges:")age_range:ReachPlanAgeRangeEnumforage_rangeinproduct_metadata.plannable_targeting.age_ranges:print(f"\t-{age_range.name}")print("Genders:")gender:GenderInfoforgenderinproduct_metadata.plannable_targeting.genders:print(f"\t-{gender.type_.name}")print("Devices:")device:DeviceInfofordeviceinproduct_metadata.plannable_targeting.devices:print(f"\t-{device.type_.name}")
defforecast_manual_mix(client:GoogleAdsClient,customer_id:str,location_id:str,currency_code:str,budget:int,):"""Pulls a forecast for product mix created manually.Args:client: an initialized GoogleAdsClient instance.customer_id: The customer ID for the reach forecast.location_id: The location ID to plan for.currency_code: Three-character ISO 4217 currency code.budget: Budget to allocate to the plan."""product_mix:list[PlannedProduct]=[]trueview_allocation=0.15bumper_allocation=1-trueview_allocationproduct_splits=[("TRUEVIEW_IN_STREAM",trueview_allocation),("BUMPER",bumper_allocation),]product:strsplit:floatforproduct,splitinproduct_splits:planned_product:PlannedProduct=client.get_type("PlannedProduct")planned_product.plannable_product_code=productplanned_product.budget_micros=math.trunc(budget*ONE_MILLION*split)product_mix.append(planned_product)request_reach_curve(client,customer_id,product_mix,location_id,currency_code)
defforecast_manual_mix(client,reach_plan_service,customer_id)# Set up a ratio to split the budget between two products.trueview_allocation=0.15bumper_allocation=1-trueview_allocation# See listPlannableProducts on ReachPlanService to retrieve a list# of valid PlannableProductCode's for a given location:# https://developers.google.com/google-ads/api/reference/rpc/latest/ReachPlanServiceproduct_mix=[]product_mix<<client.resource.planned_productdo|p|p.plannable_product_code='TRUEVIEW_IN_STREAM'p.budget_micros=BUDGET_MICROS*trueview_allocationendproduct_mix<<client.resource.planned_productdo|p|p.plannable_product_code='BUMPER'p.budget_micros=BUDGET_MICROS*bumper_allocationendget_reach_curve(client,reach_plan_service,customer_id,product_mix,LOCATION_ID,CURRENCY_CODE,)end
subforecast_mix{my($reach_plan_service,$customer_id,$location_id,$currency_code,$budget_micros)=@_;my$product_mix=[];# Set up a ratio to split the budget between two products.my$trueview_allocation=0.15;my$bumper_allocation=1-$trueview_allocation;# See list_plannable_products on ReachPlanService to retrieve a list of valid# plannable product codes for a given location:# https://developers.google.com/google-ads/api/reference/rpc/latest/ReachPlanServicepush@$product_mix,Google::Ads::GoogleAds::V22::Services::ReachPlanService::PlannedProduct->new({plannableProductCode=>"TRUEVIEW_IN_STREAM",budgetMicros=>int($budget_micros*$trueview_allocation)});push@$product_mix,Google::Ads::GoogleAds::V22::Services::ReachPlanService::PlannedProduct->new({plannableProductCode=>"BUMPER",budgetMicros=>int($budget_micros*$bumper_allocation)});my$reach_request=build_reach_request($customer_id,$product_mix,$location_id,$currency_code);pull_reach_curve($reach_plan_service,$reach_request);}
The maximum number of times an ad can be shown to the same user during a specified time interval. This cap can be defined as a limit per one day, one week, or one month.
currency_code
Three-character ISO 4217 currency code.
customer_reach_group
The name of the customer being planned for. This is a user-defined value. Required iftargeting.audience_targetingis set.
min_effective_frequency
Minimum number of times a person was exposed to the ad for the reported reach metrics.
targeting
The targeting to be applied to all products selected in the product mix, including location, age range, genders, devices, and network.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-11-05 UTC."],[],[]]