I'm currently trying to create my search campaigns with an specific goal, but after reading the documentation[1] and some messages[2] in this group, I cannot figure out how. I don't want to modify the goals of an existing campaign but create a new campaign with that goals from the start.
The conversion goal that I want to apply to my new campaigns is already created and I can fetch it with the google ads service, so I already have the resource name. Given this PHP snippet code and assuming that specifying a campaign goal should be added in the CampaignMutateOperation, where should I specify my custom goal?
return new MutateOperation([
'campaign_operation' => new CampaignOperation([
'create' => new Campaign([
'name' => 'Test campaign',
'resource_name' => ResourceNames::forCampaign(
'1234',
'-1'
),
'campaign_budget' => ResourceNames::forCampaignBudget(
'1234',
'-10',
),
'status' => CampaignStatus::ENABLED,
'advertising_channel_type' => AdvertisingChannelType::SEARCH,
'maximize_conversions' => new MaximizeConversions(),
'network_settings' => new NetworkSettings([
'target_google_search' => true,
'target_search_network' => true,
'target_content_network' => false,
'target_partner_search_network' => false,
]),
]),
]),
]);
Thank you for your help.