Hi,
I am trying to update the bid strategies from the C# code.
I am able to update the "MANUAL CPC", "TARGET CPA" and "TARGET SPEND". But
when I try to update the "MAXIMIZE CONVERSIONS".
It is not updating into the Google Ads for any campaign.
I am not getting any error or exception in response.
here is my implemented code: can anyone please help and let me know what is
the missing/wrong here?
List<CampaignOperation> operations = new List<CampaignOperation>();
CampaignServiceClient campaignService =
client.GetService(Services.V1.CampaignService);
Campaign campaign = new Campaign
{
Id = adCampaignId,
ResourceName = ResourceNames.Campaign(clientId,
adCampaignId),
};
if (isSearchAdsRequest)
{
campaign.NetworkSettings = new NetworkSettings
{
TargetContentNetwork = false,
TargetGoogleSearch = true,
TargetSearchNetwork = false,
TargetPartnerSearchNetwork = false
};
}
switch (adCampaign.BidStrategy.ToUpper())
{
case BiddingStrategyAdwordsAPI.MAXIMIZE_CONVERSIONS:
campaign.BiddingStrategyType =
BiddingStrategyType.MaximizeConversions;
campaign.MaximizeConversions = new
MaximizeConversions();
break;
}
operations.Add(new CampaignOperation
{
Update = campaign,
UpdateMask = FieldMasks.AllSetFieldsOf(campaign)
});
try
{
MutateCampaignsResponse response = await
campaignService.MutateCampaignsAsync(clientId.ToString(),
operations.ToArray());
}
Thanks
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/bca424fb-3ef4-4d3c-9218-8486fe8d4754%40googlegroups.com.