Create a Performance Max Campaign
Stay organized with collections
Save and categorize content based on your preferences.
Page Summary
Performance Max campaigns are identified by an AdvertisingChannelType of PERFORMANCE_MAX and do not use AdvertisingChannelSubType.
The only supported bidding strategies for Performance Max campaigns are MaximizeConversions (with optional target CPA) and MaximizeConversionValue (with optional target ROAS).
Portfolio bid strategies are not supported; instead, use fewer campaigns and more asset groups.
Brand guidelines, which control the representation of your brand in automated assets, are automatically enabled for new Performance Max campaigns in Google Ads API v21 and onwards, requiring specific campaign-level assets.
Existing campaigns can be manually migrated to enable brand guidelines using CampaignService.EnablePMaxBrandGuidelines, with the option to automatically populate brand assets.
With the prerequisite assets and budget, the campaign can now be created.
Performance Max campaigns have an
AdvertisingChannelType
of PERFORMANCE_MAX. No AdvertisingChannelSubType should be set.
If you aren't tracking values and care about all of your conversions equally,
use the MaximizeConversions bidding
strategy. An optional target
CPA (cost-per-action) can be
set. Learn more.
If you're tracking values with your conversions, set the
MaximizeConversionValue bidding
strategy. An optional
target ROAS
(Return on Advertising Spend) can be set.
Learn more.
defcreate_performance_max_campaign_operation(client:GoogleAdsClient,customer_id:str,brand_guidelines_enabled:bool,)-> MutateOperation:"""Creates a MutateOperation that creates a new Performance Max campaign. A temporary ID will be assigned to this campaign so that it can be referenced by other objects being created in the same Mutate request. Args: client: an initialized GoogleAdsClient instance. customer_id: a client customer ID. brand_guidelines_enabled: a boolean value indicating if the campaign is enabled for brand guidelines. Returns: a MutateOperation that creates a campaign. """mutate_operation:MutateOperation=client.get_type("MutateOperation")campaign:Campaign=mutate_operation.campaign_operation.createcampaign.name=f"Performance Max campaign #{uuid4()}"# Set the campaign status as PAUSED. The campaign is the only entity in# the mutate request that should have its status set.campaign.status=client.enums.CampaignStatusEnum.PAUSED# All Performance Max campaigns have an advertising_channel_type of# PERFORMANCE_MAX. The advertising_channel_sub_type should not be set.campaign.advertising_channel_type=(client.enums.AdvertisingChannelTypeEnum.PERFORMANCE_MAX)# Bidding strategy must be set directly on the campaign.# Setting a portfolio bidding strategy by resource name is not supported.# Max Conversion and Maximize Conversion Value are the only strategies# supported for Performance Max campaigns.# An optional ROAS (Return on Advertising Spend) can be set for# maximize_conversion_value. The ROAS value must be specified as a ratio in# the API. It is calculated by dividing "total value" by "total spend".# For more information on Maximize Conversion Value, see the support# article: http://support.google.com/google-ads/answer/7684216.# A target_roas of 3.5 corresponds to a 350% return on ad spend.campaign.bidding_strategy_type=(client.enums.BiddingStrategyTypeEnum.MAXIMIZE_CONVERSION_VALUE)campaign.maximize_conversion_value.target_roas=3.5# Set if the campaign is enabled for brand guidelines. For more information# on brand guidelines, see https://support.google.com/google-ads/answer/14934472.campaign.brand_guidelines_enabled=brand_guidelines_enabled# Assign the resource name with a temporary ID.campaign_service:CampaignServiceClient=client.get_service("CampaignService")campaign.resource_name=campaign_service.campaign_path(customer_id,_PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID)# Set the budget using the given budget resource name.campaign.campaign_budget=campaign_service.campaign_budget_path(customer_id,_BUDGET_TEMPORARY_ID)# Declare whether or not this campaign serves political ads targeting the# EU. Valid values are:# CONTAINS_EU_POLITICAL_ADVERTISING# DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISINGcampaign.contains_eu_political_advertising=(client.enums.EuPoliticalAdvertisingStatusEnum.DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING)# Optional fieldscampaign.start_date=(datetime.now()+timedelta(1)).strftime("%Y%m%d")campaign.end_date=(datetime.now()+timedelta(365)).strftime("%Y%m%d")# Configures the optional opt-in/out status for asset automation settings.forasset_automation_type_enumin[client.enums.AssetAutomationTypeEnum.GENERATE_IMAGE_EXTRACTION,client.enums.AssetAutomationTypeEnum.FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION,client.enums.AssetAutomationTypeEnum.TEXT_ASSET_AUTOMATION,client.enums.AssetAutomationTypeEnum.GENERATE_ENHANCED_YOUTUBE_VIDEOS,client.enums.AssetAutomationTypeEnum.GENERATE_IMAGE_ENHANCEMENT]:asset_automattion_setting:Campaign.AssetAutomationSetting=client.get_type("Campaign").AssetAutomationSetting()asset_automattion_setting.asset_automation_type=asset_automation_type_enumasset_automattion_setting.asset_automation_status=client.enums.AssetAutomationStatusEnum.OPTED_INcampaign.asset_automation_settings.append(asset_automattion_setting)returnmutate_operation
# Creates a MutateOperation that creates a new Performance Max campaign.## A temporary ID will be assigned to this campaign so that it can# be referenced by other objects being created in the same Mutate request.defcreate_performance_max_campaign_operation(client,customer_id,brand_guidelines_enabled)client.operation.mutatedo|m|m.campaign_operation=client.operation.create_resource.campaigndo|c|c.name="Performance Max campaign #{SecureRandom.uuid}"# Set the campaign status as PAUSED. The campaign is the only entity in# the mutate request that should have its status set.c.status=:PAUSED# All Performance Max campaigns have an advertising_channel_type of# PERFORMANCE_MAX. The advertising_channel_sub_type should not be set.c.advertising_channel_type=:PERFORMANCE_MAX# Bidding strategy must be set directly on the campaign.# Setting a portfolio bidding strategy by resource name is not supported.# Max Conversion and Maximize Conversion Value are the only strategies# supported for Performance Max campaigns.# An optional ROAS (Return on Advertising Spend) can be set for# maximize_conversion_value. The ROAS value must be specified as a ratio in# the API. It is calculated by dividing "total value" by "total spend".# For more information on Maximize Conversion Value, see the support# article: http://support.google.com/google-ads/answer/7684216.# A target_roas of 3.5 corresponds to a 350% return on ad spend.c.bidding_strategy_type=:MAXIMIZE_CONVERSION_VALUEc.maximize_conversion_value=client.resource.maximize_conversion_valuedo|mcv|mcv.target_roas=3.5end# Configures the optional opt-in/out status for asset automation settings.c.asset_automation_settings << client.resource.asset_automation_settingdo|aas|aas.asset_automation_type=:GENERATE_IMAGE_EXTRACTIONaas.asset_automation_status=:OPTED_INendc.asset_automation_settings << client.resource.asset_automation_settingdo|aas|aas.asset_automation_type=:FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATIONaas.asset_automation_status=:OPTED_INendc.asset_automation_settings << client.resource.asset_automation_settingdo|aas|aas.asset_automation_type=:TEXT_ASSET_AUTOMATIONaas.asset_automation_status=:OPTED_INendc.asset_automation_settings << client.resource.asset_automation_settingdo|aas|aas.asset_automation_type=:GENERATE_ENHANCED_YOUTUBE_VIDEOSaas.asset_automation_status=:OPTED_INendc.asset_automation_settings << client.resource.asset_automation_settingdo|aas|aas.asset_automation_type=:GENERATE_IMAGE_ENHANCEMENTaas.asset_automation_status=:OPTED_INend# Set if the campaign is enabled for brand guidelines. For more# information on brand guidelines, see# https://support.google.com/google-ads/answer/14934472.c.brand_guidelines_enabled=brand_guidelines_enabled# Assign the resource name with a temporary ID.c.resource_name=client.path.campaign(customer_id,PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID)# Set the budget using the given budget resource name.c.campaign_budget=client.path.campaign_budget(customer_id,BUDGET_TEMPORARY_ID)# Declare whether or not this campaign serves political ads targeting the EU.# Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and# DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.c.contains_eu_political_advertising=:DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING# Optional fieldsc.start_date=DateTime.parse((Date.today+1).to_s).strftime('%Y%m%d')c.end_date=DateTime.parse(Date.today.next_year.to_s).strftime('%Y%m%d')endendend
subcreate_performance_max_campaign_operation{my($customer_id,$brand_guidelines_enabled)=@_;# Configures the optional opt-in/out status for asset automation settings.# When we create the campaign object, we set campaign->{assetAutomationSettings}# equal to $asset_automation_settings.my$asset_automation_settings=[];my$asset_automation_types=[GENERATE_IMAGE_EXTRACTION,FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION,TEXT_ASSET_AUTOMATION,GENERATE_ENHANCED_YOUTUBE_VIDEOS,GENERATE_IMAGE_ENHANCEMENT];foreachmy$asset_automation_type(@$asset_automation_types){push@$asset_automation_settings,Google::Ads::GoogleAds::V22::Resources::AssetAutomationSetting->new({assetAutomationStatus=>OPTED_IN,assetAutomationType=>$asset_automation_type});}# Create a mutate operation that creates a campaign operation.returnGoogle::Ads::GoogleAds::V22::Services::GoogleAdsService::MutateOperation->
new({campaignOperation=>
Google::Ads::GoogleAds::V22::Services::CampaignService::CampaignOperation->new({create=>Google::Ads::GoogleAds::V22::Resources::Campaign->new({# Assign the resource name with a temporary ID.resourceName=>
Google::Ads::GoogleAds::V22::Utils::ResourceNames::campaign($customer_id,PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID),name=>"Performance Max campaign #".uniqid(),# Set the budget using the given budget resource name.campaignBudget=>
Google::Ads::GoogleAds::V22::Utils::ResourceNames::campaign_budget($customer_id,BUDGET_TEMPORARY_ID),# Set the campaign status as PAUSED. The campaign is the only entity in# the mutate request that should have its status set.status=>
Google::Ads::GoogleAds::V22::Enums::CampaignStatusEnum::PAUSED,# All Performance Max campaigns have an advertisingChannelType of# PERFORMANCE_MAX. The advertisingChannelSubType should not be set.advertisingChannelType=>PERFORMANCE_MAX,# Bidding strategy must be set directly on the campaign.# Setting a portfolio bidding strategy by resource name is not supported.# Max Conversion and Maximize Conversion Value are the only strategies# supported for Performance Max campaigns.# An optional ROAS (Return on Advertising Spend) can be set for# maximizeConversionValue. The ROAS value must be specified as a ratio in# the API. It is calculated by dividing "total value" by "total spend".# For more information on Maximize Conversion Value, see the support# article: http://support.google.com/google-ads/answer/7684216.# A targetRoas of 3.5 corresponds to a 350% return on ad spend.maximizeConversionValue=>
Google::Ads::GoogleAds::V22::Common::MaximizeConversionValue->
new({targetRoas=>3.5}),# Set if the campaign is enabled for brand guidelines. For more information# on brand guidelines, see https://support.google.com/google-ads/answer/14934472.brandGuidelinesEnabled=>$brand_guidelines_enabled,# Configures the optional opt-in/out status for asset automation settings.assetAutomationSettings=>$asset_automation_settings,# Optional fields.startDate=>strftime("%Y%m%d",localtime(time+60*60*24)),endDate=>
strftime("%Y%m%d",localtime(time+60*60*24*365)),# Declare whether or not this campaign serves political ads targeting the EU.# Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and# DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.containsEuPoliticalAdvertising=>
DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING})})});}
Brand guidelines control how
your brand is represented in your Performance Max campaign automated assets or
formats. From Google Ads API v21, Performance Max campaigns automatically enable brand
guidelines on all new Performance Max for online sales or lead generation
(standard) and Performance Max for online sales with a product feed (retail)
campaigns. If you don't want to enable brand guidelines on your new campaigns,
set
Campaign.brand_guidelines_enabled
to false when creating your new Performance Max campaign.
Performance Max campaigns with brand guidelines enabled use campaign-level
assets for brand asset field types(
BUSINESS_NAME,
LOGO, and
LANDSCAPE_LOGO).
You must link brand assets to the campaign using
CampaignAsset and the
campaign must have:
Exactly one BUSINESS_NAME asset
At least one LOGO asset and up to four optional additional logo assets of
the type LOGO or LANDSCAPE_LOGO
Optional color and font guidelines for the campaign can be set using the
Campaign.brand_guidelines field:
main_color sets the
primary color. The color must be provided as a hex code string
(e.g., #00ff00).
accent_color sets the
secondary color. The color must be provided as a hex code string
(e.g., #00ff00).
The following example shows how to create the BUSINESS_NAME and LOGO assets
and attach them to the campaign if brand guidelines are enabled
or to the AssetGroup if brand guidelines are
disabled. See the asset group setup guide for more
information about asset groups.
# Creates a list of MutateOperations that create linked brand assets.defcreate_and_link_brand_assets(client,customer_id,brand_guidelines_enabled,business_name,logo_url,logo_name)operations=[]# Create the Text Asset.text_asset_temp_id=next_temp_idoperations << client.operation.mutatedo|m|m.asset_operation=client.operation.create_resource.assetdo|a|a.resource_name=client.path.asset(customer_id,text_asset_temp_id)a.text_asset=client.resource.text_assetdo|text_asset|text_asset.text=business_nameendendend# Create the Image Asset.image_asset_temp_id=next_temp_idoperations << client.operation.mutatedo|m|m.asset_operation=client.operation.create_resource.assetdo|a|a.resource_name=client.path.asset(customer_id,image_asset_temp_id)# Provide a unique friendly name to identify your asset.# When there is an existing image asset with the same content but a different# name, the new name will be dropped silently.a.name=logo_namea.type=:IMAGEa.image_asset=client.resource.image_assetdo|image_asset|image_asset.data=get_image_bytes(logo_url)endendendifbrand_guidelines_enabled# Create CampaignAsset resources to link the Asset resources to the Campaign.operations << client.operation.mutatedo|m|m.campaign_asset_operation=client.operation.create_resource.campaign_assetdo|ca|ca.field_type=:BUSINESS_NAMEca.campaign=client.path.campaign(customer_id,PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID,)ca.asset=client.path.asset(customer_id,text_asset_temp_id)endendoperations << client.operation.mutatedo|m|m.campaign_asset_operation=client.operation.create_resource.campaign_assetdo|ca|ca.field_type=:LOGOca.campaign=client.path.campaign(customer_id,PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID,)ca.asset=client.path.asset(customer_id,image_asset_temp_id)endendelse# Create AssetGroupAsset resources to link the Asset resources to the AssetGroup.operations << client.operation.mutatedo|m|m.asset_group_asset_operation=client.operation.create_resource.asset_group_assetdo|aga|aga.field_type=:BUSINESS_NAMEaga.asset_group=client.path.asset_group(customer_id,ASSET_GROUP_TEMPORARY_ID,)aga.asset=client.path.asset(customer_id,text_asset_temp_id)endendoperations << client.operation.mutatedo|m|m.asset_group_asset_operation=client.operation.create_resource.asset_group_assetdo|aga|aga.field_type=:LOGOaga.asset_group=client.path.asset_group(customer_id,ASSET_GROUP_TEMPORARY_ID,)aga.asset=client.path.asset(customer_id,image_asset_temp_id)endendendoperationsend
# Creates a list of MutateOperations that create linked brand assets.subcreate_and_link_brand_assets{my($customer_id,$brand_guidelines_enabled,$business_name,$logo_url,$logo_name)=@_;my$operations=[];# Create the text asset.my$text_asset_temp_id=$next_temp_id--;push@$operations,Google::Ads::GoogleAds::V22::Services::GoogleAdsService::MutateOperation->
new({assetOperation=>
Google::Ads::GoogleAds::V22::Services::AssetService::AssetOperation->
new({create=>Google::Ads::GoogleAds::V22::Resources::Asset->new({resourceName=>
Google::Ads::GoogleAds::V22::Utils::ResourceNames::asset($customer_id,$text_asset_temp_id),textAsset=>Google::Ads::GoogleAds::V22::Common::TextAsset->new({text=>$business_name})})})});# Create the image asset.my$image_asset_temp_id=$next_temp_id--;push@$operations,Google::Ads::GoogleAds::V22::Services::GoogleAdsService::MutateOperation->
new({assetOperation=>
Google::Ads::GoogleAds::V22::Services::AssetService::AssetOperation->
new({create=>Google::Ads::GoogleAds::V22::Resources::Asset->new({resourceName=>
Google::Ads::GoogleAds::V22::Utils::ResourceNames::asset($customer_id,$image_asset_temp_id),# Provide a unique friendly name to identify your asset.# When there is an existing image asset with the same content but a different# name, the new name will be dropped silently.name=>$logo_name,imageAsset=>
Google::Ads::GoogleAds::V22::Common::ImageAsset->new({data=>get_base64_data_from_url($logo_url)})})})});if($brand_guidelines_enabled){# Create CampaignAsset resources to link the Asset resources to the Campaign.push@$operations,Google::Ads::GoogleAds::V22::Services::GoogleAdsService::MutateOperation->new({campaignAssetOperation=>
Google::Ads::GoogleAds::V22::Services::CampaignAssetService::CampaignAssetOperation->new({create=>
Google::Ads::GoogleAds::V22::Resources::CampaignAsset->new({fieldType=>BUSINESS_NAME,campaign=>
Google::Ads::GoogleAds::V22::Utils::ResourceNames::campaign($customer_id,PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID),asset=>
Google::Ads::GoogleAds::V22::Utils::ResourceNames::asset($customer_id,$text_asset_temp_id)})})});push@$operations,Google::Ads::GoogleAds::V22::Services::GoogleAdsService::MutateOperation->new({campaignAssetOperation=>
Google::Ads::GoogleAds::V22::Services::CampaignAssetService::CampaignAssetOperation->new({create=>
Google::Ads::GoogleAds::V22::Resources::CampaignAsset->new({fieldType=>LOGO,campaign=>
Google::Ads::GoogleAds::V22::Utils::ResourceNames::campaign($customer_id,PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID),asset=>
Google::Ads::GoogleAds::V22::Utils::ResourceNames::asset($customer_id,$image_asset_temp_id)})})});}else{# Create AssetGroupAsset resources to link the Asset resources to the AssetGroup.push@$operations,Google::Ads::GoogleAds::V22::Services::GoogleAdsService::MutateOperation->new({assetGroupAssetOperation=>
Google::Ads::GoogleAds::V22::Services::AssetGroupAssetService::AssetGroupAssetOperation->new({create=>
Google::Ads::GoogleAds::V22::Resources::AssetGroupAsset->new({asset=>
Google::Ads::GoogleAds::V22::Utils::ResourceNames::asset($customer_id,$text_asset_temp_id),assetGroup=>
Google::Ads::GoogleAds::V22::Utils::ResourceNames::asset_group($customer_id,ASSET_GROUP_TEMPORARY_ID),fieldType=>BUSINESS_NAME})})});push@$operations,Google::Ads::GoogleAds::V22::Services::GoogleAdsService::MutateOperation->new({assetGroupAssetOperation=>
Google::Ads::GoogleAds::V22::Services::AssetGroupAssetService::AssetGroupAssetOperation->new({create=>
Google::Ads::GoogleAds::V22::Resources::AssetGroupAsset->new({asset=>
Google::Ads::GoogleAds::V22::Utils::ResourceNames::asset($customer_id,$image_asset_temp_id),assetGroup=>
Google::Ads::GoogleAds::V22::Utils::ResourceNames::asset_group($customer_id,ASSET_GROUP_TEMPORARY_ID),fieldType=>LOGO})})});}return$operations;}
Starting on June 1, 2025, we will begin to automatically enable brand
guidelines
for Performance Max campaigns that use the same brand assets (BUSINESS_NAME,
LOGO, and LANDSCAPE_LOGO) across all asset groups. All campaigns that can be
automatically migrated will be migrated by October 30, 2025.
Automatic migration will only occur for campaigns that use a consistent
business name and logo in every asset group. If your campaign has variations
in these assets, it won't be migrated automatically.
All eligible Performance Max campaigns under a customer ID will be migrated
simultaneously.
After migration, each migrated campaign will have its own set of brand
assets stored at the campaign level using CampaignAsset.
Campaigns not eligible for automatic migration require manual migration to
enable brand guidelines.
Campaign.brand_guidelines_enabled
indicates if an existing campaign is enabled for brand guidelines. To manually
enable brand guidelines for an existing campaign, use
CampaignService.EnablePMaxBrandGuidelines
instead of updating the brand_guidelines_enabled field directly, as the field
is immutable. Set
auto_populate_brand_assets
to true to automatically populate the campaign with top-performing brand
assets. Otherwise, you must manually provide the assets in the operation with
brand_assets. Disabling brand
guidelines for a campaign is not supported.
[[["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-12-03 UTC."],[],[]]